From: Roman Gushchin guro@fb.com
mainline inclusion from mainline-v5.14-rc1 commit ac9380f6b8a6a908a9df023bf8a2bcdaf9d2d6cb category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4BE79 CVE: NA
------------------------------------------------- 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 guro@fb.com Signed-off-by: Dennis Zhou dennis@kernel.org (cherry picked from commit ac9380f6b8a6a908a9df023bf8a2bcdaf9d2d6cb) Signed-off-by: Yuanzheng Song songyuanzheng@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- mm/percpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c index e12ab708fe15..928c8889eb1f 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -98,7 +98,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