Re: [PATCH v6 2/3] memcg: move memcg reclaimable page into tail of inactive list

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

 



On Mon, Feb 21, 2011 at 5:40 PM, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> On Sun, Feb 20, 2011 at 11:43:37PM +0900, Minchan Kim wrote:
>> --- a/mm/memcontrol.c
>> +++ b/mm/memcontrol.c
>> @@ -813,6 +813,33 @@ void mem_cgroup_del_lru(struct page *page)
>> Â Â Â mem_cgroup_del_lru_list(page, page_lru(page));
>> Â}
>>
>> +/*
>> + * Writeback is about to end against a page which has been marked for immediate
>> + * reclaim. ÂIf it still appears to be reclaimable, move it to the tail of the
>> + * inactive list.
>> + */
>> +void mem_cgroup_rotate_reclaimable_page(struct page *page)
>> +{
>> + Â Â struct mem_cgroup_per_zone *mz;
>> + Â Â struct page_cgroup *pc;
>> + Â Â enum lru_list lru = page_lru(page);
>> +
>> + Â Â if (mem_cgroup_disabled())
>> + Â Â Â Â Â Â return;
>> +
>> + Â Â pc = lookup_page_cgroup(page);
>> + Â Â /*
>> + Â Â Â* Used bit is set without atomic ops but after smp_wmb().
>> + Â Â Â* For making pc->mem_cgroup visible, insert smp_rmb() here.
>> + Â Â Â*/
>> + Â Â smp_rmb();
>> + Â Â /* unused or root page is not rotated. */
>> + Â Â if (!PageCgroupUsed(pc) || mem_cgroup_is_root(pc->mem_cgroup))
>> + Â Â Â Â Â Â return;
>
> The placement of this barrier is confused and has been fixed up in the
> meantime in other places. ÂIt has to be between PageCgroupUsed() and
> accessing pc->mem_cgroup. ÂYou can look at the other memcg lru
> functions for reference.

Yes. I saw your patch at that time but forgot it.
I will resend fixed version.
Thanks.

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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]