lkml.org 
[lkml]   [2012]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.3] memcg: fix GPF when cgroup removal races with last exit
Konstantin Khlebnikov wrote:
> Hugh Dickins wrote:
>>
>> Konstantin, I've not yet looked into how this patch affects your
>> patchsets; but I do know that this surreptitious-switch-to-root
>> behaviour seemed nightmarish when I was doing per-memcg per-zone
>> locking (particularly inside something like __activate_page(), where
>> we del and add under a single lock), and unnecessary once you and I
>> secure the memcg differently. So you may just want to revert this in
>> patches for linux-next; but I've a suspicion that now we understand
>> it better, this technique might still be usable, and more efficient.
>
> Yes, something like that. But, I must fix my "isolated-pages" counters first,
> otherwise I just reintroduce this bug again.
>

I have thought little more and invented better approach: we can keep isolated pages
counted in lruvec->lru_size[] and vmstat counters. Thus isolated pages will prevent
removing it's memory cgroup. This method is more complicated than your tricky pushing
pages to root lruvec, but it more generic and does not adds new page-counters.


\
 
 \ /
  Last update: 2012-03-04 08:47    [W:0.049 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site