linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: vmscan: recompute page status when putting back
@ 2012-01-06 14:07 Hillf Danton
  2012-01-09 16:49 ` KOSAKI Motohiro
  2012-01-10  3:44 ` KAMEZAWA Hiroyuki
  0 siblings, 2 replies; 4+ messages in thread
From: Hillf Danton @ 2012-01-06 14:07 UTC (permalink / raw)
  To: linux-mm
  Cc: KAMEZAWA Hiroyuki, David Rientjes, Andrew Morton, Hillf Danton, 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 <kamezawa.hiroyu@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/vmscan.c	Thu Dec 29 20:20:16 2011
+++ b/mm/vmscan.c	Fri Jan  6 21:31:56 2012
@@ -633,12 +633,14 @@ int remove_mapping(struct address_space
 void putback_lru_page(struct page *page)
 {
 	int lru;
-	int active = !!TestClearPageActive(page);
-	int was_unevictable = PageUnevictable(page);
+	int active;
+	int was_unevictable;

 	VM_BUG_ON(PageLRU(page));

 redo:
+	active = !!TestClearPageActive(page);
+	was_unevictable = PageUnevictable(page);
 	ClearPageUnevictable(page);

 	if (page_evictable(page, NULL)) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-10 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 14:07 [PATCH] mm: vmscan: recompute page status when putting back Hillf Danton
2012-01-09 16:49 ` KOSAKI Motohiro
2012-01-10  3:44 ` KAMEZAWA Hiroyuki
2012-01-10 14:32   ` Hillf Danton

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).