linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Slow boot due perhaps to locks in mouse and platform system
@ 2008-10-14 14:19 Phil Endecott
  2008-10-14 14:54 ` Dmitry Torokhov
  0 siblings, 1 reply; 13+ messages in thread
From: Phil Endecott @ 2008-10-14 14:19 UTC (permalink / raw)
  To: linux-input

Dear All,

I am seeing a 2-second pause while booting which I hypothesize is due 
to a locking interaction between the mouse system and the platform bus 
system.  Here's a fragment from dmesg:

[    2.202156] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.202170] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.202183] initcall i8042_init+0x0/0x32a returned 0 after 29 msecs
[    2.202191] calling  serio_raw_init+0x0/0x11 @ 1
[    2.202345] initcall serio_raw_init+0x0/0x11 returned 0 after 0 msecs
[    2.202356] calling  mousedev_init+0x0/0x72 @ 1
[    2.202638] mice: PS/2 mouse device common for all mice
[    2.202648] initcall mousedev_init+0x0/0x72 returned 0 after 0 msecs
[    2.202657] calling  evdev_init+0x0/0xa @ 1
[    2.208739] initcall evdev_init+0x0/0xa returned 0 after 5 msecs
[    2.208746] calling  atkbd_init+0x0/0x1b @ 1
[    2.208855] initcall atkbd_init+0x0/0x1b returned 0 after 0 msecs
[    2.208864] calling  psmouse_init+0x0/0x58 @ 1
[    2.232546] input: AT Translated Set 2 keyboard as /class/input/input5
[    2.247037] initcall psmouse_init+0x0/0x58 returned 0 after 36 msecs
[    2.247047] calling  pcspkr_init+0x0/0xa @ 1
[    2.247067] pcspkr_probe starting
[    2.249202] input: PC Speaker as /class/input/input6
[    2.259239] pcspkr_probe done
[    4.379527] input: ImPS/2 Logitech Wheel Mouse as /class/input/input7
[    4.387077] initcall pcspkr_init+0x0/0xa returned 0 after 2040 msecs

Note that the pause is between pcspkr_probe returning and pcspkr_init 
returning.  My guess is that during this time the platform bus is 
matching the pcspkr driver against all the other platform devices, and 
in order to do so it is taking various device locks; at the same time 
the kpsmoused workqueue is locking one of the same devices and spending 
a couple of seconds probing it.  But that's only a guess based on a 
couple of hours work; no doubt you experts will have a better idea of 
what's going on.

What can be done about this?  Is it unreasonable for the mouse probing 
to take 2 seconds?  Should it not be holding the conflicting lock while 
it is probing?  Does the platform matching code really need to hold the 
lock when it's just comparing the string names of the device and driver?

This is on an ASUS Eee 901, which is the same machine that Arjan van de 
Ven and Auke Kok have got to boot in 5 seconds (with only 1 second of 
that in the kernel).  As you can see I have some way to go still.  I 
would also be interested to hear if anyone knows what the touchpad in 
this machine really is - is "ImPS/2 Logitech Wheel Mouse" right?  I'd 
like to be able to tweak things like tap-to-click and two-finger scrolling.

Cheers,  Phil.




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

end of thread, other threads:[~2008-10-22 23:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 14:19 Slow boot due perhaps to locks in mouse and platform system Phil Endecott
2008-10-14 14:54 ` Dmitry Torokhov
2008-10-14 15:12   ` Arjan van de Ven
2008-10-14 15:29     ` Dmitry Torokhov
2008-10-14 15:37       ` Arjan van de Ven
2008-10-14 23:17         ` Phil Endecott
2008-10-15  2:22           ` Arjan van de Ven
2008-10-15  9:19             ` Phil Endecott
2008-10-22 23:07               ` Phil Endecott
2008-10-14 15:37       ` Arjan van de Ven
2008-10-14 15:48         ` Dmitry Torokhov
2008-10-14 15:58           ` Arjan van de Ven
2008-10-14 16:18     ` Phil Endecott

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).