[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWbs74a2ta_fxJdXhfzf9rQa4Uv0LNjOZqp1-=izkBFMg@mail.gmail.com>
Date: Tue, 7 Jan 2025 08:01:20 -0800
From: Ian Rogers <irogers@...gle.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>, Jesper Juhl <jesperjuhl76@...il.com>, Sam James <sam@...too.org>,
Namhyung Kim <namhyung@...nel.org>, linux-kernel@...r.kernel.org,
Kan Liang <kan.liang@...el.com>
Subject: Re: [PATCH v1] tools lib api cpu: Remove unused file
On Tue, Jan 7, 2025 at 6:22 AM Liang, Kan <kan.liang@...ux.intel.com> wrote:
>
> On 2025-01-06 5:32 p.m., Ian Rogers wrote:
> > On Thu, Dec 19, 2024 at 12:54 PM Ian Rogers <irogers@...gle.com> wrote:
> >>
> >> No use in tools could be found, remove to simplify the code base.
> >>
>
> This was to support the patch which generate per-sample
> freq/CPU%/CORE_BUSY%.
> https://lore.kernel.org/lkml/1442413316-33518-1-git-send-email-kan.liang@intel.com/
>
> However, the patch set was not merged. I don't remember the exact reason.
>
> It looks like there is no one interested in it. There should be no
> reason to keep it.
>
> Acked-by: Kan Liang <kan.liang@...ux.intel.com>
Thanks Kan! That series looks nice. There is an overlap with computing
frequencies and metrics like cpu_operating_frequency:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json?h=perf-tools-next#n45
I wonder two things:
1) perhaps we can add the --perf-freq flag but make the implementation
use metrics rather than hard coded events. Outside of perf stat the
json metrics aren't really plumbed up, so this would be a bunch of
work.
2) the metrics compute the TSC frequency from cpuid, and fall back to
/proc/cpuinfo:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/arch/x86/util/tsc.c?h=perf-tools-next
Perhaps there should be another fallback to
/sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq, as in this
series.
Thanks,
Ian
Powered by blists - more mailing lists