Re: [PATCH] mm, page_alloc: Remove debug_guardpage_minorder() test in warn_alloc().

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

 



Michal Hocko wrote:
> On Wed 12-04-17 21:14:10, Tetsuo Handa wrote:
> > Stanislaw Gruszka wrote:
> > > On Wed, Apr 12, 2017 at 01:35:28PM +0200, Michal Hocko wrote:
> > > > OK, I see. That is a rather weird feature and the naming is more than
> > > > surprising. But put that aside. Then it means that the check should be
> > > > pulled out to 
> > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > > > index 6632256ef170..1e5f3b5cdb87 100644
> > > > --- a/mm/page_alloc.c
> > > > +++ b/mm/page_alloc.c
> > > > @@ -3941,7 +3941,8 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> > > >  		goto retry;
> > > >  	}
> > > >  fail:
> > > > -	warn_alloc(gfp_mask, ac->nodemask,
> > > > +	if (!debug_guardpage_minorder())
> > > > +		warn_alloc(gfp_mask, ac->nodemask,
> > > >  			"page allocation failure: order:%u", order);
> > > >  got_pg:
> > > >  	return page;
> > > 
> > > Looks good to me assuming it will be applied on top of Tetsuo's patch.
> > > 
> > > Reviewed-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
> > > 
> > 
> > There are two warn_alloc() usages in mm/vmalloc.c which the check should be
> > pulled out.
> 
> Do we actually care about vmalloc for this?

Does it make sense not to apply debug_guardpage_minorder() > 0 test when
kmalloc() path in kvmalloc() failed due to out of available pages and
vmalloc() fallback path again failed due to out of available pages?

If the purpose of debug_guardpage_minorder() > 0 test is to prevent from flooding
allocation failure messages, why not to treat kmalloc()/vmalloc() evenly?

Yes, we might think it is better to print allocation failure messages if memory is
tight enough to even vmalloc() fails. But this patch's intention is to make sure
that allocation stall messages are not disabled by debug_guardpage_minorder() > 0
test. I guess this patch should not change behavior of allocation failure messages.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux