On Sun, Dec 16, 2007 at 01:31:11AM +0000, brian m. carlson wrote: > On Sat, Dec 15, 2007 at 08:10:04PM +0100, Sjoerd Simons wrote: >> On Thu, Dec 13, 2007 at 10:21:06PM +0100, Michael Biebl wrote: >>> > [0] I suspect it is 10 times a second, because that's the number of >>> > libata wakeups I see, but I haven't actually checked. >>> >>> Hal polls the CD drive every 2 seconds afaik. >> >> Hal indeed polls every 2 seconds at most and even less when something hints >> hal >> that nobody the machine is idle. > > hald-addon-storage claims it is polling every two seconds: > > lakeview ok % ps ax | grep hald-addon-storage > 3600 ? S 0:06 hald-addon-storage: polling /dev/scd0 (every 2 sec) > >> Could you strace the running hald-addon-storage to check if indeed it's >> polling >> your drive multiple times a second ? > > Output of strace: > > open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 5 > ioctl(5, CDROM_DRIVE_STATUS, 0x7fffffff) = 2 > close(5) = 0 > poll([{fd=3, events=POLLIN}], 1, 1981) = 0 > poll([{fd=3, events=POLLIN}], 1, 0) = 0 > open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 5 > ioctl(5, CDROM_DRIVE_STATUS, 0x7fffffff) = 2 > close(5) = 0 > poll([{fd=3, events=POLLIN}], 1, 1980) = 0 > open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 5 > ioctl(5, CDROM_DRIVE_STATUS, 0x7fffffff) = 2 > close(5) = 0 > poll([{fd=3, events=POLLIN}], 1, 1981) = 0 > poll([{fd=3, events=POLLIN}], 1, 0) = 0 > open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 5 > ioctl(5, CDROM_DRIVE_STATUS, 0x7fffffff) = 2 > close(5) = 0 > poll([{fd=3, events=POLLIN}], 1, 1981) = 0 > poll([{fd=3, events=POLLIN}], 1, 0) = 0 > > Is it possible that opening and closing the drive is causing the wakeups? > I ask because I'm seeing 10 libata wakeups and about 10 > "rescheduling interrupts" wakeups whenever hal is polling:
strace -tt would be more usefull as that outputs timing information. The open,ioctl,close triple will cause various wakeups every two seconds.. But only in a short time, so that shouldn't have a big impact on the time your processor can actually spent in a lower power state. Polling is indeed not a great thing to do, but unfortunately cd drivers don't appear to have a nice way to notify media insertion. Sjoerd -- No amount of careful planning will ever replace dumb luck. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]