summaryrefslogtreecommitdiff
path: root/include/linux/shrinker.h
diff options
context:
space:
mode:
authorVinayak Menon <vinmenon@codeaurora.org>2017-04-14 12:15:18 +0530
committerVinayak Menon <vinmenon@codeaurora.org>2017-04-18 10:29:44 +0530
commitd8c98bb6aee804c47b6462d3012aae38d0b043e0 (patch)
tree6a8d92e849da3737ff8a6f2abce8260692678ff6 /include/linux/shrinker.h
parent0293b8a7d07a2ef84bd227b81f20b966af900c51 (diff)
mm: separate out the invocation of lowmemorykiller shrinker
The commit '6b4f77 (mm: vmscan: invoke slab shrinkers from shrink_zone())' fixed the invocation of shrinkers but resulted in lowmemorykiller shrinker being called more. Reduce the number of lowmemorykiller shrinker invocations by separating out the lowmemorykiller shrinker from shrink_slab. This will make lowmemorykiller invoked only once for all zones reclaimed in the direct reclaim path, and once for each zone in the kswap path. As a consequence the eligible pages passed to shrink_slab_lmk is now the reclaimable pages of all zones. Reducing the number of lowmemorykiller invocations reduces the unnecessary time spent in lowmemorykiller and thus contention or failures on lowmemorykiller's scan_mutex. Change-Id: Iaabb9e441711f1dc804980b5853b64b3f214698d Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'include/linux/shrinker.h')
-rw-r--r--include/linux/shrinker.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 4fcacd915d45..e77f648f9662 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -66,6 +66,7 @@ struct shrinker {
/* Flags */
#define SHRINKER_NUMA_AWARE (1 << 0)
#define SHRINKER_MEMCG_AWARE (1 << 1)
+#define SHRINKER_LMK (1 << 2)
extern int register_shrinker(struct shrinker *);
extern void unregister_shrinker(struct shrinker *);