On Mon 19-08-24 11:44:39, David Hildenbrand wrote:
[...]
> > if (gfp_mask & __GFP_NOFAIL) {
> > /*
> > - * All existing users of the __GFP_NOFAIL are blockable, so warn
> > - * of any new users that actually require GFP_NOWAIT
> > + * All existing users of the __GFP_NOFAIL are blockable
> > + * otherwise we introduce a busy loop with inside the page
> > + * allocator from non-sleepable contexts
> > */
> > - if (WARN_ON_ONCE_GFP(!can_direct_reclaim, gfp_mask))
> > - goto fail;
> > + BUG_ON(!can_direct_reclaim);
>
> No new BUG_ON(), WARN_ON_ONCE() is good enough for something that should be
> found during ordinary testing.
Do you mean
if (WARN_ON_ONCE_GFP(...))
goto retry?
Barry has mentioned that option in the changelog.
--
Michal Hocko
SUSE Labs