From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: [ANNOUNCE] udev 021 release
Date: Wed, 03 Mar 2004 15:49:40 +0000 [thread overview]
Message-ID: <200403032049.40737.patrakov@ums.usu.ru> (raw)
In-Reply-To: <20040303000957.GA11755@kroah.com>
On Wednesday 03 March 2004 17:22, Ed Tomlinson wrote:
> On March 03, 2004 04:56 am, Michael Weiser wrote:
> > Normally with static /dev one has a /dev/dsp device for example. As soon
> > as an application tries to open it the kernel would try to load a module
> > "sound" or "char-major-something" if sound support isn't compiled into
> > it. Now with udev I'll never get /dev/dsp in the first place and there's
> > no mechanism like devfs's file open monitoring and subsequent device
> > file creation. So my idea is to initialise /dev with some static files,
> > for hardware I know is there but hasn't had a driver loaded yet. My
> > question is: Is there a nicer and more elegant way than just unpacking a
> > tarball into /dev before starting udevd? A tarball would also break a
> > (theoretical) use of dynamic major/minor numbers by the kernel.
>
> Would it be possible to have something in the module itself? i.e. We
> create a new macro to add info that a script can use. This info could live
> in a new file in lib/modules or in the actual module. This could be used
> to create the static setup dynamicly.
Actually, I am now busy implementing this (if you want, race with me - I am a
very slow coder). My implementation, however, uses a
directory: /lib/modules/2.6.3/sys. The entries are supposed to be in sysfs
format, and defined in modules themseves, like:
MODULE_INFO(syshint, "block/loop0/dev=7:0");
Of course, a change to the depmod program is needed to create this hierarchy
based on such "syshint" information.
Already found a bad thing with my approach: the loop module accepts a
parameter max_loop:Maximum number of loop devices (1-256), and we should
create the same (dynamic!) number of sysfs entries. The mismatch can lead to
races e.g.:
1) Suppose that we create only one such syshint
2) The initscript creates only one /dev/loop0 device
3) An app wants to open /dev/loop0
4) The kernel modprobes block-major-7-0, i.e. loop
5) Udev is run in order to create all other loop devices, but it runs slowly.
6) An app wants to open /dev/loop1, but udev hasn't created this yet
7) Slow udev finally creates /dev/loop1
--
Alexander E. Patrakov
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2004-03-03 15:49 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-03 0:09 [ANNOUNCE] udev 021 release Greg KH
2004-03-03 0:25 ` Greg KH
2004-03-03 1:16 ` Marco d'Itri
2004-03-03 3:09 ` Greg KH
2004-03-03 9:56 ` Michael Weiser
2004-03-03 12:22 ` Ed Tomlinson
2004-03-03 15:14 ` Greg KH
2004-03-03 19:28 ` David Brownell
2004-03-03 22:53 ` Michael Weiser
2004-03-04 1:25 ` Greg KH
2004-03-04 3:58 ` Bill Nottingham
2004-03-04 18:26 ` Greg KH
2004-03-04 1:22 ` Marco d'Itri
2004-03-04 1:28 ` Greg KH
2004-03-04 9:27 ` Michael Weiser
2004-03-03 15:15 ` Greg KH
2004-03-03 23:56 ` Michael Weiser
2004-03-04 1:19 ` Greg KH
2004-03-03 10:19 ` Marco d'Itri
2004-03-03 10:52 ` Alexander E. Patrakov
2004-03-03 11:02 ` Marco d'Itri
2004-03-03 15:49 ` Alexander E. Patrakov [this message]
2004-03-04 1:18 ` Marco d'Itri
[not found] ` <4046CE91.50701@kubla.de>
2004-03-04 18:44 ` Greg KH
[not found] ` <40482ACC.3070504@kubla.de>
2004-03-10 22:53 ` Greg KH
[not found] ` <1078422507.3614.20.camel@nosferatu.lan>
2004-03-04 18:46 ` Greg KH
2004-03-09 11:51 ` "Andrey Borzenkov"
2004-03-10 2:34 ` Oliver Neukum
2004-03-10 12:29 ` "Andrey Borzenkov"
2004-03-10 12:56 ` Prakash K. Cheemplavam
2004-03-10 22:51 ` Greg KH
2004-03-10 23:17 ` Prakash K. Cheemplavam
2004-03-11 1:21 ` Greg KH
2004-03-13 9:34 ` Prakash K. Cheemplavam
2004-03-11 3:30 ` Oliver Neukum
2004-03-11 9:22 ` "Andrey Borzenkov"
2004-03-12 23:39 ` Greg KH
[not found] <20040303153403.21649.81059.Mailman@linux.us.dell.com>
[not found] ` <4048D503.10808@mail.ru>
2004-03-09 8:19 ` Greg KH
2004-03-09 10:16 ` rihad
2004-03-09 13:43 ` Alex Goddard
2004-03-10 22:52 ` Greg KH
[not found] <fa.dbn18ei.1k46o3i@ifi.uio.no>
[not found] ` <fa.afjk56q.t0ulic@ifi.uio.no>
2004-03-10 13:02 ` walt
2004-03-10 21:01 ` Prakash K. Cheemplavam
[not found] <fa.fkf6pbs.vk4328@ifi.uio.no>
[not found] ` <fa.aj3o3v7.pgqn9l@ifi.uio.no>
[not found] ` <404F9E5F.2010001@myrealbox.com>
2004-03-11 0:11 ` Prakash K. Cheemplavam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403032049.40737.patrakov@ums.usu.ru \
--to=patrakov@ums.usu.ru \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).