[libvirt] [v7 00/10] Support cache tune in libvirt

Eli Qiao qiaoliyong at gmail.com
Wed Feb 22 01:26:29 UTC 2017



--  
Best regards  
Eli

天涯无处不重逢
a leaf duckweed belongs to the sea, where not to meet in life  

Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Wednesday, 22 February 2017 at 7:36 AM, Marcelo Tosatti wrote:

> On Tue, Feb 21, 2017 at 10:25:13AM +0800, Eli Qiao wrote:
> >  
> >  
> > --  
> > Best regards  
> > Eli
> >  
> > 天涯无处不重逢
> > a leaf duckweed belongs to the sea, where not to meet in life  
> >  
> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> >  
> >  
> > On Tuesday, 21 February 2017 at 4:54 AM, Marcelo Tosatti wrote:
> >  
> > > Can you explain how the resource leak can happen?
> > >  
> > >  
> >  
> > 1. libvirtd creates a qemu process and create a resctrl directory for it, add it’s pids to tasks
> > 2. stop libvirtd or it’s down.
> > 3. qemu process, and tasks file is empty now.
> > 4. libvirt restart, well, the resctrl directory should be deleted as qemu process gone.
> >  
>  
>  
> So there are two problems:  
>  
> P1) If libvirtd is not restarted and guest VM is poweredoff, then  
> CAT reservation leaks.
>  
> Ideally QEMU should free the resources.
>  
yes, but qemu doesn’t care about CAT stuff.  
>  
> How does libvirt deal with this for other resources?
>  
>  


I tested with libvirt, if qemu process exited while libvirtd is not running, next time when libvirtd restart, it will do something cleanup like it will call qemuprocessexit(), so libvirt can aware qemu process exited.  
>  
> P2) Libvirt restart.
>  
Yes.   
>  
> Please remove resctrlfs directory only for  
> libvirt owned VMs (say if the directory name matches
> the VM UUID), and not for all directories in resctrlfs
>  
>  

Yep, I ‘v done the patch update yesterday, and will send out new version today.  
> (should not change resctrlfs directories which libvirt
> does not own).
>  
>  


Thanks for the advices.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170222/cac3e1e8/attachment-0001.htm>


More information about the libvir-list mailing list