Messages in this thread | | | From | "Andrey Borzenkov" <> | Subject | Re: module-init-tools/udev and module auto-loading | Date | Tue, 03 Feb 2004 18:00:51 +0300 |
| |
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/
| |