From: Minchan Kim <minchan.kim@gmail.com>
To: Ying Han <yinghan@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@redhat.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn
Date: Mon, 2 May 2011 08:00:46 +0900 [thread overview]
Message-ID: <BANLkTim1k-wGA1j9Cv1scCNR_-5b9BqESQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=c2tBcXJnFi-i4r1_ADiMFebmxMA@mail.gmail.com>
On Mon, May 2, 2011 at 7:10 AM, Ying Han <yinghan@google.com> wrote:
> On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@gmail.com> wrote:
>> The lru_deactivate_fn should not move page which in on unevictable lru
>> into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages
>> as __isolate_lru_page could return -EINVAL.
>> It's really BUG and let's fix it.
>>
>> Reported-by: Ying Han <yinghan@google.com>
>> Tested-by: Ying Han <yinghan@google.com>
>> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
>> ---
>> mm/swap.c | 3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/mm/swap.c b/mm/swap.c
>> index a83ec5a..2e9656d 100644
>> --- a/mm/swap.c
>> +++ b/mm/swap.c
>> @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg)
>> if (!PageLRU(page))
>> return;
>>
>> + if (PageUnevictable(page))
>> + return;
>> +
>> /* Some processes are using the page */
>> if (page_mapped(page))
>> return;
>> --
>> 1.7.1
>
> Thanks Minchan for the fix, and i haven't been able to reproducing the
> issue after applying the patch.
Thanks for the help, Ying.
--
Kind regards,
Minchan Kim
--
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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-05-01 23:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-01 15:03 [PATCH 0/2] Fix an enhance deactive_page Minchan Kim
2011-05-01 15:03 ` [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn Minchan Kim
2011-05-01 22:10 ` Ying Han
2011-05-01 23:00 ` Minchan Kim [this message]
2011-05-02 10:32 ` KOSAKI Motohiro
2011-05-02 14:56 ` Rik van Riel
2011-05-01 15:03 ` [PATCH 2/2] Filter unevictable page out in deactivate_page Minchan Kim
2011-05-02 10:37 ` KOSAKI Motohiro
2011-05-03 0:29 ` Minchan Kim
2011-05-02 14:57 ` Rik van Riel
2011-05-03 0:30 ` 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=BANLkTim1k-wGA1j9Cv1scCNR_-5b9BqESQ@mail.gmail.com \
--to=minchan.kim@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=yinghan@google.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).