[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-07-05 Thread Andrea Righi
Li Zefan wrote: +/** + * struct iothrottle_node - throttling rule of a single block device + * @node: list of per block device throttling rules + * @dev: block device number, used as key in the list + * @iorate: max i/o bandwidth (in bytes/s) + * @strategy: throttling strategy (0 = leaky

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-07-04 Thread Li Zefan
+/** + * struct iothrottle_node - throttling rule of a single block device + * @node: list of per block device throttling rules + * @dev: block device number, used as key in the list + * @iorate: max i/o bandwidth (in bytes/s) + * @strategy: throttling strategy (0 = leaky bucket, 1 = token

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-30 Thread Andrea Righi
Andrea Righi wrote: Andrew Morton wrote: On Fri, 27 Jun 2008 00:36:46 +0200 Andrea Righi [EMAIL PROTECTED] wrote: Does all this code treat /dev/sda1 as a separate device from /dev/sda2? If so, that would be broken. Yes, all the partitions are treated as separate devices with (potentially)

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-27 Thread Andrea Righi
Andrew Morton wrote: On Fri, 27 Jun 2008 00:36:46 +0200 Andrea Righi [EMAIL PROTECTED] wrote: Does all this code treat /dev/sda1 as a separate device from /dev/sda2? If so, that would be broken. Yes, all the partitions are treated as separate devices with (potentially) different limiting

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-26 Thread Andrea Righi
Andrew, thanks for your time and the detailed revision. I'll try to fix everything you reported and better document the code according to your suggestions. I'll re-submit a new patchset version ASAP. A few comments below. Andrew Morton wrote: [snip] +static ssize_t iothrottle_read(struct

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-26 Thread Andrew Morton
On Fri, 27 Jun 2008 00:36:46 +0200 Andrea Righi [EMAIL PROTECTED] wrote: Does all this code treat /dev/sda1 as a separate device from /dev/sda2? If so, that would be broken. Yes, all the partitions are treated as separate devices with (potentially) different limiting rules, but I don't

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-25 Thread Andrew Morton
On Fri, 20 Jun 2008 12:05:34 +0200 Andrea Righi [EMAIL PROTECTED] wrote: This is the core io-throttle kernel infrastructure. It creates the basic interfaces to cgroups and implements the I/O measurement and throttling functions. Signed-off-by: Andrea Righi [EMAIL PROTECTED] ---

[Devel] Re: [PATCH 2/3] i/o bandwidth controller infrastructure

2008-06-22 Thread Andrea Righi
Carl Henrik Lunde wrote: Did you consider using token bucket instead of this (leaky bucket?)? I've attached a patch which implements token bucket. Although not as precise as the leaky bucket the performance is better at high bandwidth streaming loads. The leaky bucket stops at around 53