[email protected]
[Top] [All Lists]

Bug#456214: marked as forwarded (hal: should not poll CD drive so often)

Subject: Bug#456214: marked as forwarded hal: should not poll CD drive so often
From: Debian Bug Tracking System
Date: Wed, 02 Apr 2008 09:57:16 +0000
Your message dated Wed, 02 Apr 2008 10:52:19 +0100
with message-id <[email protected]>
has caused the   report #456214,
regarding hal: should not poll CD drive so often
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
456214: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456214
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Subject: [PATCH] HAL polling, cd drives and wakeups
From: Sam Morris
Date: Wed, 02 Apr 2008 10:52:19 +0100
Brian Carlson noticed that HAL's polling of CD drives was causing his
system to wake up ~20 times a second, and filed a bug about it at
<http://bugs.debian.org/456214>.

He commented,

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

He also posted a patch, which I'd like to get reviewed upstream:

> Attached is a patch to fix the problem with wakeups.  This patch does 
> CDROM_MEDIA_CHANGED first, and if it reports true, then checks to make 
> sure the drive is closed and then that the drive is not lying.  This 
> causes the number of wakeups from HAL to go to zero.  It also has the 
> side effect of issuing an extra ioctl(2) when the drive tray is open, 
> which is harmless since the drive tray should be closed most of the 
> time.

The patch can be retrieved from
<http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=60;filename=hal.patch;att=1;bug=456214>.

Please keep Brian and [email protected] CC'd in replies.

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078

--- End Message ---
<Prev in Thread] Current Thread [Next in Thread>
  • Bug#456214: marked as forwarded (hal: should not poll CD drive so often), Debian Bug Tracking System <=