From: Matthew Wilcox <willy@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
Thierry Reding <thierry.reding@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MM: discard __GFP_ATOMIC
Date: Fri, 19 Nov 2021 14:10:18 +0000 [thread overview]
Message-ID: <YZewStgII83phKtA@casper.infradead.org> (raw)
In-Reply-To: <163727727803.13692.15470049610672496362@noble.neil.brown.name>
On Fri, Nov 19, 2021 at 10:14:38AM +1100, NeilBrown wrote:
> On Thu, 18 Nov 2021, Matthew Wilcox wrote:
> > Surely this should be gfpflags_allow_blocking() instead of poking about
> > in the innards of gfp flags?
>
> Possibly. Didn't know about gfpflags_allow_blocking(). From a quick
> grep in the kernel, a whole lot of other people don't know about it
> either, though clearly some do.
>
> Maybe we should reaname "__GFP_DIRECT_RECLAIM" to
> "__GFP_ALLOW_BLOCKING", because that is what most users seems to care
> about.
I tend towards the school of thought that the __GFP flags should make
sense to the implementation and users should use either GFP_ or functions.
When we see users adding or subtracting __GFP flags, that's a problem.
> If not, then we probably want a gfpflags_without_block() function that
> removes that flag, as lots of code wants to do that - and using the flag
> for one, and an inline for the other is not consistent.
It's not a _lot_ of code ...
block/bio.c
drivers/net/ethernet/mellanox/mlx4/icm.c
drivers/vhost/net.c
fs/btrfs/disk-io.c
fs/btrfs/volumes.c
fs/erofs/zdata.c
fs/fscache/cookie.c
fs/fscache/page.c
kernel/cgroup/cgroup.c
net/core/skbuff.c
net/core/sock.c
net/netlink/af_netlink.c
(excluding mm -- if mm wants to meddle with GFP flags, that's fine)
I think a lot of these are probably misguided, eg the filesystems should
probably be using GFP_NOFS to prevent recursion.
next prev parent reply other threads:[~2021-11-19 14:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 4:39 [PATCH] MM: discard __GFP_ATOMIC NeilBrown
2021-11-17 13:18 ` Matthew Wilcox
2021-11-18 23:14 ` NeilBrown
2021-11-19 14:10 ` Matthew Wilcox [this message]
2021-11-20 10:51 ` NeilBrown
2021-11-22 16:54 ` Michal Hocko
2021-11-23 4:15 ` NeilBrown
2021-11-23 14:27 ` Michal Hocko
2021-11-18 9:22 ` Michal Hocko
2021-11-18 13:27 ` Mel Gorman
2021-11-18 23:02 ` NeilBrown
2021-11-22 16:43 ` Michal Hocko
2021-11-23 4:33 ` NeilBrown
2021-11-23 13:41 ` Michal Hocko
2022-04-30 18:30 ` Andrew Morton
2022-05-01 15:45 ` Michal Hocko
2022-09-06 7:35 ` Michal Hocko
2022-09-07 9:47 ` Mel Gorman
2022-10-17 2:38 ` Andrew Morton
2022-10-18 12:11 ` Mel Gorman
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=YZewStgII83phKtA@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=neilb@suse.de \
--cc=thierry.reding@gmail.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).