Re: [PATCH] mm: vmscan: fix typo in isolating lru pages

From: Hillf Danton
Date: Sat Dec 31 2011 - 09:33:09 EST


On Fri, Dec 30, 2011 at 7:07 AM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 29 Dec 2011 20:38:41 +0800
> Hillf Danton <dhillf@xxxxxxxxx> wrote:
>
>> It is not the tag page but the cursor page that we should process, and it looks
>> a typo.
>>
>> Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
>> Cc: Michal Hocko <mhocko@xxxxxxx>
>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> Cc: David Rientjes <rientjes@xxxxxxxxxx>
>> Cc: Hugh Dickins <hughd@xxxxxxxxxx>
>> ---
>>
>> --- a/mm/vmscan.c   Thu Dec 29 20:20:16 2011
>> +++ b/mm/vmscan.c   Thu Dec 29 20:23:30 2011
>> @@ -1231,13 +1231,13 @@ static unsigned long isolate_lru_pages(u
>>
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mem_cgroup_lru_del(cursor_page);
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â list_move(&cursor_page->lru, dst);
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â isolated_pages = hpage_nr_pages(page);
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â isolated_pages = hpage_nr_pages(cursor_page);
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â nr_taken += isolated_pages;
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â nr_lumpy_taken += isolated_pages;
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (PageDirty(cursor_page))
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â nr_lumpy_dirty += isolated_pages;
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scan++;
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â pfn += isolated_pages-1;
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â pfn += isolated_pages - 1;
>> Â Â Â Â Â Â Â Â Â Â Â } else {
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /*
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â* Check if the page is freed already.
>
> This problem looks pretty benign in mainline. ÂBut Andrea's "mm:
> vmscan: check if we isolated a compound page during lumpy scan" came
> along and uses isolated_pages rather a lot more, including using it to
> advance across the pfn array.
>
> I jiggled your patch to suit current mainline then reworked everything
> else so we end up with this result.
>
Hi folks

Thanks for your comments, ack and nack, in 2011.

Happy New Year

Hillf Danton
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_