Re: [PATCH] mm/page_alloc: Don't fail costly __GFP_NOFAIL allocations.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 21-11-16 20:16:40, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > On Thu 17-11-16 21:50:04, Tetsuo Handa wrote:
> > > Filesystem code might request costly __GFP_NOFAIL !__GFP_REPEAT GFP_NOFS
> > > allocations. But commit 0a0337e0d1d13446 ("mm, oom: rework oom detection")
> > > overlooked that __GFP_NOFAIL allocation requests need to invoke the OOM
> > > killer and retry even if order > PAGE_ALLOC_COSTLY_ORDER && !__GFP_REPEAT.
> > > The caller will crash if such allocation request failed.
> >
> > Could you point to such an allocation request please? Costly GFP_NOFAIL
> > requests are a really high requirement and I am even not sure we should
> > support them. buffered_rmqueue already warns about order > 1 NOFAIL
> > allocations.
> 
> That question is pointless. You are simply lucky that you see only order 0 or
> order 1. There are many __GFP_NOFAIL allocations where order is determined at
> runtime. There is no guarantee that order 2 and above never happens.

You are pushing to the extreme again! Your changelog stated this might
be an existing and the real life problem and that is the reason I've
asked. Especially because you have marked the patch for stable. As I've
said in my previous response. Your patch looks correct, I am just not
entirely happy to clutter the code path even more for GFP_NOFAIL for
something we maybe even do not support. All the checks we have there are
head spinning already.

So we have two options, either we have real users of GFP_NOFAIL for
costly orders and handle that properly with all that information in the
changelog or simply rely on the warning and fix callers who do that
accidentally. But please stop this, theoretically something might do
$THIS_RANDOM_GFP_FLAGS + order combination and we absolutely must handle
that in the allocator.

Thanks!
-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]