From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Viacheslav Dubeyko <slava@dubeyko.com>,
Matthew Wilcox <willy@infradead.org>
Cc: lsf-pc@lists.linux-foundation.org,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
linux-mm@kvack.org, linux-block@vger.kernel.org,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-nvme@lists.infradead.org
Subject: Re: [LSF/MM/BPF TOPIC] Removing GFP_NOFS
Date: Fri, 5 Jan 2024 15:35:45 +0100 [thread overview]
Message-ID: <4101c577-91f9-40c2-9244-5a08dec4523a@kernel.org> (raw)
In-Reply-To: <2EEB5F76-1D68-4B17-82B6-4A459D91E4BF@dubeyko.com>
On 1/5/24 11:13, Viacheslav Dubeyko wrote:
>
>> On Jan 5, 2024, at 12:17 AM, Matthew Wilcox <willy@infradead.org> wrote:
>>
>> The memalloc_nofs APIs were introduced in May 2017, but we still have
>> over 1000 uses of GFP_NOFS in fs/ today (and 200 outside fs/, which is
>> really sad). This session is for filesystem developers to talk about
>> what they need to do to fix up their own filesystem, or share stories
>> about how they made their filesystem better by adopting the new APIs.
>>
>
> Many file systems are still heavily using GFP_NOFS for kmalloc and
> kmem_cache_alloc family methods even if memalloc_nofs_save() and
> memalloc_nofs_restore() pair is used too. But I can see that GFP_NOFS
Yes it should be enough to rely on memalloc_nofs_save() for
kmalloc/kmem_cache_alloc. The kmalloc layer doesnt't care about it, and once
it's run out of available slab folios and calls into the page allocator for
a new one, it evaluates the effect of memalloc_nofs_save() as expected.
> is used in radix_tree_preload(), bio_alloc(), posix_acl_clone(),
> sb_issue_zeroout, sb_issue_discard(), alloc_inode_sb(), blkdev_issue_zeroout(),
> blkdev_issue_secure_erase(), blkdev_zone_mgmt(), etc.
>
> Would it be safe to switch on memalloc_nofs_save()/memalloc_nofs_restore() for
> all possible cases? Any potential issues or downsides?
>
> Thanks,
> Slava.
>
>
next prev parent reply other threads:[~2024-01-05 14:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 21:17 [LSF/MM/BPF TOPIC] Removing GFP_NOFS Matthew Wilcox
2024-01-05 10:13 ` Viacheslav Dubeyko
2024-01-05 10:26 ` [Lsf-pc] " Jan Kara
2024-01-05 14:17 ` Viacheslav Dubeyko
2024-01-05 14:35 ` Vlastimil Babka (SUSE) [this message]
2024-01-05 10:57 ` Jan Kara
2024-01-08 11:47 ` Johannes Thumshirn
2024-01-08 17:39 ` David Sterba
2024-01-09 7:43 ` Johannes Thumshirn
2024-01-09 22:23 ` Dave Chinner
2024-01-09 15:47 ` Luis Henriques
2024-01-09 18:04 ` Johannes Thumshirn
2024-01-08 6:39 ` Dave Chinner
2024-01-09 4:47 ` Dave Chinner
2024-02-08 16:02 ` Vlastimil Babka (SUSE)
2024-02-08 17:33 ` Michal Hocko
2024-02-08 19:55 ` Vlastimil Babka (SUSE)
2024-02-08 22:45 ` Kent Overstreet
2024-02-12 1:20 ` Dave Chinner
2024-02-12 2:06 ` Kent Overstreet
2024-02-12 4:35 ` Dave Chinner
2024-02-12 19:30 ` Kent Overstreet
2024-02-12 22:07 ` Dave Chinner
2024-01-09 22:44 ` Dave Chinner
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=4101c577-91f9-40c2-9244-5a08dec4523a@kernel.org \
--to=vbabka@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=slava@dubeyko.com \
--cc=willy@infradead.org \
/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).