summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-23 09:13:11 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-23 09:13:11 -1000
commit2ee2475e15b4ff8fda89a9edcb77dfd871de1386 (patch)
tree36b481233e66ff1c92891d91a7bf7344a6a744bd /drivers
parentc5fd5e67c7812bc40cd897422c1e0d6dd9ed1e2e (diff)
parent07ae95d933b84db98696f23e24de078b251561ff (diff)
downloadlinux-2ee2475e15b4ff8fda89a9edcb77dfd871de1386.tar.gz
linux-2ee2475e15b4ff8fda89a9edcb77dfd871de1386.zip
Merge tag 'mm-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core
Pull core memory management updates from David Hildenbrand: "This includes updates to: - MEMHP (Memory Hotplug) - GUP (Get User Pages) The main change is: - Reduce zone contiguity checking overhead during memory hot(un)plug (Yuan Liu) Other changes include smaller fixes along with various cleanups" * tag 'mm-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core: mm/memory_hotplug: fix missing rollback in __add_pages() mm/memory_hotplug: optimize zone contiguous check when changing pfn range mm/memory_hotplug: make shrink_zone_span() more robust mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() mm/gup_test: report actual pinned bytes mm/gup_test: safely calculate GUP batch size mm: gup: cleanup the gup_fast_*() call chain mm: gup: move pmd_protnone() into gup_fast_pmd_leaf()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/memory.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 5eead3346f1e..28f9503f6a71 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -255,6 +255,7 @@ static int memory_block_online(struct memory_block *mem)
nr_vmemmap_pages = mem->altmap->free;
mem_hotplug_begin();
+ clear_zone_contiguous(zone);
if (nr_vmemmap_pages) {
ret = mhp_init_memmap_on_memory(start_pfn, nr_vmemmap_pages, zone);
if (ret)
@@ -279,6 +280,7 @@ static int memory_block_online(struct memory_block *mem)
mem->zone = zone;
out:
+ set_zone_contiguous(zone);
mem_hotplug_done();
return ret;
}
@@ -304,6 +306,7 @@ static int memory_block_offline(struct memory_block *mem)
nr_vmemmap_pages = mem->altmap->free;
mem_hotplug_begin();
+ clear_zone_contiguous(mem->zone);
if (nr_vmemmap_pages)
adjust_present_page_count(pfn_to_page(start_pfn), mem->group,
-nr_vmemmap_pages);
@@ -321,8 +324,10 @@ static int memory_block_offline(struct memory_block *mem)
if (nr_vmemmap_pages)
mhp_deinit_memmap_on_memory(start_pfn, nr_vmemmap_pages);
- mem->zone = NULL;
out:
+ set_zone_contiguous(mem->zone);
+ if (!ret)
+ mem->zone = NULL;
mem_hotplug_done();
return ret;
}