[laptop-mode] Enabling Laptop Mode Activate Pdflush Every 3-4 Seconds

Bart Samwel bart at samwel.tk
Wed May 27 13:33:46 CEST 2009


Casey McGinty wrote:
> 
> 
> On Tue, May 26, 2009 at 11:02 PM, Casey McGinty <casey.mcginty at gmail.com 
> <mailto:casey.mcginty at gmail.com>> wrote:
> 
> 
> 
>     On Tue, May 26, 2009 at 10:40 PM, Ritesh Raj Sarraf
>     <rrs at researchut.com <mailto:rrs at researchut.com>> wrote:
> 
> 
>         I looked into the kernel source and it is related to a dvb driver.
> 
>         This is what is getting triggered as part of your driver.
> 
>            if (ret != 2) {
>                printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select
>         0x%02x error
>         (ret == %i)\n", __func__, state->config->demod_address, reg, ret);
> 
>         With syslogd running, this message will be logged to syslog,
>         which would then
>         trigger an write.
> 
>         The only question is, how much of this message is being written
>         and how
>         frequently.
> 
>         With laptop-mode enabled, when a daemon/driver logs to syslog,
>         when is a
>         pdflush triggered and after how much of dirty pages?
> 
> 
> 
> Killed Vmware and MythTV backend and re-ran the test. The logs are a lot 
> cleaner, but still have same writes happening. Let me know what you think.

The thing is, laptop mode works as follows:

- Detect disk activity -> activate!
- Wait until disk activity stops for 2 seconds
- Sync and deactivate!

I'm getting the impression that this is caused by some kind of 
after-the-sync-finishes disk activity by the md drivers. Because then it 
works like this:

- Detect disk activity -> activate!
- Wait until disk activity stops for 2 seconds
- Sync and deactivate
- ...something in md is still writing to disk after the sync has returned
- Detect disk activity -> activate!

However, this is hard to detect without logging of sync boundaries and 
laptop mode activation / deactivation, and that's not in the kernel. :-/ 
Do you compile your own kernels or do you run a stock kernel?

Cheers,
Bart


More information about the laptop-mode mailing list