[libvirt] [resend v2 0/7] Support cache tune in libvirt

Marcelo Tosatti mtosatti at redhat.com
Mon Feb 6 15:33:10 UTC 2017


On Mon, Feb 06, 2017 at 10:23:35AM +0800, Eli Qiao wrote:
> This series patches are for supportting CAT featues, which also
> called cache tune in libvirt.
> 
> First to expose cache information which could be tuned in capabilites XML.
> Then add new domain xml element support to add cacahe bank which will apply
> on this libvirt domain.
> 
> This series patches add a util file `resctrl.c/h`, an interface to talk with
> linux kernel's sys fs.
> 
> There are still some TODOs such as expose new public interface to get free
> cache information.
> 
> Some discussion about this feature support can be found from:
> https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html

Two comments:

1) Please perform appropriate filesystem locking when accessing
resctrlfs, as described at:

http://www.spinics.net/lists/linux-tip-commits/msg36754.html

2) 

    <cachetune id='10' host_id='1' type='l3' size='3072' unit='KiB'/>

[b4c270b5-e0f9-4106-a446-69032872ed7d]# cat tasks  
8654
[b4c270b5-e0f9-4106-a446-69032872ed7d]# pstree -p | grep qemu
           |-qemu-kvm(8654)-+-{qemu-kvm}(8688)
           |                |-{qemu-kvm}(8692)
           |                `-{qemu-kvm}(8693)

Should add individual vcpus to the "tasks" file, not the main QEMU
process.

The NFV usecase requires exclusive CAT allocation for the vcpu which
runs the sensitive workload.

Perhaps:

    <cachetune id='10' host_id='1' type='l3' size='3072' unit='KiB'/> 

Adds all vcpus that are pinned to the socket which cachebank with
host_id=1.

    <cachetune id='10' host_id='1' type='l3' size='3072' unit='KiB' vcpus=2,3/> 

Adds PID of vcpus 2 and 3 to resctrl directory created for this
allocation.








More information about the libvir-list mailing list