lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 7/9] mm: memcontrol: do not acquire page_cgroup lock for kmem pages
On Tue 27-05-14 15:53:42, Johannes Weiner wrote:
> On Fri, May 23, 2014 at 03:39:38PM +0200, Michal Hocko wrote:
[...]
> > > if (!PageCgroupUsed(pc))
> > > return;
> > >
> > > - lock_page_cgroup(pc);
> > > - if (PageCgroupUsed(pc)) {
> > > - memcg = pc->mem_cgroup;
> > > - ClearPageCgroupUsed(pc);
> > > - }
> > > - unlock_page_cgroup(pc);
> >
> > maybe add
> > WARN_ON_ONCE(pc->flags != PCG_USED);
> >
> > to check for an unexpected flags usage in the kmem path?
>
> There is no overlap between page types that use PCG_USED and those
> that don't. What would be the value of adding this?

I meant it as an early warning that something bad is going on.

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-05-28 14:21    [W:2.389 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site