diff options
Diffstat (limited to 'mm/shuffle.h')
-rw-r--r-- | mm/shuffle.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/shuffle.h b/mm/shuffle.h index 644c8ee97b9e..777a257a0d2f 100644 --- a/mm/shuffle.h +++ b/mm/shuffle.h | |||
@@ -36,6 +36,13 @@ static inline void shuffle_zone(struct zone *z) | |||
36 | return; | 36 | return; |
37 | __shuffle_zone(z); | 37 | __shuffle_zone(z); |
38 | } | 38 | } |
39 | |||
40 | static inline bool is_shuffle_order(int order) | ||
41 | { | ||
42 | if (!static_branch_unlikely(&page_alloc_shuffle_key)) | ||
43 | return false; | ||
44 | return order >= SHUFFLE_ORDER; | ||
45 | } | ||
39 | #else | 46 | #else |
40 | static inline void shuffle_free_memory(pg_data_t *pgdat) | 47 | static inline void shuffle_free_memory(pg_data_t *pgdat) |
41 | { | 48 | { |
@@ -48,5 +55,10 @@ static inline void shuffle_zone(struct zone *z) | |||
48 | static inline void page_alloc_shuffle(enum mm_shuffle_ctl ctl) | 55 | static inline void page_alloc_shuffle(enum mm_shuffle_ctl ctl) |
49 | { | 56 | { |
50 | } | 57 | } |
58 | |||
59 | static inline bool is_shuffle_order(int order) | ||
60 | { | ||
61 | return false; | ||
62 | } | ||
51 | #endif | 63 | #endif |
52 | #endif /* _MM_SHUFFLE_H */ | 64 | #endif /* _MM_SHUFFLE_H */ |