lkml.org 
[lkml]   [2008]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 9/12] memcg allocate all page_cgroup at boot
On Wed, 01 Oct 2008 11:29:04 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > __mem_cgroup_move_lists() will have some amount of changes. And we should
> > check dead lock again.
>
> __mem_cgroup_move_lists() is called from mem_cgroup_isolate_pages() and
> mem_cgroup_move_lists(). In mem_cgroup_move_lists(), we have the page_cgroup
> lock. I think the current code works on the assumption (although not documented
> anywhere I've seen), that PAGE_CGROUP_FLAG_INACTIVE/ACTIVE/UNEVICTABLE bits are
> protected by lru_lock. Please look at
yes, I wrote them.

>
> __mem_cgroup_remove_list
> __mem_cgroup_add_list
> __mem_cgroup_move_lists
> __mem_cgroup_charge_common (sets this flag, before the pc is associated with the
> page).
>
But my point is lru_lock doesn't means page_cgroup is not locked by someone and
we must take always lock_page_cgroup() when we modify flags.

Then, mem_cgroup_isolate_page() should have to take lock.
But this means we have to care preemption for avoiding deadlock.
Maybe need some time to test.

Thanks,
-Kame



\
 
 \ /
  Last update: 2008-10-01 08:13    [from the cache]
©2003-2011 Jasper Spaans