Re: [RFC 3/8] vmscan: make isolate_lru_page with filter aware

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

 



On Thu, Apr 28, 2011 at 7:35 PM, Mel Gorman <mgorman@xxxxxxx> wrote:
> On Wed, Apr 27, 2011 at 01:25:20AM +0900, Minchan Kim wrote:
>> In some __zone_reclaim case, we don't want to shrink mapped page.
>> Nonetheless, we have isolated mapped page and re-add it into
>> LRU's head. It's unnecessary CPU overhead and makes LRU churning.
>>
>> Of course, when we isolate the page, the page might be mapped but
>> when we try to migrate the page, the page would be not mapped.
>> So it could be migrated. But race is rare and although it happens,
>> it's no big deal.
>>
>> Cc: Christoph Lameter <cl@xxxxxxxxx>
>> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
>> Cc: Mel Gorman <mgorman@xxxxxxx>
>> Cc: Rik van Riel <riel@xxxxxxxxxx>
>> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
>> Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx>
>
>> index 71d2da9..e8d6190 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -1147,7 +1147,8 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
>>
>> Âstatic unsigned long isolate_pages_global(unsigned long nr,
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct list_head *dst,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â unsigned long *scanned, int order,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â unsigned long *scanned,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct scan_control *sc,
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â int mode, struct zone *z,
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â int active, int file)
>> Â{
>> @@ -1156,8 +1157,8 @@ static unsigned long isolate_pages_global(unsigned long nr,
>> Â Â Â Â Â Â Â lru += LRU_ACTIVE;
>> Â Â Â if (file)
>> Â Â Â Â Â Â Â lru += LRU_FILE;
>> - Â Â return isolate_lru_pages(nr, &z->lru[lru].list, dst, scanned, order,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mode, file, 0, 0);
>> + Â Â return isolate_lru_pages(nr, &z->lru[lru].list, dst, scanned, sc->order,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mode, file, 0, !sc->may_unmap);
>> Â}
>>
>
> Why not take may_writepage into account for dirty pages?

I missed it.
I will consider it in next version.
Thanks, Mel.


-- 
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]