[laptop-mode] READAHEAD setting is doubled
Joss Winn
joss at josswinn.org
Mon Jul 14 09:09:32 CEST 2008
On Sun, Jul 13, 2008 at 10:53 PM, Bart Samwel <bart at samwel.tk> wrote:
> Hi Joss,
>
> Joss Winn wrote:
>> hdparm -I /dev/sda shows power management to be set to 254, but my HDD
>> is still spinning down every few seconds. I was wondering if it was
>> related to the read-ahead settings.
>>
>> In laptop-mode.conf, I have:
>>
>> CONTROL_READAHEAD=1
>> LM_READAHEAD=3072
>> NOLM_READAHEAD=128
>>
>> However, when I run hdparm /dev/sda I get:
>>
>> readahead = 6144 (on)
>>
>> Which is exactly double the laptop-mode setting.
>>
>> If I change the laptop-mode setting, then sure enough the new hdparm
>> reading is double whatever the new setting is.
>>
>> Why is this?
>
> Very simple: the laptop-mode-tools config value is in kilobytes, while
> hdparm configures these things in sectors of 512 bytes each. :-)
>
Ah, I see. Would it be worth adding this comment in the
laptop-mode.config file, just so it's clear to fools like me? ;-)
>> Also, I wondered whether reducing the readahead settings might alter
>> the freezing I'm getting (see earlier post) when unplugging AC, but
>> this is not the case.
>
> Nah, that's not it. It seems like your laptop is kind of unplugging and
> re-plugging all its cores when going on battery, like it's doing some
> kind of semi-suspend or a scheduler switch or something like that. No
> clue what would cause that though -- laptop-mode-tools only controls the
> CPU frequency scaling governor, but does nothing with the scheduler...
>
> Cheers,
> Bart
>
OK. Cheers.
Joss
More information about the laptop-mode
mailing list