Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: Troels Arvin <troels@arvin.dk>
Cc: fio@vger.kernel.org
Subject: Re: Unaligned AIO/DIO
Date: Wed, 1 Jun 2011 15:17:28 +0200	[thread overview]
Message-ID: <4DE63BE8.60105@fusionio.com> (raw)
In-Reply-To: <4DE635E0.8060808@arvin.dk>

On 2011-06-01 14:51, Troels Arvin wrote:
> Hello,
> 
> Jens Axboe wrote:
>> Do you have the RHEL6.1 kernel sources handy?
> 
> I just grabbed the particular kernel package'es source-package, installed it into ~/rpmbuild and ran "rpmbuild -bp" on its spec-file which should result in all RHs patches to be applied.
> 
> From the resulting code in ~/rpmbuild/BUILD/..., I grabbed file.c and placed it here:
> http://troels.arvin.dk/misc/fio/unaligned/
> 
> Lines close to the error message (probably wrapped by my mailer):
> 
>     /* Unaligned direct AIO must be serialized; see comment above */
>     if (unaligned_aio) {
>         static unsigned long unaligned_warn_time;
> 
>         /* Warn about this once per day */
>         if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ))
>             ext4_msg(inode->i_sb, KERN_WARNING,
>                  "Unaligned AIO/DIO on inode %ld by %s; "
>                  "performance will be poor.",
>                  inode->i_ino, current->comm);
> 
>         mutex_lock(&EXT4_I(inode)->i_aio_mutex);
>         ext4_aiodio_wait(inode);
>      }

Ah, so this is indeed the < 4KB O_DIRECT writes. The iometer like test
case you are using is meant to be used on a raw block device, not on a
file system. For a file system, doing less than the block size of IO
will incur RMW cycles and thus be very slow compared to full block size
(or more) O_DIRECT writes.

If you want to run it on the fs, either change the block size mappings
to avoid anything less than 4K. Or change the fs to be formatted with
512b blocks.

Or just run the test on the raw device :-)

-- 
Jens Axboe


  reply	other threads:[~2011-06-01 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 18:22 Unaligned AIO/DIO Troels Arvin
2011-06-01 10:46 ` Jens Axboe
2011-06-01 12:51   ` Troels Arvin
2011-06-01 13:17     ` Jens Axboe [this message]
2011-06-01 14:33       ` Troels Arvin
2011-06-02 11:51         ` Jens Axboe

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=4DE63BE8.60105@fusionio.com \
    --to=jaxboe@fusionio.com \
    --cc=fio@vger.kernel.org \
    --cc=troels@arvin.dk \
    /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