Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1566880
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. |
| Date | 2017-01-25 20:30 +0100 |
| Message-ID | <t3Bqy-5Sh-21@gated-at.bofh.it> (permalink) |
| References | <sApUd-2oD-1@gated-at.bofh.it> <t3AkO-5aQ-37@gated-at.bofh.it> <t3ANQ-5lu-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 25, 2017 at 07:45:49PM +0100, Michal Hocko wrote: > On Wed 25-01-17 13:11:50, Johannes Weiner wrote: > [...] > > >From 6420cae52cac8167bd5fb19f45feed2d540bc11d Mon Sep 17 00:00:00 2001 > > From: Johannes Weiner <hannes@cmpxchg.org> > > Date: Wed, 25 Jan 2017 12:57:20 -0500 > > Subject: [PATCH] mm: page_alloc: __GFP_NOWARN shouldn't suppress stall > > warnings > > > > __GFP_NOWARN, which is usually added to avoid warnings from callsites > > that expect to fail and have fallbacks, currently also suppresses > > allocation stall warnings. These trigger when an allocation is stuck > > inside the allocator for 10 seconds or longer. > > > > But there is no class of allocations that can get legitimately stuck > > in the allocator for this long. This always indicates a problem. > > > > Always emit stall warnings. Restrict __GFP_NOWARN to alloc failures. > > Tetsuo has already suggested something like this and I didn't really > like it because it makes the semantic of the flag confusing. The mask > says to not warn while the kernel log might contain an allocation splat. > You are right that stalling for 10s seconds means a problem on its own > but on the other hand I can imagine somebody might really want to have > clean logs and the last thing we want is to have another gfp flag for > that purpose. I don't think it's confusing. __GFP_NOWARN tells the allocator whether an allocation failure can be handled or whether it constitutes a bug. If we agree that stalling for 10s is a bug, then we should emit the warnings. Tying this to whether the caller can handle an allocation failure is non-sensical. Not warning about a bug because the user would prefer clean logs is... somewhat out there.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Johannes Weiner <hannes@cmpxchg.org> - 2017-01-25 19:20 +0100
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Michal Hocko <mhocko@kernel.org> - 2017-01-25 19:50 +0100
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Johannes Weiner <hannes@cmpxchg.org> - 2017-01-25 20:30 +0100
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Michal Hocko <mhocko@kernel.org> - 2017-01-26 09:00 +0100
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-01-26 11:30 +0100
Re: [PATCH v6] mm: Add memory allocation watchdog kernel thread. Minchan Kim <minchan@kernel.org> - 2017-01-26 00:50 +0100
csiph-web