linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] Memory hotplug/hotremove at subsection size
@ 2021-05-06 15:26 Zi Yan
  2021-05-06 15:26 ` [RFC PATCH 1/7] mm: sparse: set/clear subsection bitmap when pages are onlined/offlined Zi Yan
                   ` (8 more replies)
  0 siblings, 9 replies; 28+ messages in thread
From: Zi Yan @ 2021-05-06 15:26 UTC (permalink / raw)
  To: David Hildenbrand, Oscar Salvador
  Cc: Michael Ellerman, Benjamin Herrenschmidt, Thomas Gleixner, x86,
	Andy Lutomirski, Rafael J . Wysocki, Andrew Morton,
	Mike Rapoport, Anshuman Khandual, Michal Hocko, Dan Williams,
	Wei Yang, linux-ia64, linux-kernel, linuxppc-dev, linux-mm,
	Zi Yan

From: Zi Yan <ziy@nvidia.com>

Hi all,

This patchset tries to remove the restriction on memory hotplug/hotremove
granularity, which is always greater or equal to memory section size[1].
With the patchset, kernel is able to online/offline memory at a size independent
of memory section size, as small as 2MB (the subsection size).

The motivation is to increase MAX_ORDER of the buddy allocator and pageblock
size without increasing memory hotplug/hotremove granularity at the same time,
so that the kernel can allocator 1GB pages using buddy allocator and utilizes
existing pageblock based anti-fragmentation, paving the road for 1GB THP
support[2].

The patchset utilizes the existing subsection support[3] and changes the
section size alignment checks to subsection size alignment checks. There are
also changes to pageblock code to support partial pageblocks, when pageblock
size is increased along with MAX_ORDER. Increasing pageblock size can enable
kernel to utilize existing anti-fragmentation mechanism for gigantic page
allocations.

The last patch increases SECTION_SIZE_BITS to demonstrate the use of memory
hotplug/hotremove subsection, but is not intended to be merged as is. It is
there in case one wants to try this out and will be removed during the final
submission.

Feel free to give suggestions and comments. I am looking forward to your
feedback.

Thanks.

Zi Yan (7):
  mm: sparse: set/clear subsection bitmap when pages are
    onlined/offlined.
  mm: set pageblock_order to the max of HUGETLB_PAGE_ORDER and
    MAX_ORDER-1
  mm: memory_hotplug: decouple memory_block size with section size.
  mm: pageblock: allow set/unset migratetype for partial pageblock
  mm: memory_hotplug, sparse: enable memory hotplug/hotremove
    subsections
  arch: x86: no MAX_ORDER exceeds SECTION_SIZE check for 32bit vdso.
  [not for merge] mm: increase SECTION_SIZE_BITS to 31

 arch/ia64/Kconfig                |   1 -
 arch/powerpc/Kconfig             |   1 -
 arch/x86/Kconfig                 |  15 +++
 arch/x86/entry/vdso/Makefile     |   1 +
 arch/x86/include/asm/sparsemem.h |   2 +-
 drivers/base/memory.c            | 176 +++++++++++++++----------------
 drivers/base/node.c              |   2 +-
 include/linux/memory.h           |   8 +-
 include/linux/mmzone.h           |   2 +
 include/linux/page-isolation.h   |   8 +-
 include/linux/pageblock-flags.h  |   9 --
 mm/Kconfig                       |   7 --
 mm/memory_hotplug.c              |  22 ++--
 mm/page_alloc.c                  |  40 ++++---
 mm/page_isolation.c              |  30 +++---
 mm/sparse.c                      |  55 ++++++++--
 16 files changed, 219 insertions(+), 160 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-06-14 11:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 15:26 [RFC PATCH 0/7] Memory hotplug/hotremove at subsection size Zi Yan
2021-05-06 15:26 ` [RFC PATCH 1/7] mm: sparse: set/clear subsection bitmap when pages are onlined/offlined Zi Yan
2021-05-06 17:48   ` David Hildenbrand
2021-05-06 19:03     ` Zi Yan
2021-05-06 19:14       ` David Hildenbrand
2021-05-06 15:26 ` [RFC PATCH 2/7] mm: set pageblock_order to the max of HUGETLB_PAGE_ORDER and MAX_ORDER-1 Zi Yan
2021-05-06 15:26 ` [RFC PATCH 3/7] mm: memory_hotplug: decouple memory_block size with section size Zi Yan
2021-05-06 15:26 ` [RFC PATCH 4/7] mm: pageblock: allow set/unset migratetype for partial pageblock Zi Yan
2021-05-06 15:26 ` [RFC PATCH 5/7] mm: memory_hotplug, sparse: enable memory hotplug/hotremove subsections Zi Yan
2021-05-06 15:26 ` [RFC PATCH 6/7] arch: x86: no MAX_ORDER exceeds SECTION_SIZE check for 32bit vdso Zi Yan
2021-05-06 15:26 ` [RFC PATCH 7/7] [not for merge] mm: increase SECTION_SIZE_BITS to 31 Zi Yan
2021-05-06 15:31 ` [RFC PATCH 0/7] Memory hotplug/hotremove at subsection size David Hildenbrand
2021-05-06 15:37   ` Zi Yan
2021-05-06 15:40     ` David Hildenbrand
2021-05-06 15:50       ` Zi Yan
2021-05-06 16:28         ` David Hildenbrand
2021-05-06 18:49           ` Zi Yan
2021-05-06 19:10             ` David Hildenbrand
2021-05-06 19:30               ` Matthew Wilcox
2021-05-06 19:38                 ` David Hildenbrand
2021-05-06 15:38   ` David Hildenbrand
2021-05-07 11:55   ` Michal Hocko
2021-05-07 14:00     ` David Hildenbrand
2021-05-10 14:36       ` Zi Yan
2021-05-12 16:14         ` David Hildenbrand
2021-06-02 15:56         ` Zi Yan
2021-06-14 11:32           ` David Hildenbrand
2021-05-06 15:42 ` Zi Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).