From: tytso@mit.edu
To: jim owens <jowens@hp.com>
Cc: Peter Grandi <pg_jf2@jf2.for.sabi.co.UK>,
jfs-discussion@lists.sourceforge.net,
linux-nilfs@vger.kernel.org, linux-ext4@vger.kernel.org,
Larry McVoy <lm@bitmover.com>,
reiserfs-devel@vger.kernel.org, ext-users <ext3-users@redhat.com>,
xfs@oss.sgi.com, linux-btrfs@vger.kernel.org
Subject: Re: [Jfs-discussion] benchmark results
Date: Sat, 26 Dec 2009 14:19:16 -0500 [thread overview]
Message-ID: <20091226191916.GI32757@thunk.org> (raw)
In-Reply-To: <4B36333B.3030600@hp.com>
On Sat, Dec 26, 2009 at 11:00:59AM -0500, jim owens wrote:
> Christian Kujau wrote:
>
> > I was using "sync" to make sure that the data "should" be on the disks
>
> Good, but not good enough for many tests... info sync
>
> CONFORMING TO
> POSIX.2
>
> NOTES
> On Linux, sync is only guaranteed to schedule the dirty blocks for
> writing; it can actually take a short time before all the blocks are
> finally written.
>
> This is consistent with all the feels-like-unix OSes I have used.
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-12-26 19:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 10:31 benchmark results Christian Kujau
2009-12-24 12:06 ` Ryusuke Konishi
2009-12-24 12:59 ` Teran McKinney
2009-12-24 13:05 ` [Jfs-discussion] " Peter Grandi
2009-12-24 21:27 ` tytso
2009-12-24 23:46 ` Evgeniy Polyakov
2009-12-25 16:11 ` tytso
2010-01-04 16:27 ` Chris Mason
2010-01-04 18:57 ` Michael Rubin
2010-01-05 0:41 ` Dave Chinner
2010-01-05 15:31 ` Steven Pratt
2009-12-25 1:52 ` Christian Kujau
2009-12-25 13:19 ` lakshmi pathi
2009-12-25 16:14 ` tytso
2009-12-25 16:22 ` Larry McVoy
2009-12-25 16:33 ` tytso
2009-12-25 18:56 ` Christian Kujau
2009-12-25 19:32 ` Christian Kujau
2009-12-25 18:51 ` Christian Kujau
2009-12-26 16:00 ` jim owens
2009-12-26 19:06 ` Christian Kujau
2009-12-27 19:50 ` jim owens
2009-12-27 21:55 ` Christian Kujau
2009-12-27 22:33 ` tytso
2009-12-28 1:24 ` Christian Kujau
2009-12-28 14:08 ` Larry McVoy
2010-01-15 21:42 ` Edward Shishkin
2009-12-26 19:19 ` tytso [this message]
[not found] ` <AAA45328-6BEA-465C-B999-C99D45FC56FF@shobe.info>
2010-01-11 1:32 ` Larry McVoy
2009-12-25 18:42 ` Christian Kujau
2009-12-29 11:27 ` Emmanuel Florac
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=20091226191916.GI32757@thunk.org \
--to=tytso@mit.edu \
--cc=ext3-users@redhat.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=jowens@hp.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=lm@bitmover.com \
--cc=pg_jf2@jf2.for.sabi.co.UK \
--cc=reiserfs-devel@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox