Re: [PATCH v2 2/2] add interface for blkio.weight_device

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

 



On Thu, Sep 15, 2011 at 05:13:53PM +0800, Hu Tao wrote:
> On Thu, Sep 15, 2011 at 08:53:35AM +0100, Daniel P. Berrange wrote:
> > On Thu, Sep 15, 2011 at 03:31:48PM +0800, Hu Tao wrote:
> > > > > +
> > > > > +/**
> > > > > + * virDomainBlkioWeightDeviceParseXML
> > > > > + *
> > > > > + * this function parses a XML node:
> > > > > + *
> > > > > + *   <device>
> > > > > + *     <major>major</major>
> > > > > + *     <minor>minor</minor>
> > > > > + *     <weight>weight</weight>
> > > > > + *   </device>
> > > > > + *
> > > > > + * and fills a virBlkioWeightDevice struct.
> > > > > + */
> > > > 
> > > > I'm not really seeing the benefit in using major, minor in the XML for
> > > > this. The <disk> element is using the /dev/hda1 path for the host
> > > > device, so I'd expect the same path to be usable for the block I/O
> > > > tuning.
> > > > 
> > > > How does the scope work here, does major,minor have to refer to a block
> > > > device, or can it refer to a partition ?  If we have multiple <device>
> > > > elements, each giving a different partition on the same device can we
> > > > set different weight for each partition ?
> > > 
> > > blkio doesn't support io control on a partition, so I add major, minor
> > > to refer to a block device as a whole, rather than utilizing the existing
> > > <disk> element.
> > 
> > Hmm, well I think we should still just use the '/dev/hda' block device
> > path. The major/minor numbers cannot be assumed to be stable across
> > different hosts, so would break migration. Whereas you can use the
> > /dev/disk/by-{id,path} symlinks for block paths and thus be migration
> > safe.
> 
> Good idea. Thanks for the suggestion. To summarize, the XML describing
> weight_device like this will be acceptable:
> 
> <device>
>   <id>by-id</id>   (or path here)
>   <weight>weight</weight>
> </device>
> 
> Should the <device> be changed into <disk> to remind user that the id is
> in fact a disk id?

IMHO it should be

 <device>
   <path>/fully/qulaified/device/path</path>
   <weight>weight</weight>
 </device>


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]