Re: [PATCH 2/3] Qemu: add CMT support

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

 



Hi Ren,
Thank you for clarifying. I really do not have any more comments on the patch.

Regards,
Prerna

On Thu, Jul 9, 2015 at 12:27 PM, Ren, Qiaowei <qiaowei.ren@xxxxxxxxx> wrote:
On Jul 7, 2015 15:51, Ren, Qiaowei wrote:
>
>
> On Jul 6, 2015 14:49, Prerna wrote:
>
>> On Sun, Jul 5, 2015 at 5:13 PM, Qiaowei Ren <qiaowei.ren@xxxxxxxxx
>> <mailto:qiaowei.ren@xxxxxxxxx> > wrote:
>>
>>
>>      One RFC in
>>      https://www.redhat.com/archives/libvir-list/2015-June/msg01509.html
>>
>>      CMT (Cache Monitoring Technology) can be used to measure the
>>      usage of cache by VM running on the host. This patch will
>>      extend the bulk stats API (virDomainListGetStats) to add this
>>      field. Applications based on libvirt can use this API to achieve
>>      cache usage of VM. Because CMT implementation in Linux kernel
>>      is based on perf mechanism, this patch will enable perf event
>>      for CMT when VM is created and disable it when VM is destroyed.
>>
>>
>>
>>
>> Hi Ren,
>>
>> One query wrt this implementation. I see you make a perf ioctl to
>> gather CMT stats each time the stats API is invoked.
>>
>> If the CMT stats are exposed by a hardware counter, then this implies
>> logging on a per-cpu (or per-socket ???) basis.
>>
>> This also implies that the value read will vary as the CPU (or socket)
>> on which it is being called changes.
>>
>>
>> Now, with this background, if we need real-world stats on a VM, we need
>> this perf ioctl executed on all CPUs/ sockets on which the VM ran.
>> Also, once done, we will need to aggregate results from each of these
>> sources.
>>
>>
>> In this implementation, I am missing this -- there seems no control
>> over which physical CPU the libvirt worker thread will run and collect
>> the perf data from. Data collected from this implementation might not
>> accurately model the system state.
>>
>> I _think_ libvirt currently has no way of directing a worker thread to
>> collect stats from a given CPU -- if we do, I would be happy to learn
>> about it :)
>>
>
> Prerna, thanks for your reply. I checked the CMT implementation in
> kernel, and noticed that the series implement new ->count() of pmu
> driver which can aggregate the results from each cpu if perf type is
> PERF_TYPE_INTEL_CQM . The following is the link for the patch:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?i
> d=bfe1fc d2688f557a6b6a88f59ea7619228728bd7
>
> So I guess that this patch just need to set right perf type and "cpu=-1". Do you
> think this is ok?
>

Hi Prerna,

Do you have more comments on this patch series? I would be glad to update my implementation. ^-^

Qiaowei


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