From: Andreas Dilger <adilger@clusterfs.com>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Andi Kleen <ak@muc.de>, linux-kernel@vger.kernel.org
Subject: Re: New nanosecond stat patch for 2.5.44
Date: Tue, 29 Oct 2002 09:30:52 -0700 [thread overview]
Message-ID: <20021029163052.GH28982@clusterfs.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1021029094310.6686C-100000@gatekeeper.tmr.com>
On Oct 29, 2002 10:01 -0500, Bill Davidsen wrote:
> On Sun, 27 Oct 2002, Andreas Dilger wrote:
> > 1) It would be good if it were possible to select this with a config
> > option (I don't care which way the default goes), so that people who
> > don't need/care about the increased resolution don't need the extra
> > space in their inodes and minor extra overhead. To make this a lot
> > easier to code, having something akin to the inode_update_time()
> > which does all of the i_[acm]time updates as appropriate.
>
> Am I missing something? That would make it two file types, no? I bet
> there's more overhead in handling that problem than just writing the time.
Not necessarily. Most filesystems don't even have space for storing a
sub-second time resolution, so having the extra time resolution is
irrelevant. For filesystems which do have room for sub-second timestamps
they currently just fill in 0 there, and if the sub-second time is here
they will fill in that field, so still no incompatible on-disk formats.
As for ext3 having sub-second timestamps, this will be done in a way
which makes it compatible with older filesystem, so whether those
timestamps are written or not written, the filesystem will still be
readable on older kernels.
The "inode" space that I'm referring to is the in-memory inode struct,
and the presence of that would be determined at compile time. Granted,
it would only be 12 bytes added to the inode, but if you have thousands
or millions of inodes resident you start to feel the pinch.
> > 2) Updating i_atime based on comparing the nsec timestamp is going to be
> > a killer. I think AKPM saw dramatic performance improvements when he
> > changed the code to only do the update once/second, and even though
> > you are "only" updating the atime if the times are different, in
> > practise this will be always. Even without the "per superblock interval"
> > you suggest we should probably only update the atime once a second (I
> > don't think anything is keyed off such high resolution atimes, unlike
> > make and mtime/ctime).
>
> find -anewer seems to use as much resolution as it has. More to the point,
> what is the overhead of updating the time when an i/o is done? It would
> seem pretty trivial.
It would be trivial if you are already updating the inode (and we should
optimize for this case), but if you are reading a file in 5-byte chunks
and you update the atime a thousand times a second it most certainly IS
a lot of overhead. We currently limit atime updates to 1/second by
checking if the atime has changed or not. The proposed patch checks if
the atime.ts_nsec has changed, and it most certainly will have, so this
will always be updating the atime on disk.
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
next prev parent reply other threads:[~2002-10-29 16:27 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-27 12:13 New nanosecond stat patch for 2.5.44 Andi Kleen
2002-10-27 14:33 ` New nanosecond stat patch for 2.5.44 - new patch II Andi Kleen
2002-10-27 21:49 ` New nanosecond stat patch for 2.5.44 Andreas Dilger
2002-10-27 22:54 ` H. Peter Anvin
2002-10-28 1:23 ` Chris Friesen
2002-10-28 1:35 ` Rob Landley
2002-11-06 13:27 ` Gabriel Paubert
2002-11-06 18:00 ` H. Peter Anvin
2002-10-27 23:16 ` Horst von Brand
2002-10-28 17:10 ` Andreas Dilger
2002-10-29 15:01 ` Bill Davidsen
2002-10-29 16:30 ` Andreas Dilger [this message]
2002-10-29 20:37 ` Bill Davidsen
2002-10-30 0:44 ` Jamie Lokier
2002-10-30 21:12 ` Bill Davidsen
2002-10-30 22:17 ` Jamie Lokier
2002-10-31 0:34 ` H. Peter Anvin
2002-11-01 1:57 ` Bill Davidsen
2002-11-01 3:32 ` Jamie Lokier
[not found] <20021027121318.GA2249@averell.suse.lists.linux.kernel>
[not found] ` <20021027214913.GA17533@clusterfs.com.suse.lists.linux.kernel>
2002-10-28 4:42 ` Andi Kleen
2002-10-28 5:35 ` Andreas Dilger
[not found] ` <aphqqo$261$1@cesium.transmeta.com.suse.lists.linux.kernel>
[not found] ` <3DBC9194.5090006@nortelnetworks.com.suse.lists.linux.kernel>
2002-10-28 4:47 ` Andi Kleen
[not found] <3ED66C83.8070608@austin.ibm.com.suse.lists.linux.kernel>
2003-05-29 21:11 ` Nightly regression runs against current bk tree Andi Kleen
2003-05-29 21:25 ` David S. Miller
2003-05-29 21:29 ` Andi Kleen
2003-05-29 21:38 ` Randy.Dunlap
2003-05-29 21:48 ` David S. Miller
2003-05-29 22:04 ` Craig Thomas
2003-05-29 22:05 ` Andi Kleen
2003-05-29 22:25 ` Cliff White
2003-05-29 23:41 ` David S. Miller
2003-05-29 21:50 ` Craig Thomas
2003-05-29 22:03 ` Andi Kleen
2003-05-29 22:16 ` Cliff White
2003-05-29 22:23 ` Nathan
2003-05-29 23:10 ` Mark Peloquin
2003-05-29 22:51 ` Mark Peloquin
2003-05-29 22:03 ` Nathan
2003-05-29 23:08 ` Mark Peloquin
2003-05-29 22:48 ` Mark Peloquin
2003-05-29 23:17 ` Andreas Dilger
2003-05-29 23:30 ` Cliff White
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=20021029163052.GH28982@clusterfs.com \
--to=adilger@clusterfs.com \
--cc=ak@muc.de \
--cc=davidsen@tmr.com \
--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 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.