hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/shrinker.h
....@@ -2,6 +2,8 @@
22 #ifndef _LINUX_SHRINKER_H
33 #define _LINUX_SHRINKER_H
44
5
+#include <linux/android_vendor.h>
6
+
57 /*
68 * This struct is used to pass information from page reclaim to the shrinkers.
79 * We consolidate the values for easier extention later.
....@@ -31,6 +33,7 @@
3133
3234 /* current memcg being shrunk (for memcg aware shrinkers) */
3335 struct mem_cgroup *memcg;
36
+ ANDROID_OEM_DATA_ARRAY(1, 3);
3437 };
3538
3639 #define SHRINK_STOP (~0UL)
....@@ -69,7 +72,7 @@
6972
7073 /* These are for internal use */
7174 struct list_head list;
72
-#ifdef CONFIG_MEMCG_KMEM
75
+#ifdef CONFIG_MEMCG
7376 /* ID in shrinker_idr */
7477 int id;
7578 #endif
....@@ -81,6 +84,11 @@
8184 /* Flags */
8285 #define SHRINKER_NUMA_AWARE (1 << 0)
8386 #define SHRINKER_MEMCG_AWARE (1 << 1)
87
+/*
88
+ * It just makes sense when the shrinker is also MEMCG_AWARE for now,
89
+ * non-MEMCG_AWARE shrinker should not have this flag set.
90
+ */
91
+#define SHRINKER_NONSLAB (1 << 2)
8492
8593 extern int prealloc_shrinker(struct shrinker *shrinker);
8694 extern void register_shrinker_prepared(struct shrinker *shrinker);