From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Damien Le Moal <dlemoal@kernel.org>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>,
Ye Bin <yebin10@huawei.com>
Subject: Re: [PATCH] block: check bio alignment in blk_mq_submit_bio
Date: Wed, 19 Jun 2024 01:06:32 -0700 [thread overview]
Message-ID: <ZnKRiG0PKxPzQrcb@infradead.org> (raw)
In-Reply-To: <ZnKPrYI72g2iT/rV@fedora>
On Wed, Jun 19, 2024 at 03:58:37PM +0800, Ming Lei wrote:
> > > unsigned int bs_mask = queue_logical_block_size(q) - 1;
> >
> > Please avoid use of the queue helpers. This should be:
> >
> > unsigned int bs_mask = bdev_logical_block_size(bio->bi_bdev);
>
> It is one blk-mq internal helper, I think queue helper is more
> efficient since it is definitely in fast path.
Does it actually generate different code for you with all the inlining
modern compilers do?
next prev parent reply other threads:[~2024-06-19 8:06 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 [this message]
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
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=ZnKRiG0PKxPzQrcb@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.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