From owner-cvs-all@FreeBSD.ORG Thu Oct 18 08:33:25 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EC7E16A41A; Thu, 18 Oct 2007 08:33:25 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 1361313C457; Thu, 18 Oct 2007 08:33:24 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (s5o01cp7fozb7pxp@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l9I8XOFw036425; Thu, 18 Oct 2007 01:33:24 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l9I8XNqC036424; Thu, 18 Oct 2007 01:33:23 -0700 (PDT) (envelope-from jmg) Date: Thu, 18 Oct 2007 01:33:22 -0700 From: John-Mark Gurney To: Andrey Chernov , Alexander Leidinger , Poul-Henning Kamp , Wilko Bulte , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-ID: <20071018083322.GX39759@funkthat.com> Mail-Followup-To: Andrey Chernov , Alexander Leidinger , Poul-Henning Kamp , Wilko Bulte , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <20071015152408.10kvgtog6cooc4wc@webmail.leidinger.net> <48258.1192460507@critter.freebsd.dk> <20071015210909.1b6b693b@deskjail> <20071015202115.GP39759@funkthat.com> <20071016184047.8zh3fl90gksks40c@webmail.leidinger.net> <20071017202312.GA78324@nagual.pp.ru> <20071018000032.GU39759@funkthat.com> <20071018011425.GA82493@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071018011425.GA82493@nagual.pp.ru> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hydrogen.funkthat.com [127.0.0.1]); Thu, 18 Oct 2007 01:33:24 -0700 (PDT) Cc: Subject: Re: cvs commit: src/etc Makefile sensorsd.conf src/etc/defaults rc.conf src/etc/rc.d Makefile sensorsd src/lib/libc/gen sysctl.3 src/sbin/sysctl sysctl.8 sysctl.c src/share/man/man5 rc.conf.5 src/share/man/man9 Makefile sensor_attach.9 src/sys/conf files ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 08:33:25 -0000 Andrey Chernov wrote this message on Thu, Oct 18, 2007 at 05:14 +0400: > On Wed, Oct 17, 2007 at 05:00:33PM -0700, John-Mark Gurney wrote: > > > Why not to put them under DEVFS like /dev/sensors/* ? They are devices > > > after all. I agree that putting devices under sysctl.* is bad idea. > > > > a) How does a userland driver present a DEVFS/device instance? > > > > b) For exporting a simple integer, sysctl makes more sense than the > > device interface. (I'm not getting into naming the sysctl node, or > > where it should be located.) > > Your a) and b) are in logical conflict. If they are only simple integers I never said they weren't... You asked why don't we put simple sensors like fan rpm as a device such as /dev/sensors/fan0, I replied w/ two examples/issues... > (in general sensor can be more complicated than single integer) why If it's more complicated then that's different, but from my understanding of the OpenBSD sensor framework is that you'd end up breaking those "complicated" sensors into seperate sensors... > userland driver is ever needed? Simple daemon is enough. Exactly my point... A userland driver is necessary if all sensores are to be listed in /dev/sensors/*... If it's only a subset that a userland library uses to query a few sensors like current cpu temperature, and the rest from a userland daemon, that's fine too... But /dev/sensors/* is should not be the complete or primary source of sensor data... > I think loadable kernel modules are not worse than userland drivers since > can be used only by those who needs them. Besides violating the first rule of kernel programming... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."