Re: [Jfs-discussion] benchmark results

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tytso
Date: Saturday, December 26, 2009 - 12:19 pm

On Sat, Dec 26, 2009 at 11:00:59AM -0500, jim owens wrote:

Actually, Linux's sync does more than just schedule the writes; it has
for quite some time:

static void sync_filesystems(int wait)
{
	...
}

SYSCALL_DEFINE0(sync)
{
	wakeup_flusher_threads(0);
	sync_filesystems(0);
	sync_filesystems(1);
	if (unlikely(laptop_mode))
	   laptop_sync_completion();
	   return 0;
}

At least for ext3 and ext4, we will even do a device barrier operation
as a restult of a call to sb->s_op->sync_fs() --- which is called by
__sync_filesystem, which is called in turn by sync_filesystems().
This isn't done for all file systems, though, as near as I can tell.
(Ext2 at least doesn't.)

But for quite some time, under Linux the sync(2) system call will wait
for the blocks to be flushed out to HBA, although we currently don't
wait for the blocks to have been committed to the platters (at least
not for all file systems).   

Applications shouldn't depend on this, of course, since POSIX and
other legacy Unix systems don't guarantee this.  But in terms of
knowing what Linux does, the man page is a bit out of date.

Best regards,

					- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
benchmark results, Christian Kujau, (Thu Dec 24, 3:31 am)
Re: benchmark results, Ryusuke Konishi, (Thu Dec 24, 5:06 am)
Re: benchmark results, Teran McKinney, (Thu Dec 24, 5:59 am)
Re: [Jfs-discussion] benchmark results, Peter Grandi, (Thu Dec 24, 6:05 am)
Re: [Jfs-discussion] benchmark results, tytso, (Thu Dec 24, 2:27 pm)
Re: [Jfs-discussion] benchmark results, Evgeniy Polyakov, (Thu Dec 24, 4:46 pm)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Thu Dec 24, 6:52 pm)
Re: [Jfs-discussion] benchmark results, lakshmi pathi, (Fri Dec 25, 6:19 am)
Re: [Jfs-discussion] benchmark results, tytso, (Fri Dec 25, 9:11 am)
Re: [Jfs-discussion] benchmark results, tytso, (Fri Dec 25, 9:14 am)
Re: [Jfs-discussion] benchmark results, Larry McVoy, (Fri Dec 25, 9:22 am)
Re: [Jfs-discussion] benchmark results, tytso, (Fri Dec 25, 9:33 am)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Fri Dec 25, 11:42 am)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Fri Dec 25, 11:51 am)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Fri Dec 25, 11:56 am)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Fri Dec 25, 12:32 pm)
Re: [Jfs-discussion] benchmark results, jim owens, (Sat Dec 26, 9:00 am)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Sat Dec 26, 12:06 pm)
Re: [Jfs-discussion] benchmark results, tytso, (Sat Dec 26, 12:19 pm)
Re: [Jfs-discussion] benchmark results, jim owens, (Sun Dec 27, 12:50 pm)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Sun Dec 27, 2:55 pm)
Re: [Jfs-discussion] benchmark results, tytso, (Sun Dec 27, 3:33 pm)
Re: [Jfs-discussion] benchmark results, Christian Kujau, (Sun Dec 27, 6:24 pm)
Re: [Jfs-discussion] benchmark results, Larry McVoy, (Mon Dec 28, 7:08 am)
Re: benchmark results, Emmanuel Florac, (Tue Dec 29, 4:27 am)
Re: [Jfs-discussion] benchmark results, Chris Mason, (Mon Jan 4, 9:27 am)
Re: [Jfs-discussion] benchmark results, Michael Rubin, (Mon Jan 4, 11:57 am)
Re: [Jfs-discussion] benchmark results, Dave Chinner, (Mon Jan 4, 5:41 pm)
Re: [Jfs-discussion] benchmark results, Steven Pratt, (Tue Jan 5, 8:31 am)
Re: [Jfs-discussion] benchmark results, Casey Allen Shobe, (Sun Jan 10, 6:03 pm)
Re: [Jfs-discussion] benchmark results, Larry McVoy, (Sun Jan 10, 6:32 pm)
Re: [Jfs-discussion] benchmark results, Edward Shishkin, (Fri Jan 15, 2:42 pm)