[Devel] [PATCH] tswap, tcache: Increase shrinkers seeks
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Nov 8 13:21:48 MSK 2017
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 at virtuozzo.com>
---
mm/tcache.c | 2 +-
mm/tswap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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,
};
More information about the Devel
mailing list