Re: What /proc should contain [was: /proc/driver/microcode]

From: H. Peter Anvin (hpa@transmeta.com)
Date: Wed Feb 23 2000 - 16:42:26 EST


Followup to: <20000223115417.A1246@xmission.com>
By author: Erik Andersen <andersen@xmission.com>
In newsgroup: linux.dev.kernel
>
> Everyone seems anxious about their favorite little text files the currently
> live in /proc. With a proper set of sysctl entries, those little text files
> could be easily recreated via user space apps. Heck, the whole current text
> file could be accessed via sysctl (no reason to keep them as simple one liners
> -- BSD has some multi line text files in there). This would leave /proc
> containing nothing but pid #'s, and a symlink to the current pid's /proc entry.
>
> The example of /proc/rtc was mentioned several times.
> Any reason that this file could not be replaced with
> rtc/rtc_time
> rtc/rtc_date
> rtc/rtc_epoch
> etc...
> sysctl entries? Or one fat "rtc" entry" that has the
> whole current file?
>

/proc/sys/dev/rtc/{time,date,epoch,...} probably would be better,
although sometimes with changing devices one have to consider the
issue of atomicity; sometimes one *have* to be able to perform complex
operations atomically. IMNSHO that's what /dev/rtc is for.

I personally think the strict formatting of sysctl() is a good thing,
although I do have to agree 10000% with Linus that sysctl() should be
entirely string-based. As for the sysctl() system call, I would
either remove it or replace it with a system call taking a file
descriptor to the appropriate /proc/sys node. Although redundant, it
might provide somewhat less overhead than the /proc/sys interface.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:34 EST