mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
block: respect virtual boundary mask in bvecs
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 <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: Ming Lei <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Acked-by: Keith Busch <[email protected]> Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
9fe5c59ff6
commit
df376b2ed5
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue