lkml.org 
[lkml]   [2004]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: module-init-tools/udev and module auto-loading
Date
You already have the implementation , it is called devfs. Why
reinvent the wheel?

> I guess there will be cries of murder if 'somebody' suggested that if
> a node in /dev is opened, but not there, the kernel can call
> 'modprobe -q /dev/foo' to load whatever alias there might have been?

this is exactly what was described as "unsolvable races in devfs
code". The problem is:

- lookup is run under directory i_sem. If you spawn anything
synchronously (waiting for it to finish) and it tries (intentionally
or not) access the same directory you get deadlock.

- calling it asynchronously does not buy you much because it still
means you must return -ENOENT first time.

I hope to have fixed the first type of races meaning that either
devfs (after some - significant - cleanup) may be used for that
or another file system written from scratch.

main problems in devfs are associated with the fact that contents
may change asynchronously wrt to upper layer. Removing everything
related to name registration from kernel will give you ligh weight
implementation capable of do what you want.

-andrey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.034 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site