Re: [PATCH 3/4] memcg: clear pc->mem_cgorup if necessary.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/12/20 Johannes Weiner <hannes@xxxxxxxxxxx>:
> On Wed, Dec 14, 2011 at 04:51:24PM +0900, KAMEZAWA Hiroyuki wrote:
>> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>>
>> This is a preparation before removing a flag PCG_ACCT_LRU in page_cgroup
>> and reducing atomic ops/complexity in memcg LRU handling.
>>
>> In some cases, pages are added to lru before charge to memcg and pages
>> are not classfied to memory cgroup at lru addtion. Now, the lru where
>> the page should be added is determined a bit in page_cgroup->flags and
>> pc->mem_cgroup. I'd like to remove the check of flag.
>>
>> To handle the case pc->mem_cgroup may contain stale pointers if pages are
>> added to LRU before classification. This patch resets pc->mem_cgroup to
>> root_mem_cgroup before lru additions.
>>
>> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
> The followup compilation fixes aside, I agree.  But the sites where
> the owner is actually reset are really not too obvious.  How about the
> comment patch below?
>
> Otherwise,
>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>
> ---
> From: Johannes Weiner <hannes@xxxxxxxxxxx>
> Subject: memcg: clear pc->mem_cgorup if necessary fix
>
> Add comments to the clearing sites.
>
> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Ah, yes. This seems better. Thank you.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]