Re: configfs/sysfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Avi Kivity
Date: Thursday, August 20, 2009 - 9:14 pm

On 08/21/2009 01:48 AM, Joel Becker wrote:

Unless it's system dependent like many sysfs files.  If you're coding 
something that's supposed to run on several boxes, coding by example is 
not a good idea.  Look up the documentation to find out what the values 
look like (unfortunately often there is no documentation).

Looking at the value on your box does not indicate the range of values 
on other boxes or even if the value will be present on other boxes (due 
to having older kernels or different configurations).


Correct.  What I mean is that discoverability is great for a sysadmin or 
kernel developers exploring the system, but pretty useless for a 
programmer writing code that will run on other systems.  The majority of 
lkml users will find *fs easy to use and useful, but that's not the 
majority of our users.


Sure.


That's true for the lkml reader downloading a kernel from kernel.org 
(use git already) and run it on a random system.  But again the majority 
of users will run a distro which is supposed to integrate the kernel and 
userspace.  The short term gratification of early adopters harms the 
integration that more mainstream users expect.


Infrastructure must be careful not to code itself into a corner.  
Already udev takes quite a bit of time to run and I have some memories 
of problems on thousand-disk configurations.  What works reasonably well 
with one disk may not work as well with 1000.

No doubt some of the problem is with udev, but I'm sure sysfs 
contributes.  As a software development exercise reading a table of 1000 
objects each with a couple dozen attributes should take less that a 
millisecond.


We have strace and wireshark to decode binary syscall and wire streams.


A *fs interface limits what you can do, so it makes writing the API 
library harder.  I'm talking about the issues with atomicity and 
notifications.


As a kernel/user interface, any syscall replacement for *fs is exposed 
via strace.  It's true that debugging C code is harder than a bit of bash.


No, I have to use *fs (at least sysfs) since that's the current blessed 
interface.  Fragmenting the kernel/userspace is the wrong thing to do, I 
value a consistent interface more than fixing the *fs problems (which 
are all fixable or tolerable).

This is not a call to deprecate *fs and switch over to a yet another new 
thing.  Users (and programmers) need some ABI stability.  It just arose 
because I remarked that I'm not in love with *fs interfaces in an 
unrelated flamewar and someone asked me why.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v3 0/6] AlacrityVM guest drivers, Gregory Haskins, (Fri Aug 14, 8:42 am)
[PATCH v3 1/6] shm-signal: shared-memory signals, Gregory Haskins, (Fri Aug 14, 8:42 am)
[PATCH v3 4/6] vbus-proxy: add a pci-to-vbus bridge, Gregory Haskins, (Fri Aug 14, 8:43 am)
[PATCH v3 5/6] ioq: add driver-side vbus helpers, Gregory Haskins, (Fri Aug 14, 8:43 am)
[PATCH v3 6/6] net: Add vbus_enet driver, Gregory Haskins, (Fri Aug 14, 8:43 am)
configfs/sysfs, Avi Kivity, (Wed Aug 19, 1:12 pm)
Re: configfs/sysfs, Ingo Molnar, (Wed Aug 19, 1:48 pm)
Re: configfs/sysfs, Avi Kivity, (Wed Aug 19, 1:53 pm)
Re: configfs/sysfs, Nicholas A. Bellinger, (Wed Aug 19, 2:19 pm)
Re: configfs/sysfs, Gregory Haskins, (Wed Aug 19, 3:15 pm)
Re: configfs/sysfs, Joel Becker, (Wed Aug 19, 3:16 pm)
Re: [Alacrityvm-devel] configfs/sysfs, Alex Tsariounov, (Wed Aug 19, 4:48 pm)
Re: configfs/sysfs, Nicholas A. Bellinger, (Wed Aug 19, 4:54 pm)
Re: configfs/sysfs, Avi Kivity, (Wed Aug 19, 11:09 pm)
Re: configfs/sysfs, Joel Becker, (Thu Aug 20, 3:48 pm)
Re: configfs/sysfs, Avi Kivity, (Thu Aug 20, 9:14 pm)