diff options
| author | Maarten Lankhorst <[email protected]> | 2024-07-03 13:25:10 +0200 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-07-12 15:52:20 -0700 |
| commit | a8585ac68621983587f1701b7567978fcbcd9573 (patch) | |
| tree | 596f2ab018b4b4d7266e6104940c5341e5c62001 /include/linux | |
| parent | 3b0ba54d5f8ff60553c01d3ec3c607ab7bb3b452 (diff) | |
mm/page_counter: move calculating protection values to page_counter
It's a lot of math, and there is nothing memcontrol specific about it.
This makes it easier to use inside of the drm cgroup controller.
[[email protected]: fix kerneldoc, per Jeff Johnson]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Maarten Lankhorst <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Jeff Johnson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/page_counter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/page_counter.h b/include/linux/page_counter.h index 8cd858d912c4..904c52f97284 100644 --- a/include/linux/page_counter.h +++ b/include/linux/page_counter.h @@ -81,4 +81,8 @@ static inline void page_counter_reset_watermark(struct page_counter *counter) counter->watermark = page_counter_read(counter); } +void page_counter_calculate_protection(struct page_counter *root, + struct page_counter *counter, + bool recursive_protection); + #endif /* _LINUX_PAGE_COUNTER_H */ |