public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	James Clark <james.clark@linaro.org>,
	Ravi Bangoria <ravi.bangoria@amd.com>,
	Atish Patra <atishp@atishpatra.org>,
	Mingwei Zhang <mizhang@google.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [REGRESSION] 'perf mem record' on a Intel hybrid system broken
Date: Wed, 11 Dec 2024 15:13:21 -0500	[thread overview]
Message-ID: <62e4deb4-77ee-4937-8959-69de462f4d8e@linux.intel.com> (raw)
In-Reply-To: <Z1nee9PakNKG_mL3@google.com>



On 2024-12-11 1:48 p.m., Namhyung Kim wrote:
> On Wed, Dec 11, 2024 at 12:55:03PM -0500, Liang, Kan wrote:
>> On 2024-12-04 2:24 p.m., Namhyung Kim wrote:
>>> I think I got a related report from the kernel test robot but it was a
>>> Sapphire Rapids machine.  I don't have a Intel hybrid machine in hand.
>>> I'll try to take a look at it on Sapphire Rapids.
>>
>> The default precise_ip level for perf mem is always 3.
>>
>> For the latest intel platforms, it implies PDist, which is only
>> available on GP 0.
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/events/intel/core.c#n4412
>>
>> However, the mem-load PEBS event is available on all GP counters but GP
>> 0. :(
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/events/intel/ds.c#n1176
>>
>> So the precise_ip-- is required.
>>
>> The failure of scheduling returns -EINVAL.
>>
>> But Namhyung's patch assumes that the kernel return -EOPNOTSUPP when PMU
>> doesn't support the given precise level.
>> (Sorry, I didn't notice the case early.)
>>
>> Is it possible to reduce the precise_ip for the -EINVAL as well?
> 
> Sure, please see https://lore.kernel.org/r/Z1DV0lN8qHSysX7f@google.com
>

Thanks for the fix. It looks good to me.

Reviewed-by: Kan Liang <kan.liang@linux.intel.com>

Thanks,
Kan


      reply	other threads:[~2024-12-11 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 17:45 [REGRESSION] 'perf mem record' on a Intel hybrid system broken Arnaldo Carvalho de Melo
2024-12-04 19:24 ` Namhyung Kim
2024-12-11 17:55   ` Liang, Kan
2024-12-11 18:48     ` Namhyung Kim
2024-12-11 20:13       ` Liang, Kan [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=62e4deb4-77ee-4937-8959-69de462f4d8e@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=atishp@atishpatra.org \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mizhang@google.com \
    --cc=namhyung@kernel.org \
    --cc=palmer@rivosinc.com \
    --cc=ravi.bangoria@amd.com \
    --cc=tmricht@linux.ibm.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