linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dongli Zhang <dongli.zhang@oracle.com>
To: Like Xu <like.xu.linux@gmail.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	namhyung@kernel.org, joe.jin@oracle.com,
	linux-perf-users@vger.kernel.org, kvm list <kvm@vger.kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Bert Barbe <bert.barbe@oracle.com>
Subject: Re: [PATCH RFC 1/1] perf stat: do not fatal if the leader is errored
Date: Thu, 22 Sep 2022 11:10:08 -0700	[thread overview]
Message-ID: <d6ad12e0-3659-42c3-e913-3c9e4daa8ef8@oracle.com> (raw)
In-Reply-To: <ad2572d0-06b5-7250-31f2-a5efa1048cc0@gmail.com>



On 9/22/22 1:07 AM, Like Xu wrote:
> On 22/9/2022 3:10 pm, Dongli Zhang wrote:
>> There are three options to fix the issue.
>>
>> 1. Do not expose /sys/bus/event_source/devices/cpu/events/slots to
>> userspace so that pmu_have_event(pmu->name, "slots") returns false.
> 
> IMO, the guest PMU driver should be fixed
> since it misrepresents emulated hardware capabilities in terms of slots.
> 
>>
>> 2. Run cpuid at perf userspace and avoid using 'slots' if it is not
>> supported in cpuid.
>>
>> 3. Do not fatal perf if the leader is failed. Do not create events for an
>> evsel if its leader is already failed.
> 
> We may also need this since it's easier and more agile to update the perf tool
> than the kernel code or KVM emulated capabilities.

Thank you very much for the suggestion. I may remove the RFC and re-send the
patch for perf userspace.

BTW, I used to try your prior patch at KVM side (suggested by Bert) but it does
not help in this case. The VM kernel is already aware that 'slots' is not
supported by the hypervisor.

https://lore.kernel.org/lkml/20220106032118.34459-1-likexu@tencent.com/T/

Dongli Zhang

> 
>>
>> This RFC patch is with the 3rd option. Would you mind suggesting which
>> option is better?

  parent reply	other threads:[~2022-09-22 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  7:10 [PATCH RFC 1/1] perf stat: do not fatal if the leader is errored Dongli Zhang
2022-09-22  8:07 ` Like Xu
2022-09-22 13:34   ` Liang, Kan
2022-09-22 18:00     ` Dongli Zhang
2022-09-22 18:42       ` Liang, Kan
2022-09-22 18:10   ` Dongli Zhang [this message]
2022-10-14 22:16 ` Namhyung Kim
2022-10-14 23:47   ` Dongli Zhang
2022-10-18 21:29   ` Dongli Zhang
2022-10-18 21:31     ` Dongli Zhang

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=d6ad12e0-3659-42c3-e913-3c9e4daa8ef8@oracle.com \
    --to=dongli.zhang@oracle.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bert.barbe@oracle.com \
    --cc=joe.jin@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).