From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org, tj@kernel.org,
jiangshanlai@gmail.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH, RFC] block: set noio context in submit_bio_noacct_nocheck
Date: Thu, 25 Jan 2024 09:09:44 -0700 [thread overview]
Message-ID: <07de550c-2048-4b2f-8127-e20de352ffde@kernel.dk> (raw)
In-Reply-To: <20240125081050.GA21006@lst.de>
On 1/25/24 1:10 AM, Christoph Hellwig wrote:
> On Wed, Jan 24, 2024 at 08:40:28AM -0700, Jens Axboe wrote:
>> On 1/24/24 2:39 AM, Christoph Hellwig wrote:
>>> Make sure all in-line block layer submission runs in noio reclaim
>>> context. This is a big step towards allowing GFP_NOIO, the other
>>> one would be to have noio (and nofs for that matter) workqueues for
>>> kblockd and driver internal workqueues.
>>
>> I really don't like adding this for no good reason. Who's doing non NOIO
>> allocations down from this path?
>
> If there is a non-NOIO allocation right now that would be a bug,
> although I would not be surprised if we had a few of them.
>
> The reason to add this is a different one: The MM folks want to
> get rid of GFP_NOIO and GFP_NOFS and replace them by these context.
>
> And doing this in the submission path and kblockd will cover almost
> all of the noio context, with the rest probably covered by other
> workqueues. And this feels a lot less error prone than requiring
> every driver to annotate the context in their submission routines.
I think it'd be much better to add a DEBUG protected aid that checks for
violating allocations. Nothing that isn't buggy should trigger this,
right now, and then we could catch problems if there are any. If we do
the save/restore there and call it good, then we're going to be stuck
with that forever. Regardless of whether it's actually needed or not.
--
Jens Axboe
next prev parent reply other threads:[~2024-01-25 16:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240124093941.2259199-1-hch@lst.de>
[not found] ` <be690355-03c6-42e2-a13f-b593ad1c0edd@kernel.dk>
2024-01-25 8:10 ` Christoph Hellwig
2024-01-25 16:09 ` Jens Axboe [this message]
2024-01-25 16:11 ` Matthew Wilcox
2024-01-25 16:13 ` Jens Axboe
2024-01-26 13:52 ` Christoph Hellwig
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=07de550c-2048-4b2f-8127-e20de352ffde@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jiangshanlai@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.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