From: Vlastimil Babka <vbabka@suse.cz> To: Mikulas Patocka <mpatocka@redhat.com>, Michal Hocko <mhocko@kernel.org> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mgorman@suse.de>, Dave Hansen <dave.hansen@intel.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: respect the __GFP_NOWARN flag when warning about stalls Date: Tue, 12 Sep 2017 09:14:05 +0200 [thread overview] Message-ID: <d677d23a-9b1d-e3fd-9ff2-bac8cccfb200@suse.cz> (raw) In-Reply-To: <alpine.LRH.2.02.1709111926480.31898@file01.intranet.prod.int.rdu2.redhat.com> On 09/12/2017 01:36 AM, Mikulas Patocka wrote: > > > On Mon, 11 Sep 2017, Michal Hocko wrote: > >> On Mon 11-09-17 02:52:53, Mikulas Patocka wrote: >> >> This patch hasn't introduced this behavior. It deliberately skipped >> warning on __GFP_NOWARN. This has been introduced later by 822519634142 >> ("mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings"). I >> disagreed [1] but overall consensus was that such a warning won't be >> harmful. Could you be more specific why do you consider it wrong, >> please? > > I consider the warning wrong, because it warns when nothing goes wrong. > I've got 7 these warnings for 4 weeks of uptime. The warnings typically > happen when I run some compilation. > > A process with low priority is expected to be running slowly when there's > some high-priority process, so there's no need to warn that the > low-priority process runs slowly. > > What else can be done to avoid the warning? Skip the warning if the > process has lower priority? We would have to consider (instead of jiffies) the time the process was either running, or waiting on something that's related to memory allocation/reclaim (page lock etc.). I.e. deduct the time the process was runable but there was no available cpu. I expect however that such level of detail wouldn't be feasible here, though? Vlastimil > Mikulas > >> [1] http://lkml.kernel.org/r/20170125184548.GB32041@dhcp22.suse.cz >> >>> >>> --- >>> mm/page_alloc.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> Index: linux-2.6/mm/page_alloc.c >>> =================================================================== >>> --- linux-2.6.orig/mm/page_alloc.c >>> +++ linux-2.6/mm/page_alloc.c >>> @@ -3923,7 +3923,7 @@ retry: >>> >>> /* Make sure we know about allocations which stall for too long */ >>> if (time_after(jiffies, alloc_start + stall_timeout)) { >>> - warn_alloc(gfp_mask & ~__GFP_NOWARN, ac->nodemask, >>> + warn_alloc(gfp_mask, ac->nodemask, >>> "page allocation stalls for %ums, order:%u", >>> jiffies_to_msecs(jiffies-alloc_start), order); >>> stall_timeout += 10 * HZ; >> >> -- >> Michal Hocko >> SUSE Labs >>
WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz> To: Mikulas Patocka <mpatocka@redhat.com>, Michal Hocko <mhocko@kernel.org> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mgorman@suse.de>, Dave Hansen <dave.hansen@intel.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: respect the __GFP_NOWARN flag when warning about stalls Date: Tue, 12 Sep 2017 09:14:05 +0200 [thread overview] Message-ID: <d677d23a-9b1d-e3fd-9ff2-bac8cccfb200@suse.cz> (raw) In-Reply-To: <alpine.LRH.2.02.1709111926480.31898@file01.intranet.prod.int.rdu2.redhat.com> On 09/12/2017 01:36 AM, Mikulas Patocka wrote: > > > On Mon, 11 Sep 2017, Michal Hocko wrote: > >> On Mon 11-09-17 02:52:53, Mikulas Patocka wrote: >> >> This patch hasn't introduced this behavior. It deliberately skipped >> warning on __GFP_NOWARN. This has been introduced later by 822519634142 >> ("mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings"). I >> disagreed [1] but overall consensus was that such a warning won't be >> harmful. Could you be more specific why do you consider it wrong, >> please? > > I consider the warning wrong, because it warns when nothing goes wrong. > I've got 7 these warnings for 4 weeks of uptime. The warnings typically > happen when I run some compilation. > > A process with low priority is expected to be running slowly when there's > some high-priority process, so there's no need to warn that the > low-priority process runs slowly. > > What else can be done to avoid the warning? Skip the warning if the > process has lower priority? We would have to consider (instead of jiffies) the time the process was either running, or waiting on something that's related to memory allocation/reclaim (page lock etc.). I.e. deduct the time the process was runable but there was no available cpu. I expect however that such level of detail wouldn't be feasible here, though? Vlastimil > Mikulas > >> [1] http://lkml.kernel.org/r/20170125184548.GB32041@dhcp22.suse.cz >> >>> >>> --- >>> mm/page_alloc.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> Index: linux-2.6/mm/page_alloc.c >>> =================================================================== >>> --- linux-2.6.orig/mm/page_alloc.c >>> +++ linux-2.6/mm/page_alloc.c >>> @@ -3923,7 +3923,7 @@ retry: >>> >>> /* Make sure we know about allocations which stall for too long */ >>> if (time_after(jiffies, alloc_start + stall_timeout)) { >>> - warn_alloc(gfp_mask & ~__GFP_NOWARN, ac->nodemask, >>> + warn_alloc(gfp_mask, ac->nodemask, >>> "page allocation stalls for %ums, order:%u", >>> jiffies_to_msecs(jiffies-alloc_start), order); >>> stall_timeout += 10 * HZ; >> >> -- >> Michal Hocko >> SUSE Labs >> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-09-12 7:15 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-09-11 6:52 [PATCH] mm: respect the __GFP_NOWARN flag when warning about stalls Mikulas Patocka 2017-09-11 6:52 ` Mikulas Patocka 2017-09-11 8:26 ` Michal Hocko 2017-09-11 8:26 ` Michal Hocko 2017-09-11 23:36 ` Mikulas Patocka 2017-09-11 23:36 ` Mikulas Patocka 2017-09-12 7:14 ` Vlastimil Babka [this message] 2017-09-12 7:14 ` Vlastimil Babka 2017-09-13 14:52 ` Shakeel Butt 2017-09-13 14:52 ` Shakeel Butt 2017-09-13 11:54 ` Michal Hocko 2017-09-13 11:54 ` Michal Hocko 2017-09-13 13:54 ` Tetsuo Handa 2017-09-13 13:54 ` Tetsuo Handa 2017-09-13 14:03 ` Vlastimil Babka 2017-09-13 14:03 ` Vlastimil Babka 2017-09-13 14:14 ` Tetsuo Handa 2017-09-13 14:14 ` Tetsuo Handa 2017-09-13 14:35 ` Michal Hocko 2017-09-13 14:35 ` Michal Hocko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d677d23a-9b1d-e3fd-9ff2-bac8cccfb200@suse.cz \ --to=vbabka@suse.cz \ --cc=akpm@linux-foundation.org \ --cc=dave.hansen@intel.com \ --cc=hannes@cmpxchg.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mgorman@suse.de \ --cc=mhocko@kernel.org \ --cc=mpatocka@redhat.com \ --cc=penguin-kernel@I-love.SAKURA.ne.jp \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.