summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-06-19 03:06:12 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-07-04 04:30:19 +0200
commit08af2c12e3ef379de94ba5653f2f9ae9a588ecd9 (patch)
treecb721960beeb21e9e4366dad3de30d3d5faad7aa /mm/page_alloc.c
parentmm/page_alloc: fix a typo in comment about GFP flag (diff)
downloadlinux-08af2c12e3ef379de94ba5653f2f9ae9a588ecd9.tar.xz
linux-08af2c12e3ef379de94ba5653f2f9ae9a588ecd9.zip
mm/page_alloc: reword the comment of buddy_merge_likely()
For page with order O, we are checking its order (O + 1)'s buddy. If it is free, we would like to put it to the tail and expect it would be merged to a page with order (O + 2). Reword the comment to reflect it. Link: https://lkml.kernel.org/r/20240619010612.20740-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 299d09accf1f..8a0fd4137684 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -712,12 +712,12 @@ static inline struct page *get_page_from_free_area(struct free_area *area,
}
/*
- * If this is not the largest possible page, check if the buddy
- * of the next-highest order is free. If it is, it's possible
+ * If this is less than the 2nd largest possible page, check if the buddy
+ * of the next-higher order is free. If it is, it's possible
* that pages are being freed that will coalesce soon. In case,
* that is happening, add the free page to the tail of the list
* so it's less likely to be used soon and more likely to be merged
- * as a higher order page
+ * as a 2-level higher order page
*/
static inline bool
buddy_merge_likely(unsigned long pfn, unsigned long buddy_pfn,