[ltp] Re: New PowerTOP utility for Linux 2.6.21+ from Intel

Elias Oltmanns linux-thinkpad@linux-thinkpad.org
Mon, 14 May 2007 19:28:52 +0200


"Shem Multinymous" <multinymous@gmail.com> wrote:
> On 5/14/07, Martin Milata <b42-ml@srck.net> wrote:
>> What about checking accelerometer status only if hdd is actually
>> spinning? Because when using laptop_mode, hdd is spun down most of the
>> time, but hdapsd is doing it's work all the time. Is something like that
>> possible?
>
> Excellent idea. Caveats:

Not quite as excellent as it seems at the first glance, I'm afraid. If
something strange is going on, i.e., when some considerable
acceleration is detected, I want hdapsd to prevent my hd from spinning
up in the first place. Otherwise, you'd always run the risk that the
disk spins up right in the middle of some accelerated motion and the
heads might access the platter before the unload command is processed
by the controller. Worse even, if hdapsd doesn't keep polling, there
will be no recent accelerator readings for hdapsd to decide whether
action has to be taken.

>
> - You'll also need to keep polling if the driver is accessed via the
> input infrastructure (as a joystick).

I wonder whether this might be the culprit anyway. On my X40, for
instance, powertop says:
  26.2%           sleep.sh : hdaps_resume (hdaps_mousedev_poll)

Does this indicate that deactivating the input infrastructure in hdaps
could already improve things? I haven't looked at the source code and
the suggestion could be plain nonsense but this hdaps_mousedev_poll
strikes me as rather suggestive.

Regards,

Elias