Re: [PATCH 2/7] perf: Create a symlink for a PMU

Greg KH
2021-06-28T06:55:39Z

On Sun, Jun 27, 2021 at 09:30:53AM -0700, Andi Kleen wrote:
>
> > Then do not break things by renaming the device name, as you all have
> > now stated that this name is part of the user/kernel api.
>
> The renaming comes from the fallback mode on future systems. In the fallback
> mode the driver doesn't know the true name, so it has to use  the numeric
> name. If you don't use the fallback mode and have the full driver then yes
> you'll get the same names as always (or at least as they make sense for the
> hardware).
>
> But we would like to have the fallback mode too to allow more people use
> uncore monitoring, and that's where the need to for the second name comes
> in.

So then just always use the "fallback" name if that is going to be the
name you have for this hardware device. Why would you want it to be
renamed later on to a "fancier" name if there is only going to be
one-per-chipset-type anyway?

Naming is hard, make it simple and do not change it if your userspace
tools are not going to be able to handle the issue. Do NOT paper over
your naming scheme with symlinks from the very beginning, as that shows
the naming scheme is flawed.

thanks,

greg k-h