From: Bart Van Assche <bvanassche@acm.org>
To: Johannes Thumshirn <jthumshirn@suse.de>, Jens Axboe <axboe@fb.com>
Cc: Linux Block Layer Mailinglist <linux-block@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Jan Kara <jack@suse.cz>, Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH] block: respect virtual boundary mask in bvecs
Date: Tue, 6 Nov 2018 06:53:16 -0800 [thread overview]
Message-ID: <a97f3d77-d23b-b418-abce-2d93ed725bdb@acm.org> (raw)
In-Reply-To: <20181105102301.9752-1-jthumshirn@suse.de>
On 11/5/18 2:23 AM, Johannes Thumshirn wrote:
> @@ -169,7 +169,7 @@ static inline bool biovec_phys_mergeable(struct request_queue *q,
> static inline bool __bvec_gap_to_prev(struct request_queue *q,
> struct bio_vec *bprv, unsigned int offset)
> {
> - return offset ||
> + return (offset & queue_virt_boundary(q)) ||
> ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
> }
How about changing that expression into the following to make it easier
for the compiler to optimize this code?
(offset | (bprv->bv_offset + bprv->bv_len)) & queue_virt_boundary(q)
Thanks,
Bart.
next prev parent reply other threads:[~2018-11-07 0:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 10:23 [PATCH] block: respect virtual boundary mask in bvecs Johannes Thumshirn
2018-11-05 10:55 ` Ming Lei
2018-11-05 11:50 ` Johannes Thumshirn
2018-11-05 12:01 ` Ming Lei
2018-11-06 12:34 ` Johannes Thumshirn
2018-11-06 14:56 ` Ming Lei
2018-11-06 15:14 ` Keith Busch
2018-11-07 3:14 ` Sagi Grimberg
2018-11-07 3:11 ` Sagi Grimberg
2018-11-06 14:31 ` Keith Busch
2018-11-06 14:53 ` Bart Van Assche [this message]
2018-11-06 14:56 ` Johannes Thumshirn
2018-11-07 3:30 ` Sagi Grimberg
2018-11-07 16:10 ` Bart Van Assche
2018-11-08 15:04 ` 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=a97f3d77-d23b-b418-abce-2d93ed725bdb@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@fb.com \
--cc=hare@suse.de \
--cc=jack@suse.cz \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).