* [PATCH v2] block: respect virtual boundary mask in bvecs
@ 2018-11-07 13:58 Johannes Thumshirn
2018-11-07 18:31 ` Sagi Grimberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2018-11-07 13:58 UTC (permalink / raw)
To: Jens Axboe
Cc: Linux Block Layer Mailinglist, Linux Kernel Mailinglist,
Johannes Thumshirn, Jan Kara, Sagi Grimberg, Bart Van Assche,
Ming Lei
With drivers that are settting a virtual boundary constrain, we are
seeing a lot of bio splitting and smaller I/Os being submitted to the
driver.
This happens because the bio gap detection code does not account cases
where PAGE_SIZE - 1 is bigger than queue_virt_boundary() and thus will
split the bio unnecessarily.
Cc: Jan Kara <jack@suse.cz>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
---
Changes to v1:
* Tried to re-phrase the commit message
* Add reviews
---
block/blk-merge.c | 2 +-
block/blk.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 6b5ad275ed56..208658a901c6 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -46,7 +46,7 @@ static inline bool bio_will_gap(struct request_queue *q,
bio_get_first_bvec(prev_rq->bio, &pb);
else
bio_get_first_bvec(prev, &pb);
- if (pb.bv_offset)
+ if (pb.bv_offset & queue_virt_boundary(q))
return true;
/*
diff --git a/block/blk.h b/block/blk.h
index a1841b8ff129..c85e53f21cdd 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -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));
}
--
2.16.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] block: respect virtual boundary mask in bvecs
2018-11-07 13:58 [PATCH v2] block: respect virtual boundary mask in bvecs Johannes Thumshirn
@ 2018-11-07 18:31 ` Sagi Grimberg
2018-11-07 20:04 ` Jens Axboe
2018-11-07 20:05 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2018-11-07 18:31 UTC (permalink / raw)
To: Johannes Thumshirn, Jens Axboe
Cc: Linux Block Layer Mailinglist, Linux Kernel Mailinglist,
Jan Kara, Bart Van Assche, Ming Lei
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] block: respect virtual boundary mask in bvecs
2018-11-07 13:58 [PATCH v2] block: respect virtual boundary mask in bvecs Johannes Thumshirn
2018-11-07 18:31 ` Sagi Grimberg
@ 2018-11-07 20:04 ` Jens Axboe
2018-11-07 20:05 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-11-07 20:04 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Linux Block Layer Mailinglist, Linux Kernel Mailinglist,
Jan Kara, Sagi Grimberg, Bart Van Assche, Ming Lei
On 11/7/18 6:58 AM, Johannes Thumshirn wrote:
> With drivers that are settting a virtual boundary constrain, we are
> seeing a lot of bio splitting and smaller I/Os being submitted to the
> driver.
>
> This happens because the bio gap detection code does not account cases
> where PAGE_SIZE - 1 is bigger than queue_virt_boundary() and thus will
> split the bio unnecessarily.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] block: respect virtual boundary mask in bvecs
2018-11-07 13:58 [PATCH v2] block: respect virtual boundary mask in bvecs Johannes Thumshirn
2018-11-07 18:31 ` Sagi Grimberg
2018-11-07 20:04 ` Jens Axboe
@ 2018-11-07 20:05 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-11-07 20:05 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Linux Block Layer Mailinglist, Linux Kernel Mailinglist,
Jan Kara, Sagi Grimberg, Bart Van Assche, Ming Lei
On 11/7/18 6:58 AM, Johannes Thumshirn wrote:
> With drivers that are settting a virtual boundary constrain, we are
> seeing a lot of bio splitting and smaller I/Os being submitted to the
> driver.
>
> This happens because the bio gap detection code does not account cases
> where PAGE_SIZE - 1 is bigger than queue_virt_boundary() and thus will
> split the bio unnecessarily.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-07 20:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 13:58 [PATCH v2] block: respect virtual boundary mask in bvecs Johannes Thumshirn
2018-11-07 18:31 ` Sagi Grimberg
2018-11-07 20:04 ` Jens Axboe
2018-11-07 20:05 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®