linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] smarter atime updates
@ 2001-11-30  6:08 Andrew Morton
  2001-11-30  9:45 ` OGAWA Hirofumi
  2001-11-30 15:44 ` Marcelo Tosatti
  0 siblings, 2 replies; 13+ messages in thread
From: Andrew Morton @ 2001-11-30  6:08 UTC (permalink / raw)
  To: Marcelo Tosatti, Linus Torvalds; +Cc: lkml

mark_inode_dirty() is quite expensive for journalling filesystems,
and we're calling it a lot more than we need to.

--- linux-2.4.17-pre1/fs/inode.c	Mon Nov 26 11:52:07 2001
+++ linux-akpm/fs/inode.c	Thu Nov 29 21:53:02 2001
@@ -1187,6 +1187,8 @@ void __init inode_init(unsigned long mem
  
 void update_atime (struct inode *inode)
 {
+	if (inode->i_atime == CURRENT_TIME)
+		return;
 	if ( IS_NOATIME (inode) ) return;
 	if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return;
 	if ( IS_RDONLY (inode) ) return;


with this patch, the time to read a 10 meg file with 10 million
read()s falls from 38 seconds (ext3), 39 seconds (reiserfs) and
11.6 seconds (ext2) down to 10.5 seconds.

-

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2001-12-01  9:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-30  6:08 [patch] smarter atime updates Andrew Morton
2001-11-30  9:45 ` OGAWA Hirofumi
2001-11-30  9:56   ` Andrew Morton
2001-11-30 10:40     ` OGAWA Hirofumi
2001-11-30 22:34   ` H. Peter Anvin
2001-11-30 15:44 ` Marcelo Tosatti
2001-11-30 17:29   ` Chris Mason
2001-11-30 20:03   ` Robert Love
2001-11-30 21:52   ` Andreas Dilger
2001-11-30 21:50     ` Linus Torvalds
2001-11-30 22:30       ` Simon Kirby
2001-11-30 23:31         ` H. Peter Anvin
2001-12-01  9:22   ` Hans Reiser

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).