[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fX3q8eS5yPK2RHFeLDH2LReaiaCOzTQrk+9wsQxZ1g34w@mail.gmail.com>
Date: Wed, 21 Jun 2023 22:44:37 -0700
From: Ian Rogers <irogers@...gle.com>
To: Ravi Bangoria <ravi.bangoria@....com>
Cc: peterz@...radead.org, acme@...nel.org, jolsa@...nel.org,
namhyung@...nel.org, bp@...en8.de, x86@...nel.org,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
sandipan.das@....com, ananth.narayan@....com,
santosh.shukla@....com
Subject: Re: [PATCH] perf/amd: Prevent grouping of IBS events
On Wed, Jun 21, 2023 at 10:39 PM Ravi Bangoria <ravi.bangoria@....com> wrote:
>
> Hi Ian,
>
> >> Before:
> >> $ sudo ./perf record -e "{ibs_op//,ibs_op//}" -C 0
> >> ^C[ perf record: Woken up 1 times to write data ]
> >> [ perf record: Captured and wrote 0.540 MB perf.data (531 samples) ]
> >>
> >> After:
> >> $ sudo ./perf record -e "{ibs_op//,ibs_op//}" -C 0
> >> Error:
> >> AMD IBS may only be available in system-wide/per-cpu mode.
> >> Try using -a, or -C and workload affinity
> >>
> >> The error message is stale and misleading. I have a patch to fix it.
> >> I'll post it separately.
> >
> > Thanks Ravi, so this is a workaround for a PMU driver bug where the
> > perf_event_open should have failed for the sibling event?
>
> This is not a workaround. This kernel patch fixes PMU driver bug. With
> the patch, perf_event_open() will fail for sibling IBS event if either
> group leader or any other sibling is of the same IBS pmu. Or did I
> misread your comment?
>
> >
> > The behavior is somewhat reminiscent of arch_evsel__must_be_in_group:
> > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/arch/x86/util/evsel.c?h=perf-tools-next#n41
> >
> > Normally software events would be valid in the group, should the code
> > ignore these?
>
> Grouping of SW and IBS event will continue to work after this patch.
Sorry Ravi, I've got my head in the clouds. I was reading this as a
tools patch :-)
Thanks,
Ian
> Thanks,
> Ravi
Powered by blists - more mailing lists