Re: [Qemu-devel] [PATCH 3/4] throttle: Remove throttle_fix_bucket() / throttle_unfix_bucket()

2017-08-21 Thread Manos Pitsidianakis
On Mon, Aug 21, 2017 at 02:10:59PM +0200, Alberto Garcia wrote: On Sat 19 Aug 2017 05:23:12 PM CEST, Manos Pitsidianakis wrote: -/* If the bucket is full then we have to wait */ -extra = bkt->level - bkt->max * bkt->burst_length; +if (!bkt->max) { +/* If bkt->max is 0 we

Re: [Qemu-devel] [PATCH 3/4] throttle: Remove throttle_fix_bucket() / throttle_unfix_bucket()

2017-08-21 Thread Alberto Garcia
On Sat 19 Aug 2017 05:23:12 PM CEST, Manos Pitsidianakis wrote: >>-/* If the bucket is full then we have to wait */ >>-extra = bkt->level - bkt->max * bkt->burst_length; >>+if (!bkt->max) { >>+/* If bkt->max is 0 we still want to allow short bursts of I/O >>+ * from the

Re: [Qemu-devel] [PATCH 3/4] throttle: Remove throttle_fix_bucket() / throttle_unfix_bucket()

2017-08-19 Thread Manos Pitsidianakis
On Thu, Aug 17, 2017 at 05:28:14PM +0300, Alberto Garcia wrote: The throttling code can change internally the value of bkt->max if it hasn't been set by the user. The problem with this is that if we want to retrieve the original value we have to undo this change first. This is ugly and

[Qemu-devel] [PATCH 3/4] throttle: Remove throttle_fix_bucket() / throttle_unfix_bucket()

2017-08-17 Thread Alberto Garcia
The throttling code can change internally the value of bkt->max if it hasn't been set by the user. The problem with this is that if we want to retrieve the original value we have to undo this change first. This is ugly and unnecessary: this patch removes the throttle_fix_bucket() and