public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: module-init-tools/udev and module auto-loading
@ 2004-02-02  7:20 "Andrey Borzenkov" 
  2004-02-02  7:34 ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: "Andrey Borzenkov"  @ 2004-02-02  7:20 UTC (permalink / raw)
  To: "Greg KH" ; +Cc: linux-kernel


>> Hi
>> 
>> A quick question on module-init-tools/udev and module auto-loading ...
>> lets say I have a module called 'foo', that I want the kernel to
>> auto-load.
>
> Wait, stop right there.  When do you want the module autoloaded?

for legacy hardware that cannot generate any hotplug event when
connected.

Parallel port Jaz that I have. I usually have it switched off
or simply disconnected (let's leave the question of how safe is
to plug in parallel port cable aside). When I turn it on there is
no hotplug event available. Meaning

- either I have to load ppa (given current implementation)
- or initiate rescan of ppa scsi bus (if it is ever changed to new
  model)

I guess other parallel port devices share the same issue.

so there are cases when "action on access" makes sense.

regards

-andrey

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: module-init-tools/udev and module auto-loading
@ 2004-02-03 15:00 "Andrey Borzenkov" 
  0 siblings, 0 replies; 20+ messages in thread
From: "Andrey Borzenkov"  @ 2004-02-03 15:00 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* module-init-tools/udev and module auto-loading
@ 2004-02-01 22:31 Martin Schlemmer
  2004-02-02  0:10 ` Rusty Russell
  2004-02-02  5:21 ` Greg KH
  0 siblings, 2 replies; 20+ messages in thread
From: Martin Schlemmer @ 2004-02-01 22:31 UTC (permalink / raw)
  To: Linux Kernel Mailing Lists; +Cc: Greg KH, Rusty Russell

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Hi

A quick question on module-init-tools/udev and module auto-loading ...
lets say I have a module called 'foo', that I want the kernel to
auto-load.

If I now have in modprobe.conf:

--
alias char-major-<foo_major>-* foo
alias /dev/foo foo
--

and /dev/foo exists, it works just fine.  If I delete /dev/foo
however, it does not.  Say the module _do_ support sysfs (meaning
udev will create /dev/foo on loading, this do not really affect
things, as without /dev/foo it do not work anyhow.

This a known issue (sure I know I can add it to local initscript to
load, but this is not always the preferred 'fix')?  Any ideas on
how to 'fix' this?

Then a distant related issue - anybody thought about dynamic major
numbers of 2.7/2.8 (?) and the 'alias char-major-<whatever>-* whatever'
type modprobe rules (as the whole fact of them being dynamic, will make
that alias type worthless ...)?


Thanks,

-- 
Martin Schlemmer

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2004-02-04  4:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-02  7:20 module-init-tools/udev and module auto-loading "Andrey Borzenkov" 
2004-02-02  7:34 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2004-02-03 15:00 "Andrey Borzenkov" 
2004-02-01 22:31 Martin Schlemmer
2004-02-02  0:10 ` Rusty Russell
2004-02-02 19:02   ` Martin Schlemmer
2004-02-03  0:55     ` Rusty Russell
2004-02-03  4:55       ` Martin Schlemmer
2004-02-03 17:48       ` Martin Schlemmer
2004-02-03 19:33         ` viro
2004-02-03 20:47           ` Martin Schlemmer
2004-02-03 20:53             ` viro
2004-02-03 21:34               ` Martin Schlemmer
2004-02-04  1:22         ` Rusty Russell
2004-02-04  2:04           ` viro
2004-02-04  3:43             ` Rusty Russell
2004-02-02  5:21 ` Greg KH
2004-02-02 18:12   ` Jamie Lokier
2004-02-02 19:14     ` Martin Schlemmer
2004-02-02 19:13   ` Martin Schlemmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox