Re: [PATCH 3/8] mm/vmalloc: Support non-blocking GFP flags in alloc_vmap_area()

From: Uladzislau Rezki
Date: Fri Aug 08 2025 - 06:00:22 EST


On Thu, Aug 07, 2025 at 01:20:54PM +0200, Michal Hocko wrote:
> On Thu 07-08-25 09:58:05, Uladzislau Rezki wrote:
> > alloc_vmap_area() currently assumes that sleeping is allowed during
> > allocation. This is not true for callers which pass non-blocking
> > GFP flags, such as GFP_ATOMIC or GFP_NOWAIT.
>
> Those are currently not allowed so it would be better to mention this is
> a preparation for those to _be_ supported later in the series.
>
> > This patch adds logic to detect whether the given gfp_mask permits
> > blocking. It avoids invoking might_sleep() or falling back to reclaim
> > path if blocking is not allowed.
> >
> > This makes alloc_vmap_area() safer for use in non-sleeping contexts,
> > where previously it could hit unexpected sleeps, trigger warnings.
> >
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
>
> With the changelog clarified
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> Thanks!
>
Thank you! Added in the end:

It is a preparation and adjustment step to later allow both GFP_ATOMIC
and GFP_NOWAIT allocations in this series.

--
Uladzislau Rezki