Skip to content

Commit ac9380f

Browse files
rgushchindennisszhou
authored andcommitted
percpu: fix a comment about the chunks ordering
Since the commit 3e54097 ("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 <[email protected]> Signed-off-by: Dennis Zhou <[email protected]>
1 parent d434405 commit ac9380f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mm/percpu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@
9999

100100
#include "percpu-internal.h"
101101

102-
/* the slots are sorted by free bytes left, 1-31 bytes share the same slot */
102+
/*
103+
* The slots are sorted by the size of the biggest continuous free area.
104+
* 1-31 bytes share the same slot.
105+
*/
103106
#define PCPU_SLOT_BASE_SHIFT 5
104107
/* chunks in slots below this are subject to being sidelined on failed alloc */
105108
#define PCPU_SLOT_FAIL_THRESHOLD 3

0 commit comments

Comments
 (0)