Skip to contentSkip to conversation

mm-vmalloc-handle-non-blocking-gfp-in-__vmalloc_area_node.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 17, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/vmalloc: handle non-blocking GFP in __vmalloc_area_node()
has been removed from the -mm tree. Its filename was
mm-vmalloc-handle-non-blocking-gfp-in-__vmalloc_area_node.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Uladzislau Rezki (Sony)" <[email protected]>
Subject: mm/vmalloc: handle non-blocking GFP in __vmalloc_area_node()
Date: Tue, 7 Oct 2025 14:20:30 +0200

Make __vmalloc_area_node() respect non-blocking GFP masks such as GFP_ATOMIC and GFP_NOWAIT.

- Add memalloc_apply_gfp_scope()/memalloc_restore_scope() helpers to apply a proper scope.
- Apply memalloc_apply_gfp_scope()/memalloc_restore_scope() around vmap_pages_range() for page table setup.
- Set "nofail" to false if a non-blocking mask is used, as they are mutually exclusive.

This is particularly important for page table allocations that internally use GFP_PGTABLE_KERNEL, which may sleep unless such scope restrictions are applied. For example:

<snip>
__pte_alloc_kernel()

  pte_alloc_one_kernel(&init_mm);
    pagetable_alloc_noprof(GFP_PGTABLE_KERNEL & ~__GFP_HIGHMEM, 0);

<snip>

Note: in most cases, PTE entries are established only up to the level required by current vmap space usage, meaning the page tables are typically fully populated during the mapping process.

---

 include/linux/vmalloc.h |    2 +
 mm/vmalloc.c            |   52 ++++++++++++++++++++++++++++++--------
 2 files changed, 44 insertions(+), 10 deletions(-)
include/linux/vmalloc.h renamed from include/linux/vmalloc.h~mm-vmalloc-handle-non-blocking-gfp-in-__vmalloc_area_node +2 -0
@@ -332,4 +332,6 @@ bool vmalloc_dump_obj(void *object);
 static inline bool vmalloc_dump_obj(void *object) { return false; }
 #endif
 
+unsigned int memalloc_apply_gfp_scope(gfp_t gfp_mask);
+void memalloc_restore_scope(unsigned int flags);
 #endif /* _LINUX_VMALLOC_H */
mm/vmalloc.c renamed from mm/vmalloc.c~mm-vmalloc-handle-non-blocking-gfp-in-__vmalloc_area_node +42 -10

76 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are