lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081206081859.GC7582@balbir.in.ibm.com>
Date:	Sat, 6 Dec 2008 13:48:59 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	nishimura@....nes.nec.co.jp
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Pavel Emelyanov <xemul@...nvz.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Paul Menage <menage@...gle.com>, d-nishimura@....biglobe.ne.jp
Subject: Re: [RFC][PATCH -mmotm 1/4] memcg: don't trigger oom at page
	migration

* Daisuke Nishimura <d-nishimura@....biglobe.ne.jp> [2008-12-06 11:47:57]:

> On Fri, 5 Dec 2008 19:09:26 +0530
> Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
> 
> > * Daisuke Nishimura <nishimura@....nes.nec.co.jp> [2008-12-05 21:23:04]:
> > 
> > > I think triggering OOM at mem_cgroup_prepare_migration would be just a bit
> > > overkill.
> > > Returning -ENOMEM would be enough for mem_cgroup_prepare_migration.
> > > The caller would handle the case anyway.
> > > 
> > > Signed-off-by: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
> > > ---
> > >  mm/memcontrol.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > index 4dbce1d..50ee1be 100644
> > > --- a/mm/memcontrol.c
> > > +++ b/mm/memcontrol.c
> > > @@ -1330,7 +1330,7 @@ int mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr)
> > >  	unlock_page_cgroup(pc);
> > > 
> > >  	if (mem) {
> > > -		ret = mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem);
> > > +		ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem, false);
> > >  		css_put(&mem->css);
> > >  	}
> > >  	*ptr = mem;
> > >
> > 
> > Seems reasonable to me. A comment indicating or adding a noreclaim
> > wrapper around __mem_cgroup_try_charge to indicate that no reclaim
> > will take place will be nice.
> > 
> Ah.. this flag to __mem_cgroup_try_charge doesn't mean "don't reclaim"
> but "don't cause oom after it tried to free memory but couldn't
> free enough memory after all".

Thanks, I mistook the parameter. Thanks for clarifying!

> 
> Thanks,
> Daisuke Nishimura.
> 
> > Acked-by: Balbir Singh <balbir@...ux.vnet.ibm.com> 
> > 
> > -- 
> > 	Balbir
> > 
> > --
> > To unsubscribe, send a message with 'unsubscribe linux-mm' in
> > the body to majordomo@...ck.org.  For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
> > 
> 

-- 
	Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ