Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [PATCH v2] RAS: Fix the trace_show() function to output trace_count | Date | Mon, 17 Oct 2022 16:09:23 +0000 |
| |
> Still misleading: > > $ cat /sys/kernel/debug/ras/daemon_active > 1
Agreed. It needs user to interpret the answer. The filename would lead them to think "1" means the daemon is active, but its actually just a count of how many times the file is concurrently open (which includes the "cat" process reading the file).
> I don't know, maybe we should teach RAS daemons to ->write() into that > file their name and PID so that the trace_count counts *only* the RAS > daemons not any reader...
Should have thought of this earlier ... changing user space semantics is hard. Even with only one user, there is a long transition period where new kernels are running with old rasdaemon and vice versa.
How about:
seq_printf(m, "%d\n", atomic_read(&trace_count) - 1);
with a comment that users reading the file only want to know if anyone else has it open?
-Tony
| |