From e2dbb830e58cfca9d512b17f839faa6608a42318 Mon Sep 17 00:00:00 2001 From: Pedro Falcato Date: Mon, 11 Nov 2024 20:34:08 +0000 Subject: [PATCH] fixup! mm: Add reclaim for order > 0 allocations --- kernel/include/onyx/page.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/include/onyx/page.h b/kernel/include/onyx/page.h index 167f5c629..7253ddadf 100644 --- a/kernel/include/onyx/page.h +++ b/kernel/include/onyx/page.h @@ -534,6 +534,15 @@ static inline uint64_t get_kernel_phys_offset() */ unsigned long pages_under_high_watermark(); +/** + * @brief Calculate a free page target (for reclaim) + * + * @param gfp GFP used for the failed allocation/reclaim + * @param order Order allocation that failed + * @return Free page target. If 0, probably shouldn't reclaim. + */ +unsigned long page_reclaim_target(gfp_t gfp, unsigned int order); + /** * @brief Drain pages from all zones' pcpu caches *