[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] blkio: change the minimum weight from 100 to 10



On 08/20/2013 01:23 AM, Eric Blake wrote:
> On 08/18/2013 11:59 PM, Gao feng wrote:
>> kernel had changed the minimum weight of device blkio from
>> 100 to 10 in commit df457f845e5449be2e7d96668791f789b3770ac7.
>>
>> 	commit df457f845e5449be2e7d96668791f789b3770ac7
>> 	Author: Justin TerAvest <teravest google com>
>> 	Date:   Tue Mar 8 19:45:00 2011 +0100
>>
>>           blk-cgroup: Lower minimum weight from 100 to 10.
>>
>>  	   We've found that we still get good, useful isolation at weights this
>>   	  low. I'd like to adjust the minimum so that any other changes can take
>>   	  these values into account.
>>
>>  	  Signed-off-by: Justin TerAvest <teravest google com>
>>   	  Acked-by: Vivek Goyal <vgoyal redhat com>
>> 	  Signed-off-by: Jens Axboe <jaxboe fusionio com>
>>
>> libvirt should comport with kernel.
>>
>> Signed-off-by: Gao feng <gaofeng cn fujitsu com>
>> ---
>>  docs/formatdomain.html.in |  4 ++--
>>  src/util/vircgroup.c      | 10 +++++-----
>>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> What happens when running a newer libvirt with an older kernel?  Or in
> other words, what error message do you get if you pass a limit lower
> than the current kernel can support?  I want to make sure the message
> looks sane to an end-user before accepting this patch.
> 
>>  
>> -    if (weight && (weight > 1000 || weight < 100)) {
>> +    if (weight && (weight > 1000 || weight < 10)) {
>>          virReportError(VIR_ERR_INVALID_ARG,
>> -                       _("weight '%u' must be in range (100, 1000)"),
>> +                       _("weight '%u' must be in range (10, 1000)"),
>>                         weight);
>>          return -1;
> 
> In other words, I suspect this code needs to be beefed up to actually
> probe whether the kernel accepted the change, rather than blindly doing
> the filter ourselves and hoping that it was correct.
> 

Hmm, I haven't considered this problem. we should report different error messages
and check different min values base on different kernel.

Thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]