[ltp] [PATCH] 2.6.17: Unload disks heads before powering down

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 22 Sep 2006 23:07:17 -0300


On Fri, 22 Sep 2006, Shem Multinymous wrote:
> On 9/22/06, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> >Normal unloads are controlled, and do a lot less damage (as in "normal
> >wear") to the head assembly and arms.  Hitachi is very explicit that
> >emergency unloads are 100 times more stressful to their hardware than
> >regular unloads, for example.  Given that you can actually *hear* the
> >difference quite easily between the two unloads...
> 
> Ah, I didn't know that (got a reference by any chance?). It would be
> well to push this for mainline acceptance, then; and to mention it on
> the relevant ThinkWiki pages.

Not to mention that *every* linux distro took high pains to cover up for the
kernel lack of proper handling and tries to unload disk heads in userspace
(look at the code for the halt binary).  But that is impossible in S4 sleep,
and doesn't quite always work in some scenarios even for a simple shutdown.

BTW: I know 2.6.17+suspend2 did not do things right for S4.  But the normal
S3 *does* things right, so chances are 2.6.18 will do things right on S4
too, even with suspend2.  S5 (power off) is *not* doing things right in
2.6.18 and all previous kernels: I have tested it and I could hear the
"CLICK!" of the emergency unload quite loud and clear.

I have attached the Hitachi Travelstar 5K100 Hard Disk Drive Specification.
Read pages 27-28.  This PDF is not that easy to locate in
www.hitachigst.com, but it is there.

BTW, anyone who can read tech docs and has a 5K100 would benefit from
reading some parts of that PDF: get to know your hardware, and use it to its
fullest...

Before someone asks, it is not trivial to fix this in the BIOS (the BIOS
doesn't know what you're doing with the ICH and the disks...), so we're all
much better of if we do it safely from within the Linux kernel.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh