From: Zach Brown <zab@redhat.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Why does btrfs benchmark so badly in this case?
Date: Thu, 8 Aug 2013 14:25:16 -0700 [thread overview]
Message-ID: <20130808212516.GY12314@lenny.home.zabbo.net> (raw)
In-Reply-To: <2A60AA23-4496-4C0F-9B4A-22DF5DB3884F@colorremedies.com>
> I also don't know if any common use fs has an optimization whereby
> just the modified sector(s) is overwritten, rather than all sectors
> making up the file system block being modified.
Most of them do. The generic direct io path allows sector sized dio.
The very first bit of do_blockdev_direct_IO() is testing first for file
system block size alignment then for block device sector size alignment.
You can see this easily with dd conv=notrunc oflags=direct and blktrace.
# blockdev --getss /dev/sda
512
# blockdev --getbsz /dev/sda
4096
# blktrace -d /dev/sda -a issue -o - | blkparse -i - &
$ dd if=/dev/zero of=file bs=4096 count=1 oflag=direct conv=notrunc
8,0 3 14 35.957320002 17941 D WS 137297704 + 8 [dd]
$ dd if=/dev/zero of=file bs=512 count=1 oflag=direct conv=notrunc
8,0 1 4 31.405641362 17940 D WS 137297704 + 1 [dd]
- z
prev parent reply other threads:[~2013-08-08 21:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 16:13 Why does btrfs benchmark so badly in this case? John Williams
2013-08-08 17:29 ` Josef Bacik
2013-08-08 18:37 ` Clemens Eisserer
2013-08-08 19:40 ` Josef Bacik
2013-08-08 20:23 ` John Williams
2013-08-08 20:38 ` Josef Bacik
2013-08-09 21:35 ` Kai Krakow
2013-08-12 13:48 ` Josef Bacik
2013-08-08 20:59 ` Chris Murphy
2013-08-08 21:25 ` Zach Brown [this message]
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=20130808212516.GY12314@lenny.home.zabbo.net \
--to=zab@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.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;
as well as URLs for NNTP newsgroup(s).