Thread (26 messages) 26 messages, 7 authors, 2012-01-05

Re: [PATCH 1/3] mm: test PageSwapBacked in lumpy reclaim

From: KOSAKI Motohiro <hidden>
Date: 2011-12-29 05:06:54

(12/28/11 11:35 PM), Hugh Dickins wrote:
quoted hunk ↗ jump to hunk
Lumpy reclaim does well to stop at a PageAnon when there's no swap, but
better is to stop at any PageSwapBacked, which includes shmem/tmpfs too.

Signed-off-by: Hugh Dickins<hughd@google.com>
---
  mm/vmscan.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
--- mmotm.orig/mm/vmscan.c	2011-12-28 12:32:02.000000000 -0800
+++ mmotm/mm/vmscan.c	2011-12-28 16:49:36.463201033 -0800
@@ -1222,7 +1222,7 @@ static unsigned long isolate_lru_pages(u
  			 * anon page which don't already have a swap slot is
  			 * pointless.
  			 */
-			if (nr_swap_pages<= 0&&  PageAnon(cursor_page)&&
+			if (nr_swap_pages<= 0&&  PageSwapBacked(cursor_page)&&
  			!PageSwapCache(cursor_page))
  				break;
It seems obvious.

Reviewed-by: KOSAKI Motohiro <redacted>


--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help