On Tuesday, 7 February 2017 at 3:03 AM, Marcelo Tosatti wrote:
On Mon, Feb 06, 2017 at 01:33:09PM -0200, Marcelo Tosatti wrote:On Mon, Feb 06, 2017 at 10:23:35AM +0800, Eli Qiao wrote:This series patches are for supportting CAT featues, which alsocalled 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 applyon this libvirt domain.This series patches add a util file `resctrl.c/h`, an interface to talk withlinux kernel's sys fs.There are still some TODOs such as expose new public interface to get freecache information.Some discussion about this feature support can be found from:Two comments:1) Please perform appropriate filesystem locking when accessingresctrlfs, as described at:
2)<cachetune id='10' host_id='1' type='l3' size='3072' unit='KiB'/>[b4c270b5-e0f9-4106-a446-69032872ed7d]# cat tasks8654[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 QEMUprocess.The NFV usecase requires exclusive CAT allocation for the vcpu whichruns 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 withhost_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 thisallocation.
3) CDP / non-CDP convertion.In case the size determination has been performed with non-CDP,to emulate such allocation on a CDP host,it would be good to allow both code and data allocations to sharethe CBM space:
<cachetune id='10' host_id='1' type='l3data' size='3072' unit='KiB'/><cachetune id='10' host_id='1' type='l3code' size='3072' unit='KiB'/>Perhaps if using the same ID?
Other than that, testing looks good.