All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Fix confusion around MAX_ORDER
@ 2023-03-15 11:31 Kirill A. Shutemov
  2023-03-15 11:31 ` [PATCH 01/10] sparc/mm: Fix MAX_ORDER usage in tsb_grow() Kirill A. Shutemov
                   ` (11 more replies)
  0 siblings, 12 replies; 57+ messages in thread
From: Kirill A. Shutemov @ 2023-03-15 11:31 UTC (permalink / raw)
  To: Andrew Morton, Mel Gorman, Vlastimil Babka, David Hildenbrand
  Cc: linux-mm, linux-arch, linux-kernel, Kirill A. Shutemov

MAX_ORDER currently defined as number of orders page allocator supports:
user can ask buddy allocator for page order between 0 and MAX_ORDER-1.

This definition is counter-intuitive and lead to number of bugs all over
the kernel.

Fix the bugs and then change the definition of MAX_ORDER to be
inclusive: the range of orders user can ask from buddy allocator is
0..MAX_ORDER now.

Kirill A. Shutemov (10):
  sparc/mm: Fix MAX_ORDER usage in tsb_grow()
  um: Fix MAX_ORDER usage in linux_main()
  floppy: Fix MAX_ORDER usage
  drm/i915: Fix MAX_ORDER usage in i915_gem_object_get_pages_internal()
  genwqe: Fix MAX_ORDER usage
  perf/core: Fix MAX_ORDER usage in rb_alloc_aux_page()
  mm/page_reporting: Fix MAX_ORDER usage in page_reporting_register()
  mm/slub: Fix MAX_ORDER usage in calculate_order()
  iommu: Fix MAX_ORDER usage in __iommu_dma_alloc_pages()
  mm, treewide: Redefine MAX_ORDER sanely

 .../admin-guide/kdump/vmcoreinfo.rst          |  2 +-
 .../admin-guide/kernel-parameters.txt         |  2 +-
 arch/arc/Kconfig                              |  4 +-
 arch/arm/Kconfig                              |  9 ++---
 arch/arm/configs/imx_v6_v7_defconfig          |  2 +-
 arch/arm/configs/milbeaut_m10v_defconfig      |  2 +-
 arch/arm/configs/oxnas_v6_defconfig           |  2 +-
 arch/arm/configs/pxa_defconfig                |  2 +-
 arch/arm/configs/sama7_defconfig              |  2 +-
 arch/arm/configs/sp7021_defconfig             |  2 +-
 arch/arm64/Kconfig                            | 27 ++++++-------
 arch/arm64/include/asm/sparsemem.h            |  2 +-
 arch/arm64/kvm/hyp/include/nvhe/gfp.h         |  2 +-
 arch/arm64/kvm/hyp/nvhe/page_alloc.c          | 10 ++---
 arch/csky/Kconfig                             |  2 +-
 arch/ia64/Kconfig                             |  8 ++--
 arch/ia64/include/asm/sparsemem.h             |  4 +-
 arch/ia64/mm/hugetlbpage.c                    |  2 +-
 arch/loongarch/Kconfig                        | 15 +++-----
 arch/m68k/Kconfig.cpu                         |  5 +--
 arch/mips/Kconfig                             | 19 ++++------
 arch/nios2/Kconfig                            |  7 +---
 arch/powerpc/Kconfig                          | 27 ++++++-------
 arch/powerpc/configs/85xx/ge_imp3a_defconfig  |  2 +-
 arch/powerpc/configs/fsl-emb-nonhw.config     |  2 +-
 arch/powerpc/mm/book3s64/iommu_api.c          |  2 +-
 arch/powerpc/mm/hugetlbpage.c                 |  2 +-
 arch/powerpc/platforms/powernv/pci-ioda.c     |  2 +-
 arch/sh/configs/ecovec24_defconfig            |  2 +-
 arch/sh/mm/Kconfig                            | 17 ++++-----
 arch/sparc/Kconfig                            |  5 +--
 arch/sparc/kernel/pci_sun4v.c                 |  2 +-
 arch/sparc/kernel/traps_64.c                  |  2 +-
 arch/sparc/mm/tsb.c                           |  4 +-
 arch/xtensa/Kconfig                           |  5 +--
 drivers/base/regmap/regmap-debugfs.c          |  8 ++--
 drivers/block/floppy.c                        |  2 +-
 drivers/crypto/ccp/sev-dev.c                  |  2 +-
 drivers/crypto/hisilicon/sgl.c                |  6 +--
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  2 +-
 drivers/gpu/drm/ttm/ttm_pool.c                | 22 +++++------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  2 +-
 drivers/iommu/dma-iommu.c                     |  4 +-
 drivers/irqchip/irq-gic-v3-its.c              |  4 +-
 drivers/md/dm-bufio.c                         |  2 +-
 drivers/misc/genwqe/card_utils.c              |  2 +-
 .../net/ethernet/hisilicon/hns3/hns3_enet.c   |  2 +-
 drivers/net/ethernet/ibm/ibmvnic.h            |  2 +-
 drivers/video/fbdev/hyperv_fb.c               |  4 +-
 drivers/video/fbdev/vermilion/vermilion.c     |  2 +-
 drivers/virtio/virtio_balloon.c               |  2 +-
 drivers/virtio/virtio_mem.c                   | 12 +++---
 fs/ramfs/file-nommu.c                         |  2 +-
 include/drm/ttm/ttm_pool.h                    |  2 +-
 include/linux/hugetlb.h                       |  2 +-
 include/linux/mmzone.h                        | 10 ++---
 include/linux/pageblock-flags.h               |  4 +-
 include/linux/slab.h                          |  6 +--
 kernel/crash_core.c                           |  2 +-
 kernel/dma/pool.c                             |  6 +--
 mm/Kconfig                                    |  6 +--
 mm/compaction.c                               |  8 ++--
 mm/debug_vm_pgtable.c                         |  4 +-
 mm/huge_memory.c                              |  2 +-
 mm/hugetlb.c                                  |  4 +-
 mm/kmsan/init.c                               |  6 +--
 mm/memblock.c                                 |  2 +-
 mm/memory_hotplug.c                           |  4 +-
 mm/page_alloc.c                               | 38 +++++++++----------
 mm/page_isolation.c                           | 12 +++---
 mm/page_owner.c                               |  6 +--
 mm/page_reporting.c                           |  4 +-
 mm/shuffle.h                                  |  2 +-
 mm/slab.c                                     |  2 +-
 mm/slub.c                                     |  4 +-
 mm/vmscan.c                                   |  2 +-
 mm/vmstat.c                                   | 14 +++----
 net/smc/smc_ib.c                              |  2 +-
 security/integrity/ima/ima_crypto.c           |  2 +-
 tools/testing/memblock/linux/mmzone.h         |  6 +--
 80 files changed, 210 insertions(+), 240 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2023-10-17 10:52 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 11:31 [PATCH 00/10] Fix confusion around MAX_ORDER Kirill A. Shutemov
2023-03-15 11:31 ` [PATCH 01/10] sparc/mm: Fix MAX_ORDER usage in tsb_grow() Kirill A. Shutemov
2023-03-16  3:04   ` Mike Kravetz
2023-03-17  8:46     ` Mike Rapoport
2023-03-17  8:35   ` Mike Rapoport
2023-03-21  7:48   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 02/10] um: Fix MAX_ORDER usage in linux_main() Kirill A. Shutemov
2023-03-17  8:49   ` Mike Rapoport
2023-03-21  7:49   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 03/10] floppy: Fix MAX_ORDER usage Kirill A. Shutemov
2023-03-17  8:53   ` Mike Rapoport
2023-03-21  7:53   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 04/10] drm/i915: Fix MAX_ORDER usage in i915_gem_object_get_pages_internal() Kirill A. Shutemov
2023-03-15 14:18   ` Tvrtko Ursulin
2023-03-15 15:28     ` Kirill A. Shutemov
2023-03-15 15:35       ` Tvrtko Ursulin
2023-03-15 15:38         ` Kirill A. Shutemov
2023-03-16  8:55           ` Tvrtko Ursulin
2023-03-21  7:57             ` Vlastimil Babka
2023-03-21  7:55   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 05/10] genwqe: Fix MAX_ORDER usage Kirill A. Shutemov
2023-03-21  7:59   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 06/10] perf/core: Fix MAX_ORDER usage in rb_alloc_aux_page() Kirill A. Shutemov
2023-03-21  8:00   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 07/10] mm/page_reporting: Fix MAX_ORDER usage in page_reporting_register() Kirill A. Shutemov
2023-03-21  8:01   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 08/10] mm/slub: Fix MAX_ORDER usage in calculate_order() Kirill A. Shutemov
2023-03-16 11:18   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 09/10] iommu: Fix MAX_ORDER usage in __iommu_dma_alloc_pages() Kirill A. Shutemov
2023-03-15 12:18   ` Robin Murphy
2023-03-22 12:20     ` Joerg Roedel
2023-03-15 16:07   ` Jacob Pan
2023-03-21  8:05   ` Vlastimil Babka
2023-03-15 11:31 ` [PATCH 10/10] mm, treewide: Redefine MAX_ORDER sanely Kirill A. Shutemov
2023-03-15 15:06   ` kernel test robot
2023-03-15 15:26     ` Kirill A. Shutemov
2023-03-15 15:26   ` kernel test robot
2023-03-15 15:38     ` Kirill A. Shutemov
2023-03-16 17:09   ` Zi Yan
2023-03-16 23:21     ` Kirill A. Shutemov
2023-03-17 13:17       ` Zi Yan
2023-03-16 18:15   ` Mike Kravetz
2023-03-16 23:00     ` Mike Kravetz
2023-03-16 23:30     ` Kirill A. Shutemov
2023-03-17  1:57       ` Vineet Gupta
2023-03-21 11:22   ` Vlastimil Babka
2023-03-22  3:26   ` Michael Ellerman
2023-03-21 16:38 ` [PATCH 00/10] Fix confusion around MAX_ORDER Mel Gorman
2023-03-23 15:03   ` David Laight
2023-09-27 17:11 ` Paolo Bonzini
2023-09-27 17:11   ` [dm-devel] " Paolo Bonzini
2023-09-28  7:50   ` Mikulas Patocka
2023-09-28  7:50     ` [dm-devel] " Mikulas Patocka
2023-09-28 16:57     ` Paolo Bonzini
2023-09-28 16:57       ` [dm-devel] " Paolo Bonzini
2023-10-17 10:46       ` Pavel Machek
2023-10-17 10:46         ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.