From: Christoph Hellwig <hch@lst.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: hch@lst.de, viro@ZenIV.linux.org.uk,
linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
Artem.Bityutskiy@nokia.com
Subject: Re: [PATCH] always set a/c/mtime through ->setattr
Date: Tue, 20 May 2008 10:33:51 +0200 [thread overview]
Message-ID: <20080520083351.GA14826@lst.de> (raw)
In-Reply-To: <E1JyMSu-0001au-96@pomaz-ex.szeredi.hu>
On Tue, May 20, 2008 at 09:40:56AM +0200, Miklos Szeredi wrote:
> > Currently touch_atime and file_update_time directly update a/c/mtime
> > in the inode and just mark the inode dirty afterwards. This is pretty
> > bad for some more complex filesystems that have various different types
> > of dirtying an inode and/or need to store the data in another place
> > for example for a buffer to be logged.
> >
> > This patch changes touch_atime and file_update_time to not update the
> > inode directly but rather call through ->setattr into the filessystem.
>
> Do we know what effect this will have on read/write performance? I
> can imagine that some ->setattr() implementations are orders of
> magnitude slower than just dirtying the inode.
All major disk or in-memory filesystems except for XFS just pass down
ATTR_*TIME requests to inode_setattr which is not more than just
dirtying the inode. NFS and CIFS set S_NOCMTIME so they're not affected
by this at all.
> This optimization is fishy. Remember, inode->i_*time are just cached
> values, and the actual times on the (remote) filesystem itself can
> differ. Which means that we will now optimize out a "touch" because
> we happened to have the current time cached in the inode. Not that
> this would be a likely event, but still...
>
> So at least this check should be made dependent on ATTR_UPDTIMES, and
> explicit time updates left alone.
Good catch. I'll fix by either/or moving the check into ->setattr and
making it conditional on ATTR_UPDTIMES.
next prev parent reply other threads:[~2008-05-20 8:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 6:08 [PATCH] always set a/c/mtime through ->setattr Christoph Hellwig
2008-05-20 6:19 ` Artem Bityutskiy
2008-05-20 6:19 ` Artem Bityutskiy
2008-05-20 6:28 ` Christoph Hellwig
2008-05-20 7:40 ` Miklos Szeredi
2008-05-20 8:33 ` Christoph Hellwig [this message]
2008-05-22 18:10 ` Miklos Szeredi
2008-05-22 18:10 ` Miklos Szeredi
2008-05-31 13:20 ` Al Viro
2008-05-31 13:24 ` Christoph Hellwig
2008-05-31 13:35 ` Al Viro
2008-05-21 6:58 ` [PATCH 2/2] " Christoph Hellwig
2008-05-21 17:19 ` Chuck Lever
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=20080520083351.GA14826@lst.de \
--to=hch@lst.de \
--cc=Artem.Bityutskiy@nokia.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@ZenIV.linux.org.uk \
--cc=xfs@oss.sgi.com \
/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.