linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Daniel Stodden <daniel.stodden@citrix.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Cache flush question.
Date: Tue, 04 Jan 2011 09:32:22 -0500	[thread overview]
Message-ID: <1294151542.3389.7.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <1294130649.3529.96.camel@ramone>

On Tue, 2011-01-04 at 00:44 -0800, Daniel Stodden wrote: 
> Hi anyone.
> 
> If somebody's got a sec to enlighten me, there's some phenomenon I
> recently came across and found somewhat counterintuitive first.
> 
> Whenever I
> 
>  1. Dirty a bunch of pages backed by an NFS mount on some server.
> 
>  2. Block the traffic with iptables (TCP, assuming that mattered).
>     Still plenty of writeback pending.
> 
>  3. Sync
> 
> I see #3 drive the dirty count in /proc/meminfo drop back to
> almost-zero, immediately. The sync itself blocks, though.
> 
> So the pages are called clean the moment the write got queued, not
> acked? Leaving the rest just to retransmits by the socket then? Is this
> just done so because one can, or would that order rather matter for
> consistency?

Take a look at the 'Writeback:' count, which should turn non-zero when
you hit #3.

The VM allows pages to be either dirty or in writeback, but not both at
the same time. This is not NFS-specific. The same rule applies to local
filesystems.

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


  parent reply	other threads:[~2011-01-04 14:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04  8:44 Cache flush question Daniel Stodden
2011-01-04 14:00 ` Rob Landley
2011-01-04 14:32 ` Trond Myklebust [this message]
2011-01-05 23:15   ` Daniel Stodden
2011-01-06  7:33     ` Rob Landley

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=1294151542.3389.7.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=daniel.stodden@citrix.com \
    --cc=linux-nfs@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).