Re: [PATCH v6 06/11] printk: console: Introduce sysfs interface for per-console loglevels
From: Petr Mladek
Date: Wed Jan 15 2025 - 05:35:31 EST
On Fri 2025-01-10 11:27:53, Joel Granados wrote:
> On Mon, Oct 28, 2024 at 04:45:46PM +0000, Chris Down wrote:
> > A sysfs interface under /sys/class/console/ is created that permits
> > viewing and configuring per-console attributes. This is the main
> > interface with which we expect users to interact with and configure
> > per-console loglevels.
> These are different from the knobs that you added to sysctl. right? The
> ones in sysctl are general values as opposed to console specific.
>
> Would it make sense to put everything in here (sys) instead of having
> them separate?
I thought about this as well. It would be nice to have the setting
in one place.
But I am afraid that it can't be done easily. I think that I looked
this variant and did not find a way how to do it with the existing
API around struct device, /sys/class, ... That said, I am not familiar
with the API. It is quite possible that I just missed it.
One advantage of the /proc/sys/ is that the values might be modified
using the sysctl tool. It might be easier than searching the maze
of directories under /sys. And the global values might be enough
for most users.
Best Regards,
Petr
PS: AFAIK, Chris is going to send an updated version of this patchset.
He postponed it until the per-console kthreads were introduced...