linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	avi@redhat.com, mtosatti@redhat.com, mingo@elte.hu,
	acme@ghostprotocols.net
Subject: Re: [PATCHv3 00/10] KVM in-guest performance monitoring
Date: Thu, 17 Nov 2011 10:30:00 +0100	[thread overview]
Message-ID: <1321522200.27735.27.camel@twins> (raw)
In-Reply-To: <1320929850-10480-1-git-send-email-gleb@redhat.com>

On Thu, 2011-11-10 at 14:57 +0200, Gleb Natapov wrote:
> This patchset exposes an emulated version 2 architectural performance
> monitoring unit to KVM guests.  The PMU is emulated using perf_events,
> so the host kernel can multiplex host-wide, host-user, and the
> guest on available resources.
> 
> The patches are against next branch on kvm.git.
> 
> If you want to try running perf in a guest you need to apply the patch
> below to qemu-kvm and use -cpu host on qemu command line. But DO NOT
> TRY those patches without applying [1][2] to the host kernel first.
> Don't tell me I didn't warn you!
> 
> [1] https://lkml.org/lkml/2011/10/18/390
> [2] https://lkml.org/lkml/2011/10/23/163
> 
> Changelog:
>  v1->v2
>   - put index into struct kvm_pmc instead of calculating it
>   - use locked version of bitops
>   - inject pmi from irq work if vcpu was not in a guest mode during NMI
>   - providing stub for perf_get_x86_pmu_capability() for !PERF_EVENTS
>  v2->v3
>   - minor style change/comment clarification
>   - add perf patch to disable arch event not supported by a CPU
>   - create perf events as pinned

On the pinned thing, do check event->state, if it hits
PERF_EVENT_STATE_ERROR you're up shit creek and the counter didn't get
scheduled. This can happen because eg. cpu-pinned events have higher
precedence than task-pinned events.

I've taken the two perf patches from this (6 and 7), the rest I gather
should go through the KVM tree. I've only cursory looked at the other
patches but didn't spot anything very curious.



  parent reply	other threads:[~2011-11-17  9:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 12:57 [PATCHv3 00/10] KVM in-guest performance monitoring Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 01/10] KVM: Expose kvm_lapic_local_deliver() Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 02/10] KVM: Expose a version 2 architectural PMU to a guests Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 03/10] KVM: Add generic RDPMC support Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 04/10] KVM: SVM: Intercept RDPMC Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 05/10] KVM: VMX: " Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 06/10] x86, perf: disable non available architectural events Gleb Natapov
2011-11-17  9:29   ` Peter Zijlstra
2011-12-06 20:17   ` [tip:perf/core] x86, perf: Disable " tip-bot for Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 07/10] perf, x86: expose perf capability to other modules Gleb Natapov
2011-12-06 20:18   ` [tip:perf/core] perf, x86: Expose " tip-bot for Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 08/10] KVM: Expose the architectural performance monitoring CPUID leaf Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 09/10] KVM: x86 emulator: fix RDPMC privilege check Gleb Natapov
2011-11-10 12:57 ` [PATCHv3 10/10] KVM: x86 emulator: implement RDPMC (0F 33) Gleb Natapov
2011-11-17  9:30 ` Peter Zijlstra [this message]
2011-12-11 14:05 ` [PATCHv3 00/10] KVM in-guest performance monitoring Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321522200.27735.27.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).