HDAPS

Richard Hughes hughsient at gmail.com
Mon Oct 2 04:35:05 PDT 2006


On 02/10/06, Kay Sievers <kay.sievers at vrfy.org> wrote:
> On Sun, 2006-10-01 at 23:06 +0100, Richard Hughes wrote:
> > Guys,
> >
> > HDAPS[1] (hard disk "drop" protection) is available in lots of new
> > kernels for lots of new laptops.
> >
> > To activate this, there is currently hdapsd[2] (a very small,
> > unmaintained IMO hacky program) to monitor a
> > hardcoded /sys/block/xxxx/queue/protect file, and if the acceleration is
> > above a certain level, it parks the heads.
> >
> > Now, I can see this implemented properly as an addon, only being
> > launched when we have a new harddisk with HDAPS support, one addon per
> > disk (tiny). Disks would also have the capability "hdaps_sensor".
> >
> > Addon would have one method SetSensitivity() and two signals
> > HDAPS-activated (bool) and HDAPS-motion (int) (or something).
> >
> > This lets us park the heads to save the disk, and we can also use the
> > motion signal to act as some sort of motion alarm / desktop lock in the
> > desktop context.
> >
> > Sound sane / insane? Comments?
>
> How do you solve the problem with such a solution, that your
> "emergency" code hasn't been swapped out when you detect that your laptop
> is falling right now? I'm not sure, that you can solve such timing critical
> problem in userspace.

I don't know. :-) Maybe this stuff better belongs in the kernel, but I
wanted to provoke debate about where it fits.

IMO, the kernel is the place where over-temperature is actioned, so it
probably makes sense for the "laptop-is-falling" code to be there too.
But then userspace can do funcy things and set policy. Opinions
welcomed.

Richard.


More information about the hal mailing list