mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
mm: test PageSwapBacked in lumpy reclaim
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> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
faed836a23
commit
043bcbe5ec
1 changed files with 1 additions and 1 deletions
|
@ -1166,7 +1166,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
|
||||||
* anon page which don't already have a swap slot is
|
* anon page which don't already have a swap slot is
|
||||||
* pointless.
|
* pointless.
|
||||||
*/
|
*/
|
||||||
if (nr_swap_pages <= 0 && PageAnon(cursor_page) &&
|
if (nr_swap_pages <= 0 && PageSwapBacked(cursor_page) &&
|
||||||
!PageSwapCache(cursor_page))
|
!PageSwapCache(cursor_page))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue