Thread (17 messages) 17 messages, 3 authors, 2021-03-30
STALE1917d
Revisions (4)
  1. rfc current
  2. v1 [diff vs current]
  3. v2 [diff vs current]
  4. v3 [diff vs current]

[PATCH rfc 4/4] percpu: fix a comment about the chunks ordering

From: Roman Gushchin <hidden>
Date: 2021-03-24 19:07:34
Also in: lkml
Subsystem: memory management, per-cpu memory allocator, the rest · Maintainers: Andrew Morton, Dennis Zhou, Tejun Heo, Christoph Lameter, Linus Torvalds

Since the commit 3e54097beb22 ("percpu: manage chunks based on
contig_bits instead of free_bytes") chunks are sorted based on the
size of the biggest continuous free area instead of the total number
of free bytes. Update the corresponding comment to reflect this.

Signed-off-by: Roman Gushchin <redacted>
---
 mm/percpu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index 148137f0fc0b..08fb6e5d3232 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -99,7 +99,10 @@
 
 #include "percpu-internal.h"
 
-/* the slots are sorted by free bytes left, 1-31 bytes share the same slot */
+/*
+ * The slots are sorted by the size of the biggest continuous free area.
+ * 1-31 bytes share the same slot.
+ */
 #define PCPU_SLOT_BASE_SHIFT		5
 /* chunks in slots below this are subject to being sidelined on failed alloc */
 #define PCPU_SLOT_FAIL_THRESHOLD	3
-- 
2.30.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help