]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-treewide-redefine-max_order-sanely-fix-3
authorKirill A. Shutemov <kirill@shutemov.name>
Thu, 16 Mar 2023 23:21:44 +0000 (02:21 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:23 +0000 (16:02 -0700)
fixups per Zi Yan

Link: https://lkml.kernel.org/r/20230316232144.b7ic4cif4kjiabws@box.shutemov.name
Signed-off-by: "Kirill A. Shutemov" <kirill@shutemov.name>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/kdump/vmcoreinfo.rst
kernel/events/ring_buffer.c
mm/Kconfig
mm/slub.c

index c267b8c61e975ab00abfec0f77363152687d9668..e488bb4e13c4c5909bfcd3109f53b95c84e72a83 100644 (file)
@@ -189,7 +189,7 @@ Offsets of the vmap_area's members. They carry vmalloc-specific
 information. Makedumpfile gets the start address of the vmalloc region
 from this.
 
-(zone.free_area, MAX_ORDER)
+(zone.free_area, MAX_ORDER + 1)
 ---------------------------
 
 Free areas descriptor. User-space tools use this value to iterate the
index 273a0fe7910a51aa531813f3d8de4623a144463b..a0433f37b0243a334a6bf45a95bd08ab527a0008 100644 (file)
@@ -814,7 +814,7 @@ struct perf_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags)
        size = sizeof(struct perf_buffer);
        size += nr_pages * sizeof(void *);
 
-       if (order_base_2(size) >= PAGE_SHIFT+MAX_ORDER)
+       if (order_base_2(size) > PAGE_SHIFT+MAX_ORDER)
                goto fail;
 
        node = (cpu == -1) ? cpu : cpu_to_node(cpu);
index 467844de48e51e7f9ee6dc52e1e1a3666a00816d..6ee3b48ed29819f3fff743bc9e697f0ae4f6d95b 100644 (file)
@@ -666,8 +666,8 @@ config HUGETLB_PAGE_SIZE_VARIABLE
          HUGETLB_PAGE_ORDER when there are multiple HugeTLB page sizes available
          on a platform.
 
-         Note that the pageblock_order cannot exceed MAX_ORDER - 1 and will be
-         clamped down to MAX_ORDER - 1.
+         Note that the pageblock_order cannot exceed MAX_ORDER and will be
+         clamped down to MAX_ORDER.
 
 config CONTIG_ALLOC
        def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
index 0e19c0d647e65b5d5341ccc73e626533cc073f71..f49d669ff604166ea1943e72f31050ba61b950f7 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4697,7 +4697,7 @@ __setup("slub_min_order=", setup_slub_min_order);
 static int __init setup_slub_max_order(char *str)
 {
        get_option(&str, (int *)&slub_max_order);
-       slub_max_order = min(slub_max_order, (unsigned int)MAX_ORDER);
+       slub_max_order = min_t(unsigned int, slub_max_order, MAX_ORDER);
 
        return 1;
 }