diff options
Diffstat (limited to 'include/linux/shrinker.h')
-rw-r--r-- | include/linux/shrinker.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h index 7ca9c18cf130..b154fd2b084c 100644 --- a/include/linux/shrinker.h +++ b/include/linux/shrinker.h | |||
@@ -34,12 +34,15 @@ struct shrink_control { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | #define SHRINK_STOP (~0UL) | 36 | #define SHRINK_STOP (~0UL) |
37 | #define SHRINK_EMPTY (~0UL - 1) | ||
37 | /* | 38 | /* |
38 | * A callback you can register to apply pressure to ageable caches. | 39 | * A callback you can register to apply pressure to ageable caches. |
39 | * | 40 | * |
40 | * @count_objects should return the number of freeable items in the cache. If | 41 | * @count_objects should return the number of freeable items in the cache. If |
41 | * there are no objects to free or the number of freeable items cannot be | 42 | * there are no objects to free, it should return SHRINK_EMPTY, while 0 is |
42 | * determined, it should return 0. No deadlock checks should be done during the | 43 | * returned in cases of the number of freeable items cannot be determined |
44 | * or shrinker should skip this cache for this time (e.g., their number | ||
45 | * is below shrinkable limit). No deadlock checks should be done during the | ||
43 | * count callback - the shrinker relies on aggregating scan counts that couldn't | 46 | * count callback - the shrinker relies on aggregating scan counts that couldn't |
44 | * be executed due to potential deadlocks to be run at a later call when the | 47 | * be executed due to potential deadlocks to be run at a later call when the |
45 | * deadlock condition is no longer pending. | 48 | * deadlock condition is no longer pending. |