* [PATCH] block: skip the split micro-optimization for devices with chunk size
@ 2019-11-05 0:06 Christoph Hellwig
2019-11-05 0:10 ` Jens Axboe
2019-11-05 0:14 ` Bart Van Assche
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-11-05 0:06 UTC (permalink / raw)
To: axboe; +Cc: linux-block
If the devices sets a chunk size we might have to split I/O that is
smaller than a page size if it crosses the chunk boundary. Skip the
micro-optimization for small I/Os in that case.
Fixes: b072e20f0084 ("block: merge invalidate_partitions into rescan_partitions")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-merge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 06eb38357b41..f22cb6251d06 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -317,7 +317,8 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
* are cloned, but compared to the performance impact of cloned
* bios themselves the loop below doesn't matter anyway.
*/
- if ((*bio)->bi_vcnt == 1 &&
+ if (!q->limits.chunk_sectors &&
+ (*bio)->bi_vcnt == 1 &&
(*bio)->bi_io_vec[0].bv_len <= PAGE_SIZE) {
*nr_segs = 1;
break;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] block: skip the split micro-optimization for devices with chunk size
2019-11-05 0:06 [PATCH] block: skip the split micro-optimization for devices with chunk size Christoph Hellwig
@ 2019-11-05 0:10 ` Jens Axboe
2019-11-05 0:14 ` Bart Van Assche
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-11-05 0:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On 11/4/19 5:06 PM, Christoph Hellwig wrote:
> If the devices sets a chunk size we might have to split I/O that is
> smaller than a page size if it crosses the chunk boundary. Skip the
> micro-optimization for small I/Os in that case.
I'm just going to fold this in with the previous, which is still head
of tree.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: skip the split micro-optimization for devices with chunk size
2019-11-05 0:06 [PATCH] block: skip the split micro-optimization for devices with chunk size Christoph Hellwig
2019-11-05 0:10 ` Jens Axboe
@ 2019-11-05 0:14 ` Bart Van Assche
2019-11-05 0:18 ` Christoph Hellwig
1 sibling, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2019-11-05 0:14 UTC (permalink / raw)
To: Christoph Hellwig, axboe; +Cc: linux-block
On 11/4/19 4:06 PM, Christoph Hellwig wrote:
> If the devices sets a chunk size we might have to split I/O that is
> smaller than a page size if it crosses the chunk boundary. Skip the
> micro-optimization for small I/Os in that case.
>
> Fixes: b072e20f0084 ("block: merge invalidate_partitions into rescan_partitions")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-merge.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-merge.c b/block/blk-merge.c
> index 06eb38357b41..f22cb6251d06 100644
> --- a/block/blk-merge.c
> +++ b/block/blk-merge.c
> @@ -317,7 +317,8 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
> * are cloned, but compared to the performance impact of cloned
> * bios themselves the loop below doesn't matter anyway.
^^^^
Did you perhaps mean "test" instead of "loop"?
Thanks,
Bart.
> */
> - if ((*bio)->bi_vcnt == 1 &&
> + if (!q->limits.chunk_sectors &&
> + (*bio)->bi_vcnt == 1 &&
> (*bio)->bi_io_vec[0].bv_len <= PAGE_SIZE) {
> *nr_segs = 1;
> break;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: skip the split micro-optimization for devices with chunk size
2019-11-05 0:14 ` Bart Van Assche
@ 2019-11-05 0:18 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-11-05 0:18 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Christoph Hellwig, axboe, linux-block
On Mon, Nov 04, 2019 at 04:14:10PM -0800, Bart Van Assche wrote:
> On 11/4/19 4:06 PM, Christoph Hellwig wrote:
>> If the devices sets a chunk size we might have to split I/O that is
>> smaller than a page size if it crosses the chunk boundary. Skip the
>> micro-optimization for small I/Os in that case.
>>
>> Fixes: b072e20f0084 ("block: merge invalidate_partitions into rescan_partitions")
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>> ---
>> block/blk-merge.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/block/blk-merge.c b/block/blk-merge.c
>> index 06eb38357b41..f22cb6251d06 100644
>> --- a/block/blk-merge.c
>> +++ b/block/blk-merge.c
>> @@ -317,7 +317,8 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
>> * are cloned, but compared to the performance impact of cloned
>> * bios themselves the loop below doesn't matter anyway.
> ^^^^
> Did you perhaps mean "test" instead of "loop"?
No. I did mean the loop in blk_bio_segment_split.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-05 0:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 0:06 [PATCH] block: skip the split micro-optimization for devices with chunk size Christoph Hellwig
2019-11-05 0:10 ` Jens Axboe
2019-11-05 0:14 ` Bart Van Assche
2019-11-05 0:18 ` Christoph Hellwig
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).