Jens Axboe
7fcbbaf183
mm/filemap.c: avoid always dirtying mapping->flags on O_DIRECT
...
In some testing I ran today (some fio jobs that spread over two nodes),
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.
Signed-off-by: Jens Axboe <axboe@fb.com >
Acked-by: Jeff Moyer <jmoyer@redhat.com >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2014-05-23 09:37:29 -07:00
..
2014-04-03 16:20:49 -07:00
2014-01-23 16:36:50 -08:00
2013-11-13 12:09:09 +09:00
2013-11-23 22:33:49 -08:00
2014-01-23 16:36:50 -08:00
2014-05-06 13:04:59 -07:00
2011-12-06 09:24:07 +01:00
2012-12-11 17:22:24 -08:00
2014-04-07 16:36:15 -07:00
2013-03-03 22:46:22 -05:00
2012-01-03 22:54:56 -05:00
2013-11-06 12:40:26 +01:00
2014-05-23 09:37:29 -07:00
2014-03-19 16:21:49 -07:00
2013-06-12 16:29:46 -07:00
2012-12-20 08:37:05 -08:00
2014-04-18 16:40:09 -07:00
2014-03-19 10:23:54 -04:00
2014-05-06 13:04:58 -07:00
2014-01-21 16:19:48 -08:00
2011-07-26 16:49:47 -07:00
2014-04-07 16:35:58 -07:00
2012-10-09 16:22:42 +09:00
2014-04-01 23:19:30 -04:00
2014-05-15 00:01:41 +01:00
2012-01-10 16:30:42 -08:00
2010-03-30 22:02:32 +09:00
2011-01-27 18:31:51 +00:00
2014-05-11 17:55:48 +09:00
2014-03-04 07:55:47 -08:00
2014-04-03 16:21:01 -07:00
2011-10-31 09:20:12 -04:00
2013-09-30 14:31:02 -07:00
2014-04-12 14:49:50 -07:00
2014-04-07 16:35:58 -07:00
2014-05-06 13:04:59 -07:00
2014-01-23 16:36:52 -08:00
2014-05-23 09:37:29 -07:00
2014-04-25 16:05:40 -07:00
2014-04-07 16:35:54 -07:00
2014-04-07 16:35:55 -07:00
2014-03-20 22:09:09 -07:00
2014-04-03 16:21:00 -07:00
2014-04-07 16:35:57 -07:00
2014-01-27 21:02:39 -08:00
2014-04-07 16:35:53 -07:00
2014-02-21 08:50:17 +01:00
2014-01-23 16:36:52 -08:00
2013-10-09 14:47:45 +02:00
2014-04-07 16:35:50 -07:00
2014-05-11 17:55:48 +09:00
2010-05-21 18:31:21 -04:00
2014-04-03 16:21:02 -07:00
2014-04-07 16:35:55 -07:00
2014-01-30 16:56:56 -08:00
2014-04-07 16:35:59 -07:00
2014-04-03 16:21:02 -07:00
2014-01-30 11:19:05 -08:00
2013-09-11 15:57:48 -07:00
2014-05-06 13:04:58 -07:00
2013-10-30 14:27:03 -07:00
2010-10-02 10:28:42 +03:00
2012-06-20 14:39:36 -07:00
2014-04-14 16:18:06 -04:00
2013-12-18 19:04:51 -08:00
2014-04-12 14:49:50 -07:00
2011-10-31 09:20:11 -04:00
2014-04-07 16:35:58 -07:00
2014-04-07 16:35:57 -07:00
2014-04-13 14:10:26 -07:00
2014-05-06 13:04:59 -07:00
2014-05-05 20:38:49 -07:00
2014-05-06 13:04:59 -07:00
2014-04-11 10:06:06 +03:00
2014-05-06 13:04:59 -07:00
2014-01-21 16:19:47 -08:00
2014-04-07 16:35:54 -07:00
2014-02-06 13:48:51 -08:00
2014-04-03 16:21:01 -07:00
2014-02-06 13:48:51 -08:00
2014-05-06 13:04:59 -07:00
2014-05-06 14:02:53 -04:00
2014-04-28 14:24:09 -07:00
2014-04-07 16:35:55 -07:00
2014-02-03 13:24:01 -05:00
2014-05-06 13:04:59 -07:00
2014-04-07 14:55:46 -07:00
2014-04-03 16:21:01 -07:00
2013-09-11 15:57:35 -07:00
2014-03-20 13:43:45 +01:00
2014-04-07 16:38:06 -07:00