[libvirt] [PATCH 2/2]blkio: change the minimum weight according to kernel version

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Wed Oct 9 06:30:05 UTC 2013



> -----Original Message-----
> From: Eric Blake [mailto:eblake at redhat.com]
> Sent: Wednesday, October 09, 2013 11:52 AM
> To: Chen Hanxiao
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH 2/2]blkio: change the minimum weight according to
> kernel version
> 
> On 10/08/2013 02:38 AM, Chen Hanxiao wrote:
> > From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> >
> > kernel had changed the minimum weight of device blkio from
> > 100 to 10 in commit df457f845e5449be2e7d96668791f789b3770ac7.
> > So we should to use new blkio weight range after 2.6.39.
> 
> Why not do it unconditionally, and then just have graceful error
> detection when on older kernels when the input is rejected by the kernel
> as out of range?  That would be feature-based instead of version-check
> based, which makes it more reliable even if the feature of the kernel is
> backported to something that uname reports as having an older version
> number.

How about just add the range to the doc and tell users that the range was changed.

Since the kernel will check whether the value is valid or not,
how do you think we leave this to kernel and check the errno?
That means libvirt did not check the input value ranges, send it to kernel and catch the error.
Then we could not care how kernel would change its range.

Thanks

> 
> >
> > libvirt should follow kernel according to
> > kernel version.
> >
> > Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
> > Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> > ---
> >  src/util/vircgroup.c | 44 +++++++++++++++++++++++++++++++++-----------
> >  1 file changed, 33 insertions(+), 11 deletions(-)
> 
> Incomplete.  You also need to touch virsh.pod and probably
> formatdomain.html.in to document the larger range, and mention that
> different connections may have different ranges (due to different kernel
> versions on the other ends of those two connections).
> 

Thanks. I will add these in the next patch.

> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org







More information about the libvir-list mailing list