[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b9f7c227-7d64-453e-8ec6-6c20ad3881c7@intel.com>
Date: Wed, 8 Nov 2023 08:31:46 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC: <linux-kselftest@...r.kernel.org>, Shuah Khan <shuah@...nel.org>,
Shaopeng Tan <tan.shaopeng@...fujitsu.com>,
Maciej Wieczór-Retman
<maciej.wieczor-retman@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 23/24] selftests/resctrl: Add L2 CAT test
Hi Ilpo,
On 11/7/2023 1:33 AM, Ilpo Järvinen wrote:
> man perf_event_open() says this:
>
> "If type is PERF_TYPE_RAW, then a custom "raw" config value is needed.
> Most CPUs support events that are not covered by the "generalized"
> events. These are implementation defined; see your CPU manual (for ex-
> ample the Intel Volume 3B documentation or the AMD BIOS and Kernel De-
> veloper Guide). The libpfm4 library can be used to translate from the
> name in the architectural manuals to the raw hex value perf_event_open()
> expects in this field."
>
> ...I've not come across libpfm myself either but to me it looks libpfm
> bridges between those architecture specific tables and perf_event_open().
> That is, it could provide the binary value necessary in constructing the
> perf_event_attr struct.
>
> I think this is probably the function which maps string ->
> perf_event_attr:
>
> https://man7.org/linux/man-pages/man3/pfm_get_os_event_encoding.3.html
>
This sounds promising. If this works out I think that it would be ideal if
the L2 CAT test is not blocked by absence of libpfm. That is, the resctrl
tests should not fail to build if libpfm is not present but instead
L2 CAT just turns into a simple functional test. To accomplish this it looks
like tools/build/Makefile.feature can be helpful and already has a check
for libpfm.
Reinette
Powered by blists - more mailing lists