lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] RAS: Fix the trace_show() function to output trace_count
Date
> 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


\
 
 \ /
  Last update: 2022-10-17 18:12    [W:2.889 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site