public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Li RongQing <lirongqing@baidu.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	x86@kernel.org, hpa@zytor.com, bp@alien8.de, mingo@redhat.com,
	tglx@linutronix.de, joro@8bytes.org, jmattson@google.com,
	wanpengli@tencent.com, vkuznets@redhat.com,
	sean.j.christopherson@intel.com, pbonzini@redhat.com
Subject: Re: [PATCH][v2] kvm: x86: emulate APERF/MPERF registers
Date: Wed, 29 Apr 2020 10:54:40 +0200	[thread overview]
Message-ID: <20200429085440.GG13592@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1588139196-23802-1-git-send-email-lirongqing@baidu.com>

On Wed, Apr 29, 2020 at 01:46:36PM +0800, Li RongQing wrote:
> Guest kernel reports a fixed cpu frequency in /proc/cpuinfo,
> this is confused to user when turbo is enable, and aperf/mperf
> can be used to show current cpu frequency after 7d5905dc14a
> "(x86 / CPU: Always show current CPU frequency in /proc/cpuinfo)"
> so we should emulate aperf mperf to achieve it
> 
> the period of aperf/mperf in guest mode are accumulated as
> emulated value, and add per-VM knod to enable emulate mperfaperf
> 
> diff v1:
> 1. support AMD
> 2. support per-vm capability to enable

Would it make sense to provide a pass-through APERF/MPERF for
KVM_HINTS_REALTIME ? Because that hint guarantees we have a 1:1 vCPU:CPU
binding and guaranteed no over-commit.

  reply	other threads:[~2020-04-29  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  5:46 [PATCH][v2] kvm: x86: emulate APERF/MPERF registers Li RongQing
2020-04-29  8:54 ` Peter Zijlstra [this message]
2020-04-29  9:43   ` 答复: " Li,Rongqing
2020-04-29 10:21   ` Paolo Bonzini
2020-04-30  1:45     ` 答复: " Li,Rongqing
2020-04-30  6:49 ` Xiaoyao Li
2020-04-30  9:50   ` 答复: " Li,Rongqing

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=20200429085440.GG13592@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --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