From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>
Subject: Re: [PATCH] perf/core: move all of the pmu devices into their own location
Date: Wed, 5 Feb 2025 19:45:07 +0100 [thread overview]
Message-ID: <2025020544-shakily-flattered-93b7@gregkh> (raw)
In-Reply-To: <CAP-5=fUCDA1YLDrMgMpr=o4ESFey1b51+DfBwCF+cG7+-yidwg@mail.gmail.com>
On Wed, Feb 05, 2025 at 08:48:21AM -0800, Ian Rogers wrote:
> On Tue, Feb 4, 2025 at 9:41 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Feb 04, 2025 at 10:17:17AM -0800, Ian Rogers wrote:
> > > On Mon, Feb 3, 2025 at 11:05 PM Greg Kroah-Hartman
> > > <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > On Mon, Feb 03, 2025 at 11:44:13AM -0800, Ian Rogers wrote:
> > > > > On Mon, Feb 3, 2025 at 11:25 AM Greg Kroah-Hartman
> > > > > <gregkh@linuxfoundation.org> wrote:
> > > [snip]
> > > > > > Note, if you all don't like "pmu_bus" for the name, that's fine, please
> > > > > > let me know and I can rename it to something else, but it should be
> > > > > > something to get these objects out of the root sysfs directory.
> > > > >
> > > > > Excuse my ignorance, does the event_source bus already provide a
> > > > > similar solution?
> > > > > ```
> > > > > $ ls /sys/bus/event_source/devices
> > > > > breakpoint i915 msr uncore_arb uncore_cbox_3
> > > > > uncore_cbox_7 uprobe
> > > > > cpu intel_bts power uncore_cbox_0 uncore_cbox_4 uncore_clock
> > > > > cstate_core intel_pt software uncore_cbox_1 uncore_cbox_5
> > > > > uncore_imc_free_running_0
> > > > > cstate_pkg kprobe tracepoint uncore_cbox_2 uncore_cbox_6
> > > > > uncore_imc_free_running_1
> > > > > $ ls /sys/devices
> > > > > breakpoint intel_pt platform uncore_arb uncore_cbox_5
> > > > > uprobe
> > > > > cpu isa pnp0 uncore_cbox_0 uncore_cbox_6
> > > > > virtual
> > > > > cstate_core kprobe power uncore_cbox_1 uncore_cbox_7
> > > > > cstate_pkg LNXSYSTM:00 software uncore_cbox_2 uncore_clock
> > > > > i915 msr system uncore_cbox_3 uncore_imc_free_running_0
> > > > > intel_bts pci0000:00 tracepoint uncore_cbox_4 uncore_imc_free_running_1
> > > > > ```
> > > >
> > > > Those are the exact same device structures :)
> > > >
> > > > Look at /sys/bus/event_source/devices/ those are symlinks back to
> > > > /sys/devices. In other words, that's the exact same structures, and
> > > > the mess in /sys/devices/ with these event devices is what I am trying
> > > > to clean up.
> > >
> > > Thanks! Again my ignorance, why do we need pmu_bus?
> >
> > You need some sort of "bus" to group all of your devices on. It could
> > also be a class, your call. This is how the driver model in the kernel
> > works.
>
> Sure, I wasn't clear how this mapped out in sysfs.
>
> > > Could the symlinks in event_source be the actual devices?
> >
> > That's not how the driver model works.
>
> Ok, so I guess that's what's confusing me. Where will the new devices
> be in sysfs? If it is /sys/bus/pmu_bus then why is
> /sys/bus/event_source a different case? I guess I should read docs and
> the source :-)
Look at what is in /sys/bus/event_source/devices/ today. That's a bunch
of symlinks to where in /sys/devices/ the devices are located.
I just moved all of the pmu bus devices under /sys/devices/pmu_bus/
instead of them showing up in the root at /sys/devices/ as that's not
where a bus should be placing individual devices like this.
thanks,
greg k-h
next prev parent reply other threads:[~2025-02-06 14:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 19:25 [PATCH] perf/core: move all of the pmu devices into their own location Greg Kroah-Hartman
2025-02-03 19:44 ` Ian Rogers
2025-02-04 7:05 ` Greg Kroah-Hartman
2025-02-04 18:17 ` Ian Rogers
2025-02-05 5:41 ` Greg Kroah-Hartman
2025-02-05 16:48 ` Ian Rogers
2025-02-05 18:45 ` Greg Kroah-Hartman [this message]
2025-02-04 7:41 ` Alexander Shishkin
2025-02-04 10:16 ` Greg Kroah-Hartman
2025-02-04 14:06 ` Liang, Kan
2025-02-04 15:21 ` Greg Kroah-Hartman
2025-02-04 16:28 ` Greg Kroah-Hartman
2025-02-04 16:41 ` Vince Weaver
2025-02-04 17:12 ` Greg Kroah-Hartman
2025-02-04 17:49 ` Ian Rogers
2025-02-04 18:03 ` Greg Kroah-Hartman
2025-02-05 1:21 ` Vince Weaver
2025-02-05 5:45 ` Greg Kroah-Hartman
2025-02-05 15:06 ` Vince Weaver
2025-02-05 15:36 ` Greg Kroah-Hartman
2025-02-04 18:23 ` Liang, Kan
2025-02-05 16:00 ` Greg Kroah-Hartman
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=2025020544-shakily-flattered-93b7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.