public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Cc: Yi Zhang <yi.zhang@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Ye Bin <yebin10@huawei.com>
Subject: Re: [PATCH] block: check bio alignment in blk_mq_submit_bio
Date: Wed, 19 Jun 2024 09:50:38 +0200	[thread overview]
Message-ID: <69d3bca7-0bdb-43cc-9181-a733ec495810@suse.de> (raw)
In-Reply-To: <20240619033443.3017568-1-ming.lei@redhat.com>

On 6/19/24 05:34, Ming Lei wrote:
> IO logical block size is one fundamental queue limit, and every IO has
> to be aligned with logical block size because our bio split can't deal
> with unaligned bio.
> 
> The check has to be done with queue usage counter grabbed because device
> reconfiguration may change logical block size, and we can prevent the
> reconfiguration from happening by holding queue usage counter.
> 
> logical_block_size stays in the 1st cache line of queue_limits, and this
> cache line is always fetched in fast path via bio_may_exceed_limits(),
> so IO perf won't be affected by this check.
> 
> Cc: Yi Zhang <yi.zhang@redhat.com>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Ye Bin <yebin10@huawei.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
>   block/blk-mq.c | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
Is this still an issue after the atomic queue limits patchset from 
Christoph?
One of the changes there is that we now always freeze the queue before
changing any limits.
So really this check should never trigger.

Hmm?

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


  parent reply	other threads:[~2024-06-19  7:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  3:34 [PATCH] block: check bio alignment in blk_mq_submit_bio Ming Lei
2024-06-19  4:14 ` Damien Le Moal
2024-06-19  4:22   ` Damien Le Moal
2024-06-19  7:33     ` Christoph Hellwig
2024-06-19  7:58       ` Ming Lei
2024-06-19  8:06         ` Christoph Hellwig
2024-06-19  8:29           ` Ming Lei
2024-06-19  7:56   ` Ming Lei
2024-06-19  8:05     ` Christoph Hellwig
2024-06-19  8:37       ` Ming Lei
2024-06-19  7:50 ` Hannes Reinecke [this message]
2024-06-19  8:02   ` Ming Lei

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=69d3bca7-0bdb-43cc-9181-a733ec495810@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yebin10@huawei.com \
    --cc=yi.zhang@redhat.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