login
Header Space

 
 

Re: [RFC] JBD ordered mode rewrite

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jan Kara <jack@...>
Cc: <linux-ext4@...>, <linux-kernel@...>
Date: Monday, March 10, 2008 - 5:37 pm

On Mar 10, 2008  20:54 +0100, Jan Kara wrote:
 
Actually, I think this is the same semantics as the existing ordered mode,
as long as the on-disk inode is only changed as part of the transaction
that is allocating the pages (which is needed for correctness in any case).

The noticable difference will be that the new ordered mode will not force
out pending dirty pages, if it is run with delalloc.  This would be a big
improvement, because users of fsync() on a filesystem with another streaming
IO process have terrible latency problems with the current code.  So not
only does your patch reduce complexity, it allows ext4 delalloc to work
in ordered mode, and improves overall responsiveness as well.

I think in ext4 it makes sense to always be running in delalloc mode once
your patch is landed, as delalloc has improved performance greatly, and
one of the few reasons we haven't submitted it upstream was the lack of
ordered mode support.

As far as patching ext3/jbd vs. ext4/jbd2, I think it makes a lot more
sense to test this patch with ext4 first in -mm because people will not
expect as much stability with ext4 vs. ext3 and this will allow some time
to get testing on your changes, which affect a very core part of ext3/jbd.


Yes, the continually-growing file livelock is a problem that hit fsync in
the past, and we need to avoid it here also.  Using .range_end is a good
way to avoid it, though it isn't 100% foolproof due to usage like:

	ftruncate(fd, LARGE_SIZE);
	write(fd, buf, LARGE_SIZE);

It will eventually end, but not for a long time.


Great, thanks.  Avoiding lock contention is a big issue on many-way SMP
systems that are becoming much more common these days.


OK, it seems very few files will span the truncate boundary (for compiles
likely only num_cpus) and if they can be truncated within the same transaction
without an IO that is fine.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] JBD ordered mode rewrite, Jan Kara, (Thu Mar 6, 1:42 pm)
Possible race between direct IO and JBD?, Mingming Cao, (Fri Apr 25, 7:38 pm)
Re: Possible race between direct IO and JBD?, Jan Kara, (Mon Apr 28, 8:26 am)
Re: Possible race between direct IO and JBD?, Badari Pulavarty, (Mon Apr 28, 1:11 pm)
Re: Possible race between direct IO and JBD?, Jan Kara, (Mon Apr 28, 2:09 pm)
Re: Possible race between direct IO and JBD?, Mingming Cao, (Mon Apr 28, 3:09 pm)
Re: Possible race between direct IO and JBD?, Jan Kara, (Tue Apr 29, 8:43 am)
Re: Possible race between direct IO and JBD?, Mingming Cao, (Tue Apr 29, 1:49 pm)
Re: Possible race between direct IO and JBD?, Andrew Morton, (Sat Apr 26, 6:41 am)
Re: [RFC] JBD ordered mode rewrite, Andreas Dilger, (Fri Mar 7, 7:52 pm)
Re: [RFC] JBD ordered mode rewrite, Jan Kara, (Mon Mar 10, 3:54 pm)
Re: [RFC] JBD ordered mode rewrite, Andreas Dilger, (Mon Mar 10, 5:37 pm)
Re: [RFC] JBD ordered mode rewrite, Christoph Hellwig, (Sat Mar 8, 8:14 am)
Re: [RFC] JBD ordered mode rewrite, Mingming Cao, (Fri Mar 7, 8:08 pm)
Re: [RFC] JBD ordered mode rewrite, Mingming Cao, (Fri Mar 7, 6:55 am)
Re: [RFC] JBD ordered mode rewrite, Jan Kara, (Mon Mar 10, 2:29 pm)
Re: [RFC] JBD ordered mode rewrite, Mark Fasheh, (Thu Mar 6, 9:34 pm)
Re: [RFC] JBD ordered mode rewrite, Jan Kara, (Mon Mar 10, 2:00 pm)
Re: [RFC] JBD ordered mode rewrite, Andrew Morton, (Thu Mar 6, 7:53 pm)
Re: [RFC] JBD ordered mode rewrite, Jan Kara, (Mon Mar 10, 1:38 pm)
Re: [RFC] JBD ordered mode rewrite, Josef Bacik, (Thu Mar 6, 3:05 pm)
Re: [RFC] JBD ordered mode rewrite, Jan Kara, (Mon Mar 10, 12:30 pm)
speck-geostationary