Re: Unaligned AIO/DIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Home]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Powered by Linux