From owner-freebsd-current Tue Sep 16 22:13:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA15896 for current-outgoing; Tue, 16 Sep 1997 22:13:44 -0700 (PDT) Received: from zippy.dyn.ml.org (garbanzo@haiti-93.ppp.hooked.net [206.169.228.93]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA15889 for ; Tue, 16 Sep 1997 22:13:32 -0700 (PDT) Received: from localhost (garbanzo@localhost) by zippy.dyn.ml.org (8.8.7/8.8.7) with SMTP id WAA04427; Tue, 16 Sep 1997 22:13:05 -0700 (PDT) X-Authentication-Warning: zippy.dyn.ml.org: garbanzo owned process doing -bs Date: Tue, 16 Sep 1997 22:13:03 -0700 (PDT) From: Alex To: Simon Shapiro cc: current@FreeBSD.ORG Subject: Re: Does this idea have merit? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 16 Sep 1997, Simon Shapiro wrote: > > Hi Alex; On 17-Sep-97 you wrote: > > > > > > On Sat, 13 Sep 1997, Poul-Henning Kamp wrote: > > > > > In message <199709131739.MAA00426@watcher.isl.net>, Daniel Ortmann > > > writes: > > > > > > >On the other hand, maybe I'm missing something basic. Is there > > > >some other way to find out (without forking a /bin/ps): > > > > > > cat /proc/*/status | grep ... ? > > > > > > Extending the tree in procfs is not for the faint ... > > > > It probably is, but one of the things I liked about Linux was the > > ability > > to get loads of information about certian drivers by checking the proc > > fs. > > How hard would it be to impliment something like that under procfs or > > say > > under something else? > > The problem with Linux's /proc is that it is very much a hack. The > interface is simply too complex and bloats the kernel too. I did kinda get that feeling by looking at it. I still think something like this would be useful in a filesystem, whether devfs, or someotherfs. > I implemented, for the DPT driver, a much simpler mechanism, write a > command into /dev/dptX (such as ``echo -n "foo" > /dev/dpt0'') and then > read form /dev/dptX (such as ``cat < /dev/dpt0''). Gives you the same > result, 1/10 or less of the code. > I ended up tearing most of it out; Still took too much code in the kernel. > In the newest DPT driver, you can acomplish the same with an IOCTL and a > trivial utility. Some of our staff really liked the read/write interface. > Some could not stand it. Same could be said about /proc; It may be good > for certain things, but less for others. I find the fs semantics in the > kernel too complex, butt this is just me being an old fart :-) That's where I think filesystems in an LKM come in handy. - alex