public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org, Like Xu <likexu@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	Mingwei Zhang <mizhang@google.com>
Subject: Re: [PATCH] perf/x86: Don't enforce minimum period for KVM guest-only events
Date: Wed, 29 Nov 2023 12:20:19 +0100	[thread overview]
Message-ID: <20231129112019.GG30650@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <ZWaU3HZURCjms5DM@google.com>

On Tue, Nov 28, 2023 at 05:33:16PM -0800, Sean Christopherson wrote:

> If programming a "period" of 1 puts the host at risk in some way, then I agree
> that this is unsafe and we need a different solution. 

IIRC if you put in -1 on a Nehalem, you end up with an NMI-storm which
wasn't trivial to recover from if at all (it's too long ago and I don't
have ancient hardware like that anymore :/)

> But if the worst case
> scenario is non-determinstic or odd behavior from the guest's perspective, then
> that's the guest's problem (with the caveat that the guest might not have accurate
> Family/Model/Stepping data to make informed decisions).

Things like bdm_limit_period() will cause odd behaviour IIRC, it does
daft things like generate extra PEBS records on overflow and gives
otherwise daft results for PDIR.

glc_limit_period() lacks a useful comment :/

      reply	other threads:[~2023-11-29 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 18:36 [PATCH] perf/x86: Don't enforce minimum period for KVM guest-only events Sean Christopherson
2023-11-07 19:38 ` Mingwei Zhang
2023-11-07 23:02   ` Sean Christopherson
2023-11-07 23:47     ` Mingwei Zhang
2023-11-17 10:32 ` Peter Zijlstra
2023-11-29  1:33   ` Sean Christopherson
2023-11-29 11:20     ` Peter Zijlstra [this message]

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=20231129112019.GG30650@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=jmattson@google.com \
    --cc=likexu@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mizhang@google.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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