hald blocks ide bus if cdrom on same bus with harddisk(was:Extremly slow IO performance with dapper, high wa% on Dell Inspiron 8200)

Bug #48499 reported by Manfred Odenstein
10
Affects Status Importance Assigned to Milestone
hal-info (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Hi there,
I've done a clean install on this notebook (P4/1800 756Mb) and I've noticed that the IO system is doing something (with top) but there is not so much activities on the harddisk, I've checked this with two different drives to prevent wrong diagnostics (maybe harddisk error).

It seems that booting into KDE is faster with the liveCD as with the installed system, I've also noticed that my second notebook, IBM T22 (P3/900 384Mb) is booting faster with a much slower harddisk than the mentioned system.

It really seems that something is throttling the io system

reagards

Related branches

Revision history for this message
Manfred Odenstein (odix-odiisi) wrote :

I've also removed powernowd and powernowd.early from startup, so the system should run with unthrottled speed, it does, except the IO system (harddisk) :-(

I'm not new to linux, but I havn't seen such behaviour.

DMA is enables, disk is in UDMA100 mode

Revision history for this message
Manfred Odenstein (odix-odiisi) wrote :

thanks to heldal, hald is the culprit, killing hald will bring you performance back, may be it's that on this hardware the harddisk and cdrom is on the same bus, and the probing blocks the bus for some time, see http://www.ubuntuforums.org/showthread.php?t=188901

regards

Revision history for this message
Per Heldal (heldal) wrote :

Blaming hald isn't entirely correct ;) This is really a design problem with IDE. It has been discussed repeatedly on the kernel mailinglist over the years related to things like magicdev, and now hal, which continously poll the status of IDE devices blocking access to both devices on a channel during the poll. Maybe HAL should leave the removable drive alone when it detects other devices on the same channel, and recommend the user to re-organize the devices with removable units on separate channels. Notebook users with badly designed systems and users with more than 2 PATA devices may not be able to make such changes though. As is, hald is causing problems for all configurations with 2 IDE devices on a channel unless they both are harddrives.

Revision history for this message
Manfred Odenstein (odix-odiisi) wrote :

Per you are right, but if I configure the policy in that way, that hal shouldn't poll cd/dvdrom, and he (she, it) blocks the bus anyway, it's not acceptable, and if this behaviour was also in previous releases (it wasn't) it would be ok, not really, but I 've to live with that. I know there are different hal versions for 2.6.x kernels, one for less than 2.6.13 and one for above, maybe there is the problem.

Further steps:
Due the fact that this bug is unconfirmed, I will try on my spare harddisk an "old-school" gentoo installation (I'm more familar with gentoo than with debian-unstable), with nearly same kernel, udev,dbus,hal version, and will check if there is the same problem, an if no, I will check what the friendly gentoo guys did (which patches they apply)

regards

Revision history for this message
Sven Fischer (sepreh) wrote :

I can confirm this bug on an Dell Inspiron 6000 system with PATA, module ata_piix.

I have a load average of about 2.00 when hald is started. If I remove the sr_mod, the system drops down to nearly 0 avg.

IIRC the behaviour wasn't there with Dapper beta (which was the first install on this laptop), but don't take this for granted. I realised a speed after some system update, but don't remember which update exactly.

Revision history for this message
Per Heldal (heldal) wrote :

This update adds information I have previously reported in a thread on ubuntuforums.org:

hald on edgy still behaves badly on an Inspiron 8200 here. I've found that it does *not* work to stop hald from polling the CD-drive and stop blocking the IDE-channel by adding filters in /etc/hal. It does however work if I add the rule in /usr/share/hal/fdi/preprobe/10osvendor/10-ide-drives.fdi. I haven't yet examined the source for hald to figure out why blacklisting the device through config-files in /etc doesn't have the same effect as changing the vendor-file in /usr/share/hal.

The problem was introduced through a CVS update in october 2005. A copy of the diff is attached. Reversing this diff and then restart hald solves the problem. The system will not detect changes to the CD-drive with the blacklist entry in place, but having to mount manually is much preferred over crippled IDE performance.

Revision history for this message
anco (ancovanbergeijk) wrote :

Thanks to this and many other older list I see that I'm not the only one with hardrive speed problems. Somebody just gave me an dell inspiron 8200. As I work already longtime with ubuntu I want to give this laptop to a pastor with ubuntu Feisty on it. But I do not succeed until now to get a work around to fix this issue even if you have to mount cd's manually.

qoute:
It does however work if I add the rule in /usr/share/hal/fdi/preprobe/10osvendor/10-ide-drives.fdi. I haven't yet examined the source for hald to figure out why blacklisting the device through config-files in /etc doesn't have the same effect as changing the vendor-file in /usr/share/hal.
qoute

Per Heldal or anybody else can you please provide an answer what to exactly do in Feisty to get good hd performance? What do you mean with a rule in ....

Thanks a lot.

Anco

Revision history for this message
Per Heldal (heldal) wrote :

Anco: the rules I added to /usr/share/hal/fdi/preprobe/10osvendor/10-ide-drives.fdi were those that were removed by an earlier patch found in http://launchpadlibrarian.net/5907427/hal-fix-remove_blacklisted_HL-DT-STCD-RW.txt

Apply the reverse of that patch, or if you don't know "patch" simply add the lines starting with '-' (without the '-' of course - and use the lines before and after the patched section to find the right spot in the file). Then restart "hald" (or reboot) to activate the change.

//per

Revision history for this message
anco (ancovanbergeijk) wrote :

Per: Thank you so much. with your hints I finally succeeded. The link you give isn't accessable at the moment (tried it on two computers) but some googling gave me the same file and after adding the lines regarding dell laptops and a reboot the inspiron 8200 works great now. Before it was simply useless because there is only 256 ram and the swapfile usage was already around 75mb, so with the original harddrive access the laptop was unusable slow.

So why is this bug priority medium? It is if you know the way so easy to fix, but for the common graphical unexperienced user like me a major bug. It makes the difference between having a usable laptop with ubuntu or unusable.

Anyhow major thanks for helping me Per.

Revision history for this message
Martin Pitt (pitti) wrote :

Easy fix, thanks to all for the research. I'll fix it soon.

Changed in hal:
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

hal-info (20070618-1ubuntu1) gutsy; urgency=low

  * Add debian/patches/01_dell_cdrom_nopoll.patch: Re-introduce disabling of
    Dell Inspiron laptop CD-ROMs (GCC-4240N), since due to a weird hardware
    bug they cause extreme slowdown. (LP: #48499)

 -- Martin Pitt <email address hidden> Mon, 06 Aug 2007 08:29:21 +0200

Changed in hal-info:
status: In Progress → Fix Released
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.