Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to guests

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

 



On 06/03/2011 05:41 PM, Peter Zijlstra wrote:
On Wed, 2011-05-11 at 11:55 -0400, Avi Kivity wrote:
>  +static u64 read_gp_pmc(struct kvm_pmu *pmu, struct kvm_pmc *pmc)
>  +{
>  +       u64 counter, enabled, running;
>  +
>  +       counter = pmc->counter;
>  +
>  +       if (pmc->perf_event)
>  +               counter += perf_event_read_value(pmc->perf_event,
>  +&enabled,&running);
>  +
>  +       /* FIXME: Scaling needed? */

Yeah, either that or use attr.pinned = 1, doing the latter will result
in an error when the PMU is overloaded though.

So what's the scale factor? enabled / running?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux