Re: [PATCH 2/2] mm: warn about allocations which stall for too long
From: Michal Hocko
Date: Thu Sep 29 2016 - 05:11:01 EST
On Thu 29-09-16 18:02:44, Tetsuo Handa wrote:
[...]
> > @@ -3650,6 +3652,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> > if (order > PAGE_ALLOC_COSTLY_ORDER && !(gfp_mask & __GFP_REPEAT))
> > goto nopage;
> >
> > + /* Make sure we know about allocations which stall for too long */
> > + if (time_after(jiffies, alloc_start + stall_timeout)) {
> > + warn_alloc(gfp_mask,
>
> I expect "gfp_mask & ~__GFP_NOWARN" rather than "gfp_mask" here.
> Otherwise, we can't get a clue for __GFP_NOWARN allocations.
If there is an explicit __GFP_NOWARN then I believe we should obey it
same way we do for the allocation failure. If you believe this is not
the best way then feel free to send a patch with an example where a
__GFP_NOWARN user would really like to see about the stall.
--
Michal Hocko
SUSE Labs