[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimSE2j71uFPCZWBFdau4NE_hmTtTMvUOBWOdMhF@mail.gmail.com>
Date: Mon, 22 Nov 2010 09:49:32 +0900
From: Minchan Kim <minchan.kim@...il.com>
To: Rik van Riel <riel@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Wu Fengguang <fengguang.wu@...el.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] vmscan: Make move_active_pages_to_lru more generic
On Mon, Nov 22, 2010 at 3:07 AM, Rik van Riel <riel@...hat.com> wrote:
> On 11/21/2010 09:24 AM, Minchan Kim wrote:
>>
>> Now move_active_pages_to_lru can move pages into active or inactive.
>> if it moves the pages into inactive, it itself can clear PG_acive.
>> It makes the function more generic.
>
>> diff --git a/mm/vmscan.c b/mm/vmscan.c
>> index aa4f1cb..bd408b3 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -1457,6 +1457,10 @@ static void move_active_pages_to_lru(struct zone
>> *zone,
>> VM_BUG_ON(PageLRU(page));
>> SetPageLRU(page);
>>
>> + /* we are de-activating */
>> + if (!is_active_lru(lru))
>> + ClearPageActive(page);
>> +
>
> Does that mean we also want code to ensure that pages have
> the PG_active bit set when we add them to an active list?
Yes. the function name is move_"active"_pages_to_lru.
So caller have to make sure pages have PG_active.
>
> --
> All rights reversed
>
--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists