lkml.org 
[lkml]   [2009]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 00/13] devtmpfs patches
Arjan van de Ven <arjan@infradead.org> writes:

> On Sat, 9 May 2009 09:19:23 -0700
> Greg KH <gregkh@suse.de> wrote:
>
>
> btw... I would be a LOT happier about the solution from a technical
> point of view if it wasn't the kernel making the device node, but the
> kernel exposing a file with a list of all devices, so that userland can
> chose to mknod or not, with which permissions if non-default and with
> non-default owners.
> So basically (and I'm making up a filename here, don't read too much
> into that)
>
> cat /proc/alldevices
>
> c 1 4 foobar
> b 8 0 sda
> c 122 12 dri/card0
>
> etc
> making the actual nodes from this in the most simple case is basically
> no time in userspace, but a slightly more advanced early userspace app
> can even do permissions for the few device nodes where it matters etc.
>
> I can imagine that being a good solution that ends up solving your
> problem, but in a way that is more consistent with what the kernel does
> right now and how we can then have userland make decisions on where to
> make the nodes, with what perms etc etc.
> In fact such a file would be a greeat help in general, and would be a
> nice generic solution.

I just did a tiny 100 line test app.

It took me all of 0.06s to mount /sys and /dev and to walk sysfs and
create all 649 of the device nodes.

I had recently done "echo 3 > /proc/sys/vm/drop_caches" to ensure
that the test was cache cold.

Looking at Kay's test data he doesn't even try and mount root until
0.2s in.

It seems to me that 0.06s is in the noise, small enough that if even
0.06s is limiting basic optimization work is called for.

Eric


\
 
 \ /
  Last update: 2009-05-10 15:49    [W:0.187 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site