tswap, tcache: Increase shrinkers seeks

Submitted by Kirill Tkhai on Nov. 8, 2017, 10:21 a.m.

Details

Message ID 151013646183.5272.8182908075770294540.stgit@localhost.localdomain
State New
Series "tswap, tcache: Increase shrinkers seeks"
Headers show

Commit Message

Kirill Tkhai Nov. 8, 2017, 10:21 a.m.
Commit e008b95a28ef95dd4bb08f69c89d26fc5fa7411a
"ms/mm: use sc->priority for slab shrink targets"
exposed the fact we shrinks too many tcache pages.

Shrinkers of {in,}active pages shrink up to 32
pages, while tcache and tswap shrinks 128 pages.
This became a reason of tcache active test fail.

This patch makes numbers of shrinked pages of tcache
and tswap in consistent state with pages shrinkers,
and restores the test-expected behaviour.

https://jira.sw.ru/browse/PSBM-72584

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 mm/tcache.c |    2 +-
 mm/tswap.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/tcache.c b/mm/tcache.c
index d1a2c53e11a..8b893e6b520 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -1202,7 +1202,7 @@  static unsigned long tcache_shrink_scan(struct shrinker *shrink,
 struct shrinker tcache_shrinker = {
 	.count_objects		= tcache_shrink_count,
 	.scan_objects		= tcache_shrink_scan,
-	.seeks			= 1,
+	.seeks			= 4,
 	.batch			= TCACHE_SCAN_BATCH,
 	.flags			= SHRINKER_NUMA_AWARE,
 };
diff --git a/mm/tswap.c b/mm/tswap.c
index 38a389fb0ca..b7a990e8cd8 100644
--- a/mm/tswap.c
+++ b/mm/tswap.c
@@ -271,7 +271,7 @@  static unsigned long tswap_shrink_scan(struct shrinker *shrink,
 static struct shrinker tswap_shrinker = {
 	.count_objects = tswap_shrink_count,
 	.scan_objects = tswap_shrink_scan,
-	.seeks = 1,
+	.seeks = 4,
 	.flags = SHRINKER_NUMA_AWARE,
 };
 

Comments

Andrey Ryabinin Nov. 8, 2017, 11:43 a.m.
On 11/08/2017 01:21 PM, Kirill Tkhai wrote:
> Commit e008b95a28ef95dd4bb08f69c89d26fc5fa7411a
> "ms/mm: use sc->priority for slab shrink targets"
> exposed the fact we shrinks too many tcache pages.
> 
> Shrinkers of {in,}active pages shrink up to 32
> pages, while tcache and tswap shrinks 128 pages.
> This became a reason of tcache active test fail.
> 
> This patch makes numbers of shrinked pages of tcache
> and tswap in consistent state with pages shrinkers,
> and restores the test-expected behaviour.
> 
> https://jira.sw.ru/browse/PSBM-72584
> 
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>

Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>