Linux block layer
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: hmi.jeon@samsung.com, "hch@infradead.org" <hch@infradead.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: 정재웅 <jaew.jung@samsung.com>
Subject: Re: [PATCH v3] blk-mq: scope the no-sleep requirement in blk_mq_alloc_request_hctx()
Date: Wed, 25 Nov 2026 09:11:01 +0100	[thread overview]
Message-ID: <562f7e29-5613-41fd-be2b-960aaa8b10ec@suse.de> (raw)
In-Reply-To: <20261125073914epcms2p653a329ef9213d5a9e2f74ec5401a3018@epcms2p6>

On 11/25/26 8:39 AM, 전민식 wrote:
> BLK_MQ_REQ_NOWAIT is mandatory in blk_mq_alloc_request_hctx() only to
> keep blk_mq_get_tag() from re-picking data->hctx after io_schedule().
> But the same flags value is passed on to blk_queue_enter(), so a caller
> also takes -EAGAIN for a transient freeze that has no bearing on hctx
> selection. There is no way to ask for the hctx guarantee without also
> opting out of waiting.
> 
> Force BLK_MQ_REQ_NOWAIT on the tag allocation alone, right before
> blk_mq_get_tag(), and let blk_queue_enter() honour the caller's flags.
> nr_hw_queues/queue_hw_ctx and alloc_time_ns move after blk_queue_enter()
> now that it can sleep through such an update.
> 
> Co-authored-by: Jaewoong Jung <jaew.jung@samsung.com>
> Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
> Changes since v2:
> - resend only; the v2 mail had the patch headers pasted into the message
>    body. No changes to the code or the commit message.
>   block/blk-mq.c | 40 ++++++++++++++++++++++++++--------------
>   1 file changed, 26 insertions(+), 14 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@kernel.org>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

      reply	other threads:[~2026-11-25  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261125073914epcms2p653a329ef9213d5a9e2f74ec5401a3018@epcms2p6>
2026-11-25  7:39 ` [PATCH v3] blk-mq: scope the no-sleep requirement in blk_mq_alloc_request_hctx() 전민식
2026-11-25  8:11   ` Hannes Reinecke [this message]

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=562f7e29-5613-41fd-be2b-960aaa8b10ec@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=hmi.jeon@samsung.com \
    --cc=jaew.jung@samsung.com \
    --cc=linux-block@vger.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