All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: i_version, NFSv4 change attribute
Date: Mon, 23 Nov 2009 13:37:44 -0500	[thread overview]
Message-ID: <1259001464.8700.36.camel@localhost> (raw)
In-Reply-To: <20091123181951.GB5583@fieldses.org>

On Mon, 2009-11-23 at 13:19 -0500, J. Bruce Fields wrote: 
> On Mon, Nov 23, 2009 at 01:11:19PM -0500, Trond Myklebust wrote:
> > On Mon, 2009-11-23 at 11:44 -0500, J. Bruce Fields wrote: 
> > > If the side we want to optimize is the modifications, I wonder if we
> > > could do all the i_version increments on *read* of i_version?:
> > > 
> > > 	- writes (and other inode modifications) set an "i_version_dirty"
> > > 	  flag.
> > > 	- reads of i_version clear the i_version_dirty flag, increment
> > > 	  i_version, and return the result.
> > > 
> > > As long as the reader sees i_version_flag set only after it sees the
> > > write that caused it, I think it all works?
> > 
> > That probably won't make much of a difference to performance. Most NFSv4
> > clients will have every WRITE followed by a GETATTR operation in the
> > same compound, so your i_version_dirty flag will always immediately get
> > cleared.
> 
> I was only thinking about non-NFS performance.

I would think that running a high performance database _and_ NFS server
on the same machine would tend to be very much of a corner case anyway.
In most setups I'm aware of, the database and NFS server tend to be
completely separate machines.

> > The question is, though, why does the jbd2 machinery need to be engaged
> > on _every_ write?
> 
> Is it?

See Ted's email. As I read it, his concern was that if they allow people
to reduce the a/m/c/time resolution, then the i_version would still
force them to dirty the inode on every write...

Trond


  reply	other threads:[~2009-11-23 18:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22 22:20 i_version, NFSv4 change attribute J. Bruce Fields
2009-11-23 11:48 ` tytso
2009-11-23 16:44   ` J. Bruce Fields
2009-11-23 16:59     ` J. Bruce Fields
2009-11-23 18:11     ` Trond Myklebust
2009-11-23 18:19       ` J. Bruce Fields
2009-11-23 18:37         ` Trond Myklebust [this message]
2009-11-23 18:51         ` tytso
2009-11-25 20:48           ` J. Bruce Fields
2009-11-23 18:35     ` tytso

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=1259001464.8700.36.camel@localhost \
    --to=trond.myklebust@fys.uio.no \
    --cc=bfields@fieldses.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.