* Udev incompatibility with qemu and bochs
@ 2005-10-19 8:39 Alexander E. Patrakov
2005-10-19 17:45 ` Greg KH
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alexander E. Patrakov @ 2005-10-19 8:39 UTC (permalink / raw)
To: linux-hotplug
Hello,
udevstart contains the following code:
static void asmlinkage sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
exit(1);
case SIGINT:
case SIGTERM:
exit(20 + signum);
}
}
int main(int argc, char *argv[], char *envp[])
{
/* snip */
sigaction(SIGALRM, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
/* trigger timeout to prevent hanging processes */
alarm(UDEV_ALARM_TIMEOUT);
/* snip */
}
UDEV_ALARM_TIMEOUT is defined to 120 seconds in udev.h. The problem is
that it does take 2 minutes to populate /dev inside slow emulators like
qemu or bochs, especially when the emulated and host CPU types differ
and udev rules include RUN+=/sbin/udev_run_hotplugd. The reason is that
inside those emulators exec() is very expensive (involves
jit-compilation from one sort of machine code to another). Please
provide an option to disable this alarm. The preferred form would be an
environment variable, so that I can type "linux UDEV_NO_ALARM=1" at the
boot prompt inside the emulator and see the system booting normally.
Thanks,
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Udev incompatibility with qemu and bochs
2005-10-19 8:39 Udev incompatibility with qemu and bochs Alexander E. Patrakov
@ 2005-10-19 17:45 ` Greg KH
2005-10-19 18:05 ` Kay Sievers
2005-10-20 1:45 ` Alexander E. Patrakov
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2005-10-19 17:45 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 19, 2005 at 02:39:45PM +0600, Alexander E. Patrakov wrote:
> UDEV_ALARM_TIMEOUT is defined to 120 seconds in udev.h. The problem is
> that it does take 2 minutes to populate /dev inside slow emulators like
> qemu or bochs, especially when the emulated and host CPU types differ
> and udev rules include RUN+=/sbin/udev_run_hotplugd. The reason is that
> inside those emulators exec() is very expensive (involves
> jit-compilation from one sort of machine code to another). Please
> provide an option to disable this alarm. The preferred form would be an
> environment variable, so that I can type "linux UDEV_NO_ALARM=1" at the
> boot prompt inside the emulator and see the system booting normally.
Feel free to provide such a patch, if you need it.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Udev incompatibility with qemu and bochs
2005-10-19 8:39 Udev incompatibility with qemu and bochs Alexander E. Patrakov
2005-10-19 17:45 ` Greg KH
@ 2005-10-19 18:05 ` Kay Sievers
2005-10-20 1:45 ` Alexander E. Patrakov
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2005-10-19 18:05 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 19, 2005 at 10:45:55AM -0700, Greg KH wrote:
> On Wed, Oct 19, 2005 at 02:39:45PM +0600, Alexander E. Patrakov wrote:
> > UDEV_ALARM_TIMEOUT is defined to 120 seconds in udev.h. The problem is
> > that it does take 2 minutes to populate /dev inside slow emulators like
> > qemu or bochs, especially when the emulated and host CPU types differ
> > and udev rules include RUN+=/sbin/udev_run_hotplugd. The reason is that
> > inside those emulators exec() is very expensive (involves
> > jit-compilation from one sort of machine code to another). Please
> > provide an option to disable this alarm. The preferred form would be an
> > environment variable, so that I can type "linux UDEV_NO_ALARM=1" at the
> > boot prompt inside the emulator and see the system booting normally.
>
> Feel free to provide such a patch, if you need it.
This timeout is a leftover from the days of tdb, which didn't work well
and caused udev processes to spin around in a corrupted database.
I generally don't like to introduce more facy options to udev and better
set the alarm timeout to a reasonable default or remove it at all.
The problem occurs only on bootup running udevstart, right?
(Depending on your setup 'UDEV_RUN=0 /sbin/udevstart' may be a good
option to speed up the initial population of /dev. Don't know it you
really need to have RUN at that time, depends on how udev is integrated.)
Kay
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Udev incompatibility with qemu and bochs
2005-10-19 8:39 Udev incompatibility with qemu and bochs Alexander E. Patrakov
2005-10-19 17:45 ` Greg KH
2005-10-19 18:05 ` Kay Sievers
@ 2005-10-20 1:45 ` Alexander E. Patrakov
2 siblings, 0 replies; 4+ messages in thread
From: Alexander E. Patrakov @ 2005-10-20 1:45 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
>This timeout is a leftover from the days of tdb, which didn't work well
>and caused udev processes to spin around in a corrupted database.
>
>I generally don't like to introduce more facy options to udev and better
>set the alarm timeout to a reasonable default or remove it at all.
>
>
Then please remove it.
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-20 1:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-19 8:39 Udev incompatibility with qemu and bochs Alexander E. Patrakov
2005-10-19 17:45 ` Greg KH
2005-10-19 18:05 ` Kay Sievers
2005-10-20 1:45 ` Alexander E. Patrakov
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).