hald-addon-storage causes a lot of wakeups

Bug #127559 reported by Stefan Fleiter
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: hal

With a recent Ubuntu Gutsy installation hald-addon-storage causes
50 wakeups per CD-ROM drive and second.
Since I have 2 CD-ROM drives I have 100 wakeups per second only to
check for media changes.
That makes ~30000 wakeups in a normal working day and worsens
performance and battery time (for laptops).

I have the CD-ROM drives at an Adaptec AHA-2940U:

# lspci -v
[..]
00:0b.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U
        Flags: bus master, medium devsel, latency 32, IRQ 16
        I/O ports at d000 [disabled] [size=256]
        Memory at eb000000 (32-bit, non-prefetchable) [size=4K]
        [virtual] Expansion ROM at 50000000 [disabled] [size=64K]

No other drives are connected to the SCSI controller:

# lsscsi -v
[0:0:3:0] cd/dvd PLEXTOR CD-ROM PX-12TS 1.02 /dev/scd0
  dir: /sys/bus/scsi/devices/0:0:3:0 [/sys/devices/pci0000:00/0000:00:0b.0/host0/target0:0:3/0:0:3:0]
  [0:0:5:0] cd/dvd TEAC CD-R58S 1.0H /dev/scd1
    dir: /sys/bus/scsi/devices/0:0:5:0 [/sys/devices/pci0000:00/0000:00:0b.0/host0/target0:0:5/0:0:5:0]

The kernel is up to date, too:
# uname -r
2.6.22-8-generic

powertop (media check for both CD-ROM drives):
Top causes for wakeups:
  42.3% ( 99.0) <interrupt> : aic7xxx
   0.4% ( 1.0) hald-addon-stor : schedule_timeout (process_timeout)

# hal-disable-polling --device /dev/scd1

powertop (media check only for Plextor CD-ROM drive):
Top causes for wakeups:
  25.3% ( 49.5) <interrupt> : aic7xxx
   0.3% ( 0.5) hald-addon-stor : schedule_timeout (process_timeout)

# hal-disable-polling --device /dev/scd0

powertop (no media check for CD-ROM drives):
No aic7xxx and hald-addon-storage in profile

I don't know whether this problem is related to my hardware
configuration or not, especially interesting would be a comparison
to IDE drives.

Revision history for this message
mon (javiermon-deactivatedaccount) wrote :

Hi

powertop also made the same suggestion to me.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

Does anybody else see so many wakeups triggered by hald-addon-storage?

Revision history for this message
Rafal Kwasny (mag) wrote :

I do not see that much wakeup events
cdrom should be polled once/twice a second
however powertop suggests to disable polling of /dev/scd0

this bug seems related:
https://bugs.launchpad.net/ubuntu/+source/hal/+bug/27323

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

I've straced hald-addon-storage.
The output seems reasonable.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

Looking at the strace log this looks more like a kernel bug now.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :
Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :
Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :
Revision history for this message
Matthew Garrett (mjg59) wrote :

There's no way to probe most CD drives without generating interrupts, so there's nothing hal can do about this.

Changed in hal:
status: New → Invalid
Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

Matthew:
That's right. This bug report is not created because wakeups occur, but because there
are 50 wakeups/second per cd drive.

The strace output of halld-addon-storage seemed reasonable to me,
so I added the kernel here which I do not know how to trace in detail.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Thanks for reporting and providing debugging info.

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
DaveAbrahams (boostpro) wrote :

Seems to me that at least when on battery power there ought to be a way to reduce the polling frequency considerably. Surely once per second should be enough for a CD?

Changed in hal:
status: Invalid → Confirmed
Revision history for this message
ethanay (ethan-y-us) wrote :

Hardy
2.6.24-16-generic

wasn't asynchronous notification supposed to be merged into the 2.6.24-rc2 kernel?

if so, why do we still need to rely on hal drive polling for insert notification?

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this bug to the new "linux" package. However, development has already began for the upcoming Intrepid Ibex 8.10 release. It would be helpful if you could test the upcoming release and verify if this is still an issue - http://www.ubuntu.com/testing . If the issue still exists, please update this report by changing the Status of the "linux" task from "Incomplete" to "New". We appreciate your patience and understanding as we make this transition. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Hoffmann (bubble-fish) wrote :

Installing linux-image-2.6.27-* onto a Hardy setup solves this problem for me.

Asynchronous notification is alive - finally

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Per Hoffmann's last comment I'm marking this Fix Released for Intrepid. Stefan Fleiter, since you are the original bug reporter, if this is not the case please feel free to reopen this report by setting the status back to "New". Thanks.

Changed in linux:
status: Incomplete → Fix Released
Revision history for this message
Erik Andrén (erik-andren) wrote :

This is still an issue for me, albeit not as bad as the original reporter claims.
With hald-addon-storage active, powertop shows that ata_piix causes about 10 wakeups / s.
This is totally eliminated when hald-addon-storage is killed.

Revision history for this message
Erik Andrén (erik-andren) wrote :

Using intrepid.

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Erik Andrén (erik-andren) wrote :

Hal is being removed in future versions of ubuntu, thus this might be a non issue in the future.

Revision history for this message
dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.