[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <79ccf66b-6bf0-4cc8-b001-aae44f09dde9@amd.com>
Date: Tue, 8 Oct 2024 11:00:37 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
eranian@...gle.com, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, kan.liang@...ux.intel.com, tglx@...utronix.de,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
santosh.shukla@....com, ananth.narayan@....com, sandipan.das@....com,
Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 5/8] perf/amd/ibs: Don't allow freq mode event creation
through ->config interface
>> Don't allow freq mode event creation through perf_event_attr->config
>> interface.
>
> Sounds reasonable. I agree the freq mode should use the standard
> interface using attr->sample_freq. But I'm not sure if the behaivor is
> defined when attr->freq is set and attr->sample_freq is 0. Maybe this
> should be handled in the generic code.
I also could not find any reason to allow {freq=1, sample_freq=0}, but:
1) perf_event_open() allows it.
2) ioctl(PERF_EVENT_IOC_PERIOD) allows it.
3) all generic code explicitly checks for ->sample_freq != 0 wherever
->freq == 1.
I will prepare and post a patch to reject such event and see if there
are any objections.
Thanks,
Ravi
Powered by blists - more mailing lists