Re: [PATCH V2] block-throttle: avoid double charge

2017-12-20 Thread Jens Axboe
On 11/13/17 1:37 PM, Shaohua Li wrote: > If a bio is throttled and splitted after throttling, the bio could be > resubmited and enters the throttling again. This will cause part of the > bio is charged multiple times. If the cgroup has an IO limit, the double > charge will significantly harm the

Re: [PATCH V2] block-throttle: avoid double charge

2017-12-20 Thread Shaohua Li
On Wed, Dec 20, 2017 at 02:42:20PM +0800, xuejiufei wrote: > Hi Shaohua, > > I noticed that the splitted bio will goto the scheduler directly while > the cloned bio entering the generic_make_request again. So can we just > leave the BIO_THROTTLED flag in the original bio and do not copy the >

Re: [PATCH V2] block-throttle: avoid double charge

2017-12-19 Thread xuejiufei
Hi Shaohua, I noticed that the splitted bio will goto the scheduler directly while the cloned bio entering the generic_make_request again. So can we just leave the BIO_THROTTLED flag in the original bio and do not copy the flag to new splitted bio, so it is not necessary to remove the flag in

Re: [PATCH V2] block-throttle: avoid double charge

2017-11-13 Thread Tejun Heo
On Mon, Nov 13, 2017 at 12:37:10PM -0800, Shaohua Li wrote: > If a bio is throttled and splitted after throttling, the bio could be > resubmited and enters the throttling again. This will cause part of the > bio is charged multiple times. If the cgroup has an IO limit, the double > charge will

[PATCH V2] block-throttle: avoid double charge

2017-11-13 Thread Shaohua Li
If a bio is throttled and splitted after throttling, the bio could be resubmited and enters the throttling again. This will cause part of the bio is charged multiple times. If the cgroup has an IO limit, the double charge will significantly harm the performance. The bio split becomes quite common