From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx169.postini.com [74.125.245.169]) by kanga.kvack.org (Postfix) with SMTP id 8EC726B006E for ; Mon, 9 Jan 2012 11:49:39 -0500 (EST) Received: by ghrr18 with SMTP id r18so1955664ghr.14 for ; Mon, 09 Jan 2012 08:49:38 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: KOSAKI Motohiro Date: Mon, 9 Jan 2012 11:49:14 -0500 Message-ID: Subject: Re: [PATCH] mm: vmscan: recompute page status when putting back Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Hillf Danton Cc: linux-mm@kvack.org, KAMEZAWA Hiroyuki , David Rientjes , Andrew Morton , LKML > If unlikely the given page is isolated from lru list again, its status is > recomputed before putting back to lru list, since the comment says page's > status can change while we move it among lru. > > > Cc: KAMEZAWA Hiroyuki > Cc: David Rientjes > Cc: Andrew Morton > Signed-off-by: Hillf Danton > --- > > --- a/mm/vmscan.c =A0 =A0 =A0 Thu Dec 29 20:20:16 2011 > +++ b/mm/vmscan.c =A0 =A0 =A0 Fri Jan =A06 21:31:56 2012 > @@ -633,12 +633,14 @@ int remove_mapping(struct address_space > =A0void putback_lru_page(struct page *page) > =A0{ > =A0 =A0 =A0 =A0int lru; > - =A0 =A0 =A0 int active =3D !!TestClearPageActive(page); > - =A0 =A0 =A0 int was_unevictable =3D PageUnevictable(page); > + =A0 =A0 =A0 int active; > + =A0 =A0 =A0 int was_unevictable; > > =A0 =A0 =A0 =A0VM_BUG_ON(PageLRU(page)); > > =A0redo: > + =A0 =A0 =A0 active =3D !!TestClearPageActive(page); > + =A0 =A0 =A0 was_unevictable =3D PageUnevictable(page); > =A0 =A0 =A0 =A0ClearPageUnevictable(page); When and How do this race happen? -- 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: email@kvack.org