linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Wu Fengguang <fengguang.wu@intel.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] vmscan: Make move_active_pages_to_lru more generic
Date: Sun, 21 Nov 2010 20:26:39 -0500	[thread overview]
Message-ID: <4CE9C6CF.20105@redhat.com> (raw)
In-Reply-To: <AANLkTimSE2j71uFPCZWBFdau4NE_hmTtTMvUOBWOdMhF@mail.gmail.com>

On 11/21/2010 07:49 PM, Minchan Kim wrote:
> On Mon, Nov 22, 2010 at 3:07 AM, Rik van Riel<riel@redhat.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.

Good point.

Acked-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-11-22  1:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 14:24 [PATCH] vmscan: Make move_active_pages_to_lru more generic Minchan Kim
2010-11-21 18:07 ` Rik van Riel
2010-11-22  0:49   ` Minchan Kim
2010-11-22  1:26     ` Rik van Riel [this message]
2010-11-22  1:36 ` Wu Fengguang
2010-11-22  1:50   ` Minchan Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE9C6CF.20105@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).