From 3acb0008d3f4b6f2de668603dad5cc57ce534039 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 20 Feb 2017 13:48:54 +1100 Subject: [PATCH 15/18] Swap sucks. --- include/linux/swap.h | 6 +----- mm/vmscan.c | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) Index: linux-4.11-ck1/include/linux/swap.h =================================================================== --- linux-4.11-ck1.orig/include/linux/swap.h 2017-05-12 13:25:56.375571570 +1000 +++ linux-4.11-ck1/include/linux/swap.h 2017-05-12 13:25:56.375571570 +1000 @@ -374,11 +374,7 @@ extern atomic_long_t nr_swap_pages; extern long total_swap_pages; extern bool has_usable_swap(void); -/* Swap 50% full? Release swapcache more aggressively.. */ -static inline bool vm_swap_full(void) -{ - return atomic_long_read(&nr_swap_pages) * 2 < total_swap_pages; -} +#define vm_swap_full() 1 static inline long get_nr_swap_pages(void) { Index: linux-4.11-ck1/mm/vmscan.c =================================================================== --- linux-4.11-ck1.orig/mm/vmscan.c 2017-05-12 13:25:56.375571570 +1000 +++ linux-4.11-ck1/mm/vmscan.c 2017-05-12 13:25:56.375571570 +1000 @@ -143,7 +143,7 @@ struct scan_control { /* * From 0 .. 100. Higher means more swappy. */ -int vm_swappiness = 60; +int vm_swappiness = 33; /* * The total number of pages which are beyond the high watermark within all * zones.