[laptop-mode] Enabling Laptop Mode Activate Pdflush Every 3-4 Seconds
Bart Samwel
bart at samwel.tk
Fri May 29 11:39:51 CEST 2009
Casey McGinty wrote:
>
>
> On Thu, May 28, 2009 at 9:43 PM, Bart Samwel <bart at samwel.tk
> <mailto:bart at samwel.tk>> wrote:
>
> Hi Casey,
>
>
> The thing is, laptop mode does a sync *across all file systems*. And
> that causes disk activity even on file systems that aren't being used
> much. Combine this with a laptop mode sync loop (as you are
> experiencing) and it becomes very annoying. :-/
>
>
> Well, that sounds like a fundamental flaw to me. I'm not sure why you
> would want to cause a write on a file system that has no data to write.
The assumption is that "sync" on a non-dirty fs is a no-op, so we can
simply sync all file systems. Apparently there are file systems that
break this, and then you get this kind of behaviour. :-/ I might want to
take this up with the fs developers...
> I personally haven't verified this, so I will have to go and build such
> a set-up myself to reproduce the problem. I strongly suspect that LVM
> writes data after the sync is complete, which causes laptop mode to
> trigger a re-sync after two seconds.
>
>
> This seems logical. A more likely scenario might be that the write is
> going to update the timestamp or some flag on the RAID superblock to
> indicate that the devices in the array are consistent. If this is true,
> then laptop-mode is clearly broken for systems with RAID.
That sounds like a very plausible scenario indeed. The RAID superblock
writes are independent of the fs sync, so they will most likely occur
after the fs sync has completed.
> For now it looks like I've reached the limitations of "laptop-mode" on
> my system. I'll check back in periodically to see how the progress is
> going. Thanks for all the help and advice.
No problem! Hopefully we can resolve this at some point, and we'll let
you know...
Cheers,
Bart
More information about the laptop-mode
mailing list