Linux block layer
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Vlastimil Babka <vbabka@kernel.org>, Harry Yoo <harry@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>
Subject: Re: [PATCH 2/3] mm: support fallible mempool_alloc_bulk()
Date: Tue, 11 Aug 2026 14:03:38 -0700	[thread overview]
Message-ID: <20260811210338.GB1905@sol> (raw)
In-Reply-To: <anuCcb-Cma6JOAb0@infradead.org>

On Tue, Aug 11, 2026 at 01:13:37PM -0700, Christoph Hellwig wrote:
> What is actually efficient is do skip the mempool entirely from the
> original submission context and do a non-mempool GFP_NOIO allocation,
> and only in the extremely unlikely case that this fails fall back to
> the rescruer thread.

It definitely is *not* more efficient to fall back to a kworker for a
small task (removing elements from a mempool that has them available)
that could just be done synchronously.  Scheduling overhead is a huge
problem for kernel features doing I/O pre or post-processing.  The idea
that scheduling a kworker is lightweight compared to the actual I/O is
quite outdated.

Sure, this case triggers only when the regular allocations fail anyway.
So it shouldn't be a big deal, and I'll send a patch that implements it
the less efficient way that you prefer.  But it's a little unfortunate
that you're not going to allow it to be implemented properly.

- Eric

  reply	other threads:[~2026-08-11 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 22:10 [PATCH 0/3] Fix a deadlock in blk-crypto-fallback Eric Biggers
2026-08-06 22:10 ` [PATCH 1/3] mm: make mempool_alloc_from_pool() return bool Eric Biggers
2026-08-10 15:59   ` Christoph Hellwig
2026-08-06 22:10 ` [PATCH 2/3] mm: support fallible mempool_alloc_bulk() Eric Biggers
2026-08-10 16:00   ` Christoph Hellwig
2026-08-10 16:14     ` Eric Biggers
2026-08-10 17:21       ` Christoph Hellwig
2026-08-10 18:22         ` Eric Biggers
2026-08-11 20:13           ` Christoph Hellwig
2026-08-11 21:03             ` Eric Biggers [this message]
2026-08-06 22:10 ` [PATCH 3/3] blk-crypto-fallback: Fix deadlock when encrypting large bio in dm layer Eric Biggers

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=20260811210338.GB1905@sol \
    --to=ebiggers@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@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