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

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

 




> -----Original Message-----
> From: Eric Blake [mailto:eblake@xxxxxxxxxx]
> Sent: Wednesday, October 09, 2013 11:52 AM
> To: Chen Hanxiao
> Cc: libvir-list@xxxxxxxxxx
> Subject: Re:  [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@xxxxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxxx>
> > Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> > ---
> >  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




--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]