Skip to contentSkip to conversation

mm/vmalloc.c: Use "high-order" in description non 0-order pages

PATCH Applied Uladzislau Rezki (Sony) 2 participants 6 messages Sep 6, 2024 – Sep 10, 2024

Subsystems (2)
lore
Share & tools
lore

Uladzislau Rezki (Sony)

author maintainer
#0 lore raw

PATCH 1/1 mm/vmalloc.c: Use "high-order" in description non 0-order pages

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmalloc.c +2 -2
index 37b6e987234e..c7bd8740b8a2 100644
@@ -3590,7 +3590,7 @@ vm_area_alloc_pages(gfp_t gfp, int nid,
 			break;
 
 		/*
-		 * Higher order allocations must be able to be treated as
+		 * High-order allocations must be able to be treated as
 		 * independent small pages by callers (as they can with
 		 * small-page vmallocs). Some drivers do their own refcounting
 		 * on vmalloc_to_page() pages, some use page->mapping,
@@ -3653,7 +3653,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	page_order = vm_area_page_order(area);
 
 	/*
-	 * Higher order nofail allocations are really expensive and
+	 * High-order nofail allocations are really expensive and
 	 * potentially dangerous (pre-mature OOM, disruptive reclaim
 	 * and compaction etc.
 	 *
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Uladzislau Rezki (Sony)

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This looks good to me, thanks.

By the way, do you plan to clean up the rest of them in other places?

Quoted 26 lines
mm/vmalloc.c +2 -2
index 37b6e987234e..c7bd8740b8a2 100644
@@ -3590,7 +3590,7 @@ vm_area_alloc_pages(gfp_t gfp, int nid,
 			break;
 
 		/*
-		 * Higher order allocations must be able to be treated as
+		 * High-order allocations must be able to be treated as
 		 * independent small pages by callers (as they can with
 		 * small-page vmallocs). Some drivers do their own refcounting
 		 * on vmalloc_to_page() pages, some use page->mapping,
@@ -3653,7 +3653,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	page_order = vm_area_page_order(area);
 
 	/*
-	 * Higher order nofail allocations are really expensive and
+	 * High-order nofail allocations are really expensive and
 	 * potentially dangerous (pre-mature OOM, disruptive reclaim
 	 * and compaction etc.
 	 *
Signature · 1 line
2.39.2
author maintainer
#2 lore raw
Quoted 12 lines · Baoquan He
Quoted 10 lines · Uladzislau Rezki (Sony)

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines

This looks good to me, thanks.

By the way, do you plan to clean up the rest of them in other places?

urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher include/linux/vmalloc.h 
urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher mm/vmalloc.c
493:     * nr is a running index into the array which helps higher level
urezki@pc638:~/data/raid0/coding/linux-next.git$

What am i missing? Didn't i do it?

--
Uladzislau Rezki

#3 lore raw
Quoted 17 lines · Uladzislau Rezki
Quoted 16 lines · Baoquan He
Quoted 10 lines · Uladzislau Rezki (Sony)

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This looks good to me, thanks.

Quoted 8 lines
Quoted 2 lines

By the way, do you plan to clean up the rest of them in other places?

urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher include/linux/vmalloc.h 
urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher mm/vmalloc.c
493:     * nr is a running index into the array which helps higher level
urezki@pc638:~/data/raid0/coding/linux-next.git$

What am i missing? Didn't i do it?

Sorry, I didn't make it clear. I meant those places other than vmalloc related files, e.g mm/page_alloc.c, there are a lot of [Hhigh]er-order mixed with high-order. I can continue the cleaning sometime if it's not in your TO-DO list.

mm/page_alloc.c:551: * Higher-order pages are called "compound pages". They are structured thusly:
mm/page_alloc.c:716: * of the next-higher order is free. If it is, it's possible mm/page_alloc.c:720: * as a 2-level higher order page
mm/page_alloc.c:735: return find_buddy_page_pfn(higher_page, higher_page_pfn, order + 1,
mm/page_alloc.c:2750: * split_page takes a non-compound higher-order page, and splits it into
mm/page_alloc.c:3587: /* The OOM killer will not help higher order allocs */
mm/page_alloc.c:4811: * within a 0 or higher order page. Multiple fragments within that page
mm/page_alloc.c:6516: * page allocator holds, ie. they can be part of higher order
mm/page_alloc.c:6790: * Break down a higher-order page in sub-pages, and keep our target out of

author maintainer
#4 lore raw
Quoted 32 lines · Baoquan He
Quoted 17 lines · Uladzislau Rezki
Quoted 16 lines · Baoquan He
Quoted 10 lines · Uladzislau Rezki (Sony)

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This looks good to me, thanks.

Quoted 8 lines
Quoted 2 lines

By the way, do you plan to clean up the rest of them in other places?

urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher include/linux/vmalloc.h 
urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher mm/vmalloc.c
493:     * nr is a running index into the array which helps higher level
urezki@pc638:~/data/raid0/coding/linux-next.git$

What am i missing? Didn't i do it?

Sorry, I didn't make it clear. I meant those places other than vmalloc related files, e.g mm/page_alloc.c, there are a lot of [Hhigh]er-order mixed with high-order. I can continue the cleaning sometime if it's not in your TO-DO list.

Quoted 10 lines

mm/page_alloc.c:551: * Higher-order pages are called "compound pages". They are structured thusly:
mm/page_alloc.c:716: * of the next-higher order is free. If it is, it's possible mm/page_alloc.c:720: * as a 2-level higher order page
mm/page_alloc.c:735: return find_buddy_page_pfn(higher_page, higher_page_pfn, order + 1,
mm/page_alloc.c:2750: * split_page takes a non-compound higher-order page, and splits it into
mm/page_alloc.c:3587: /* The OOM killer will not help higher order allocs */
mm/page_alloc.c:4811: * within a 0 or higher order page. Multiple fragments within that page
mm/page_alloc.c:6516: * page allocator holds, ie. they can be part of higher order
mm/page_alloc.c:6790: * Break down a higher-order page in sub-pages, and keep our target out of

I see. I appreciate if you go ahead and improve it further.

--
Uladzislau Rezki

#5 lore raw
Quoted 43 lines · Uladzislau Rezki
Quoted 32 lines · Baoquan He
Quoted 17 lines · Uladzislau Rezki
Quoted 16 lines · Baoquan He
Quoted 10 lines · Uladzislau Rezki (Sony)

In many places, in the comments, we use both "higher-order" and "high-order" to describe the non 0-order pages. That is confusing, because a "higher-order" statement does not reflect what it is compared with.

---
 mm/vmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This looks good to me, thanks.

Quoted 8 lines
Quoted 2 lines

By the way, do you plan to clean up the rest of them in other places?

urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher include/linux/vmalloc.h 
urezki@pc638:~/data/raid0/coding/linux-next.git$ grep -rni higher mm/vmalloc.c
493:     * nr is a running index into the array which helps higher level
urezki@pc638:~/data/raid0/coding/linux-next.git$

What am i missing? Didn't i do it?

Sorry, I didn't make it clear. I meant those places other than vmalloc related files, e.g mm/page_alloc.c, there are a lot of [Hhigh]er-order mixed with high-order. I can continue the cleaning sometime if it's not in your TO-DO list.

Quoted 10 lines

mm/page_alloc.c:551: * Higher-order pages are called "compound pages". They are structured thusly:
mm/page_alloc.c:716: * of the next-higher order is free. If it is, it's possible mm/page_alloc.c:720: * as a 2-level higher order page
mm/page_alloc.c:735: return find_buddy_page_pfn(higher_page, higher_page_pfn, order + 1,
mm/page_alloc.c:2750: * split_page takes a non-compound higher-order page, and splits it into
mm/page_alloc.c:3587: /* The OOM killer will not help higher order allocs */
mm/page_alloc.c:4811: * within a 0 or higher order page. Multiple fragments within that page
mm/page_alloc.c:6516: * page allocator holds, ie. they can be part of higher order
mm/page_alloc.c:6790: * Break down a higher-order page in sub-pages, and keep our target out of

Quoted 1 line

I see. I appreciate if you go ahead and improve it further.

Ok, will do later.