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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090417155608.eeed1f02.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Fri, 17 Apr 2009 15:56:08 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	balbir@...ux.vnet.ibm.com
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Add file based RSS accounting for memory resource
 controller (v2)

On Fri, 17 Apr 2009 12:17:26 +0530
Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:

> > *But* we still have following code.
> > ==
> > 820 static int __mem_cgroup_try_charge(struct mm_struct *mm,
> >  821                         gfp_t gfp_mask, struct mem_cgroup **memcg,
> >  822    
> >  834         /*
> >  835          * We always charge the cgroup the mm_struct belongs to.
> >  836          * The mm_struct's mem_cgroup changes on task migration if the
> >  837          * thread group leader migrates. It's possible that mm is not
> >  838          * set, if so charge the init_mm (happens for pagecache usage).
> >  839          */
> >  840         mem = *memcg;
> >  841         if (likely(!mem)) {
> >  842                 mem = try_get_mem_cgroup_from_mm(mm);
> >  843                 *memcg = mem;
> >  844         } else {
> >  845                 css_get(&mem->css);
> >  846         }
> >  847         if (unlikely(!mem))
> >  848                 return 0;
> > ==
> > 
> > So, for _now_, we should use this style of checking page_cgroup is used or not.
> > Until we fix/confirm try_charge() does.
> >
> 
> Hmm... I think we need to fix this loop hole, if not mem, we should
> look at charging the root cgroup. I suspect !mem cases should be 0,
> I'll keep that as a TODO. 
> 
yes, I'd like to keep this in my mind, too.


Thanks,
-Kame

--
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