Re: [RFC] use of /sys versus /proc

From: Cliff Wickman
Date: Fri May 23 2008 - 16:45:29 EST


On Fri, May 23, 2008 at 01:19:20PM -0400, Valdis.Kletnieks@xxxxxx wrote:
> On Fri, 23 May 2008 08:12:55 CDT, Cliff Wickman said:
> >
> > I have a need to display TLB shootdown statistics. (I'm working
> > on a patch to implement this on a new machine at SGI.)
> >
> > I had planned to display these statistics through /proc
> > as in arch/ia64/sn/kernel/sn2/sn2_smp.c (/proc/sgi_sn/ptc_statistics).
> >
> > However, considering the general move to reserve /proc for
> > process-related things, I thought the community might prefer the
> > interface to be in /sys.
>
> Is debugfs an option?

I tried that out and it works about like /proc, which is good.
It doesn't clutter /proc.
Plus it can disappear gracefully from the kernel if CONFIG_DEBUG_FS
is set off. (it is set on in the default x86_64 configuration)

So thanks for the suggestion. It may be the answer.

--
Cliff Wickman
Silicon Graphics, Inc.
cpw@xxxxxxx
(651) 683-3824
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/