lkml.org 
[lkml]   [2014]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Avoid always dirtying mapping->flags on O_DIRECT
Date
Jens Axboe <axboe@fb.com> writes:

> Hi,
>
> In some testing I ran today, we end up spending 40% of the time in
> filemap_check_errors(). That smells fishy. Looking further, this is
> basically what happens:
>
> blkdev_aio_read()
> generic_file_aio_read()
> filemap_write_and_wait_range()
> if (!mapping->nr_pages)
> filemap_check_errors()
>
> and filemap_check_errors() always attempts two test_and_clear_bit() on
> the mapping flags, thus dirtying it for every single invocation. The
> patch below tests each of these bits before clearing them, avoiding this
> issue. In my test case (4-socket box), performance went from 1.7M IOPS
> to 4.0M IOPS.

It might help to use the word cacheline somewhere in here. ;-) Out of
curiosity, what workload were you running?

Acked-by: Jeff Moyer <jmoyer@redhat.com>


\
 
 \ /
  Last update: 2014-05-12 17:21    [W:0.061 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site