[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB60835DDCB1F3EBC8B6DFA2F7FC299@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Mon, 17 Oct 2022 16:09:23 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Borislav Petkov <bp@...en8.de>
CC: "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] RAS: Fix the trace_show() function to output
trace_count
> 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
Powered by blists - more mailing lists