Re: ext3 performance bottleneck as the number of spindles gets large

From: Chris Mason (mason@suse.com)
Date: Fri Jun 21 2002 - 14:26:24 EST


On Fri, 2002-06-21 at 14:46, mgross wrote:
> Andrew Morton wrote:

> >
> >Please try the below patch (againt 2.4.19-pre10). It halves the lock
> >contention, and it does that by making the fs twice as efficient, so
> >that's a bonus.
> >
> We'll give it a try. I'm on travel right now so it may be a few days if
> Richard doesn't get to before I get back.

You might want to try this too, Andrew fixed UPDATE_ATIME() to only call
the dirty_inode method once per second, but generic_file_write should do
the same. It reduces BKL contention by reducing calls to ext3 and
reiserfs dirty_inode calls, which are much more expensive than simply
marking the inode dirty.

-chris

--- linux/mm/filemap.c Mon, 28 Jan 2002 09:51:50 -0500
+++ linux/mm/filemap.c Sun, 12 May 2002 16:16:59 -0400
@@ -2826,6 +2826,14 @@
         }
 }
 
+static void update_inode_times(struct inode *inode)
+{
+ time_t now = CURRENT_TIME;
+ if (inode->i_ctime != now || inode->i_mtime != now) {
+ inode->i_ctime = inode->i_mtime = now;
+ mark_inode_dirty_sync(inode);
+ }
+}
 /*
  * Write to a file through the page cache.
  *
@@ -2955,8 +2963,7 @@
                 goto out;
 
         remove_suid(inode);
- inode->i_ctime = inode->i_mtime = CURRENT_TIME;
- mark_inode_dirty_sync(inode);
+ update_inode_times(inode);
 
         if (file->f_flags & O_DIRECT)
                 goto o_direct;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:25 EST