.. | .. |
---|
2 | 2 | #ifndef _LINUX_SHRINKER_H |
---|
3 | 3 | #define _LINUX_SHRINKER_H |
---|
4 | 4 | |
---|
| 5 | +#include <linux/android_vendor.h> |
---|
| 6 | + |
---|
5 | 7 | /* |
---|
6 | 8 | * This struct is used to pass information from page reclaim to the shrinkers. |
---|
7 | 9 | * We consolidate the values for easier extention later. |
---|
.. | .. |
---|
31 | 33 | |
---|
32 | 34 | /* current memcg being shrunk (for memcg aware shrinkers) */ |
---|
33 | 35 | struct mem_cgroup *memcg; |
---|
| 36 | + ANDROID_OEM_DATA_ARRAY(1, 3); |
---|
34 | 37 | }; |
---|
35 | 38 | |
---|
36 | 39 | #define SHRINK_STOP (~0UL) |
---|
.. | .. |
---|
69 | 72 | |
---|
70 | 73 | /* These are for internal use */ |
---|
71 | 74 | struct list_head list; |
---|
72 | | -#ifdef CONFIG_MEMCG_KMEM |
---|
| 75 | +#ifdef CONFIG_MEMCG |
---|
73 | 76 | /* ID in shrinker_idr */ |
---|
74 | 77 | int id; |
---|
75 | 78 | #endif |
---|
.. | .. |
---|
81 | 84 | /* Flags */ |
---|
82 | 85 | #define SHRINKER_NUMA_AWARE (1 << 0) |
---|
83 | 86 | #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) |
---|
84 | 92 | |
---|
85 | 93 | extern int prealloc_shrinker(struct shrinker *shrinker); |
---|
86 | 94 | extern void register_shrinker_prepared(struct shrinker *shrinker); |
---|