linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Samwel <bart@samwel.tk>
To: Dave Johnson <dave-lkml-01@centerclick.org>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [ext3] kjournald writing after each read despite noatime,commit=nnn
Date: Thu, 01 Jan 2009 15:02:07 +0100	[thread overview]
Message-ID: <495CCCDF.3030606@samwel.tk> (raw)
In-Reply-To: <18779.58377.160214.225792@wellington.i202.centerclick.org>

Hi Dave,

Dave Johnson wrote:
> Since upgrading from 2.6.23.1 to 2.6.27.8, I'm now seeing kjournald
> perform a write 2 seconds after each read to an ext3 fs.
> 
> laptop mode is on and filesystem is mounted with noatime and a large
> commit time (6 hours).
> 
> Did I miss something or is this expected?

This is the defined behaviour for laptop_mode. Whenever a *physical*
READ takes place, this is taken to indicate that the disk is spun up at
that time. The laptop_mode functionality then takes that opportunity to
sync any dirty data to disk, two seconds (or whatever value you put in
/proc/sys/vm/laptop_mode) after the physical disk activity has ceased.
The rationale behind this is that you want to sync your stuff when the
disk is spun up, and then you want to hold back writing back stuff for a
very long while. And the only way it can detect that the disk is spun up
is when there is physical disk activity.

This is exactly what happens in your case. The READ activity reported by
block_dump is *physical* read activity: some data was needed that was
not cached in memory. block_dump does not show you what data was
retrieved from the ext3 fs *without* having to access the disk, it only
shows actual physical disk I/O.

Cheers,
Bart

  reply	other threads:[~2009-01-01 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 21:28 [ext3] kjournald writing after each read despite noatime,commit=nnn Dave Johnson
2009-01-01 14:02 ` Bart Samwel [this message]
2009-01-01 16:49   ` Dave Johnson
2009-01-01 18:59     ` Bart Samwel
2009-01-01 19:18       ` Dave Johnson
2009-01-01 19:35         ` Dave Johnson
2009-01-01 20:16           ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=495CCCDF.3030606@samwel.tk \
    --to=bart@samwel.tk \
    --cc=dave-lkml-01@centerclick.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).