[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMt2EUYD75Wqz1p6@MiWiFi-R3L-srv>
Date: Thu, 18 Sep 2025 11:01:37 +0800
From: Baoquan He <bhe@...hat.com>
To: "Uladzislau Rezki (Sony)" <urezki@...il.com>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v2 06/10] mm/vmalloc: Handle non-blocking GFP in
__vmalloc_area_node()
On 09/15/25 at 03:40pm, Uladzislau Rezki (Sony) wrote:
> 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.
>
> Acked-by: Michal Hocko <mhocko@...e.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> ---
> include/linux/vmalloc.h | 2 ++
> mm/vmalloc.c | 52 +++++++++++++++++++++++++++++++++--------
> 2 files changed, 44 insertions(+), 10 deletions(-)
Reviewed-by: Baoquan He <bhe@...hat.com>
Powered by blists - more mailing lists