sensors framework continued (architecture)
    Alexander Leidinger 
    Alexander at Leidinger.net
       
    Tue Nov 27 07:36:16 PST 2007
    
    
  
Quoting Nikolay Pavlov <qpadla at gmail.com> (from Mon, 26 Nov 2007  
19:56:11 +0200):
> On Monday 26 November 2007 15:33:19 Alexander Leidinger wrote:
>> What we discuss in this thread is the kernel<->userland interface. You �
>> wrote that Linux uses sysfs as the kernel<->userland interface. Poul �
>> proposes the /dev/sensors special file (not directory) as the �
>> kernel<->userland interface, and I propose sysctl as the �
>> kernel<->userland interface.
>
> This is file descriptor based interface if i am not mistaken. But it uses
> natural MIB-like directory structure. Isn't this is a compromise?
It would be a compromise from the MIB point of view, but not from the  
complexity point of view. For a directory structure you need to write  
a pseudo-fs. This means everything has to go through the several  
layers (vfs, pseudo-fs, ...). With sysctl you don't need to write that  
much complex code, as you already have something which handles the MIB  
thing and you don't go through that much complex layers. => less code,  
less to debug, less complexity. The discussion in this thread is, that  
I think a FD based approach (and the additional things Poul proposes  
to do in the kernel) is overly complex, it can be done in userland  
(the additional things he proposes t put into the kernel) with  
existing interfaces (sysctl).
Bye,
Alexander.
-- 
If you sit down at a poker game and don't see a sucker, get up.  You're
the sucker.
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137
    
    
More information about the freebsd-arch
mailing list