Re: [PATCH] block: fix bio_will_gap()

2017-04-14 Thread Jens Axboe
On 04/14/2017 05:26 AM, Johannes Thumshirn wrote: > On Thu, Apr 13, 2017 at 6:06 PM, Ming Lei wrote: >> Now commit 729204ef49ec("block: relax check on sg gap") >> allows us to merge bios if both are physically contiguous, >> this change can merge huge of small bios in use case of mkfs, >> for exam

Re: [PATCH] block: fix bio_will_gap()

2017-04-14 Thread Johannes Thumshirn
On Thu, Apr 13, 2017 at 6:06 PM, Ming Lei wrote: > Now commit 729204ef49ec("block: relax check on sg gap") > allows us to merge bios if both are physically contiguous, > this change can merge huge of small bios in use case of mkfs, > for example, mkfs.ntfs running time can be decreased to ~1/10. >

Re: [PATCH] block: fix bio_will_gap()

2017-04-13 Thread Ming Lei
On Thu, Apr 13, 2017 at 04:22:22PM +, Bart Van Assche wrote: > On Fri, 2017-04-14 at 00:06 +0800, Ming Lei wrote: > > But if one rq starts with non-aligned buffer(the 1st bvec's > > bv_offset isn't zero) and if we allow to merge, it is quite > > difficult to respect sg gap limit, especially the

Re: [PATCH] block: fix bio_will_gap()

2017-04-13 Thread Bart Van Assche
On Fri, 2017-04-14 at 00:06 +0800, Ming Lei wrote: > But if one rq starts with non-aligned buffer(the 1st bvec's > bv_offset isn't zero) and if we allow to merge, it is quite > difficult to respect sg gap limit, especially the segment > can't be at maximum segment size, otherwise the segment > ends

[PATCH] block: fix bio_will_gap()

2017-04-13 Thread Ming Lei
Now commit 729204ef49ec("block: relax check on sg gap") allows us to merge bios if both are physically contiguous, this change can merge huge of small bios in use case of mkfs, for example, mkfs.ntfs running time can be decreased to ~1/10. But if one rq starts with non-aligned buffer(the 1st bvec'