On Sun, Dec 16, 2007 at 09:38:48PM +0100, Sjoerd Simons wrote:
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.

I'll get that to you as soon as I log out and log in again. hal-disable-polling --enable-polling is broken (see the bug report I just filed).

I'm not exceptionally pleased by the fact that HAL is polling at all; polling is a fundamentally broken way to do things, and despite the fact that the hardware is broken (by not supporting the MMC commands), it still rubs me the wrong way. Whatever it's doing, it should not be waking up the processor on average 20 times a second.

I will do some tests to see if hal-addon-storage wakes up the processor less if it doesn't open and close the drive all the time.

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.

Apparently hal knows that my drive supports CDROM_MEDIA_CHANGED, but it's not using it. Why? Ah, I see, it's checking if the tray is open first. Shouldn't it be checking only to see if there's a media change, since obviously if the tray is open, the media hasn't been changed yet? Then you can make the kernel do the hard work of determining how to most efficiently check the media change notification, with the asynchronous API, or the inefficient (polling) one.

And apparently hal doesn't support using the MMC-2 API, it seems.
Why?  MMC-2 is ancient, and most drives should support it.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
a typesetting engine: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply via email to