Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-29 Thread Michal Hocko
On Tue 27-09-16 21:57:26, Tetsuo Handa wrote: > Michal Hocko wrote: > > > > > ) rather than by line number, and surround __warn_memalloc_stall() > > > > > call with > > > > > mutex in order to serialize warning messages because it is possible > > > > > that > > > > > multiple allocation requests

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-27 Thread Tetsuo Handa
Michal Hocko wrote: > > > > ) rather than by line number, and surround __warn_memalloc_stall() call > > > > with > > > > mutex in order to serialize warning messages because it is possible that > > > > multiple allocation requests are stalling? > > > > > > we do not use any lock in warn_alloc_fai

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-26 Thread Michal Hocko
On Sat 24-09-16 12:00:07, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Fri 23-09-16 23:36:22, Tetsuo Handa wrote: > > > Michal Hocko wrote: > > > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned > > > > int order, > > > > else > > > > no_progress

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-26 Thread Michal Hocko
On Fri 23-09-16 10:34:01, Dave Hansen wrote: > On 09/23/2016 01:15 AM, Michal Hocko wrote: > > + /* Make sure we know about allocations which stall for too long */ > > + if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + > > stall_timeout)) { > > + pr_warn("%s: page

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-26 Thread Michal Hocko
On Sat 24-09-16 23:19:04, Balbir Singh wrote: > > > On 24/09/16 03:34, Dave Hansen wrote: > > On 09/23/2016 01:15 AM, Michal Hocko wrote: > >> + /* Make sure we know about allocations which stall for too long */ > >> + if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + > >> st

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-24 Thread Balbir Singh
On 24/09/16 03:34, Dave Hansen wrote: > On 09/23/2016 01:15 AM, Michal Hocko wrote: >> +/* Make sure we know about allocations which stall for too long */ >> +if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + >> stall_timeout)) { >> +pr_warn("%s: page alloct

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Tetsuo Handa
Michal Hocko wrote: > On Fri 23-09-16 23:36:22, Tetsuo Handa wrote: > > Michal Hocko wrote: > > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned > > > int order, > > > else > > > no_progress_loops++; > > > > > > + /* Make sure we know about allocations which s

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Dave Hansen
On 09/23/2016 01:15 AM, Michal Hocko wrote: > + /* Make sure we know about allocations which stall for too long */ > + if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + > stall_timeout)) { > + pr_warn("%s: page alloction stalls for %ums: order:%u > mode:%#x(%

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Michal Hocko
On Fri 23-09-16 23:36:22, Tetsuo Handa wrote: > Michal Hocko wrote: > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int > > order, > > else > > no_progress_loops++; > > > > + /* Make sure we know about allocations which stall for too long */ > > + i

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Tetsuo Handa
Michal Hocko wrote: > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int > order, > else > no_progress_loops++; > > + /* Make sure we know about allocations which stall for too long */ > + if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, a

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Michal Hocko
On Fri 23-09-16 16:44:26, Hillf Danton wrote: > On Friday, September 23, 2016 4:32 PM, Michal Hocko wrote > > On Fri 23-09-16 16:29:36, Hillf Danton wrote: > > [...] > > > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned > > > > int order, > > > > else > > > >

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Hillf Danton
On Friday, September 23, 2016 4:32 PM, Michal Hocko wrote > On Fri 23-09-16 16:29:36, Hillf Danton wrote: > [...] > > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned > > > int order, > > > else > > > no_progress_loops++; > > > > > > + /* Make sure we know about

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Hillf Danton
> > From: Michal Hocko > > Currently we do warn only about allocation failures but small > allocations are basically nofail and they might loop in the page > allocator for a long time. Especially when the reclaim cannot make > any progress - e.g. GFP_NOFS cannot invoke the oom killer and rely o

Re: [PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Michal Hocko
On Fri 23-09-16 16:29:36, Hillf Danton wrote: [...] > > @@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int > > order, > > else > > no_progress_loops++; > > > > + /* Make sure we know about allocations which stall for too long */ > > + if (!(gfp_mask & _

[PATCH] mm: warn about allocations which stall for too long

2016-09-23 Thread Michal Hocko
From: Michal Hocko Currently we do warn only about allocation failures but small allocations are basically nofail and they might loop in the page allocator for a long time. Especially when the reclaim cannot make any progress - e.g. GFP_NOFS cannot invoke the oom killer and rely on a different c