From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <axboe@fb.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-mm@kvack.org
Subject: Re: [PATCH] Avoid always dirtying mapping->flags on O_DIRECT
Date: Mon, 12 May 2014 10:46:19 -0400 [thread overview]
Message-ID: <x49r43z837o.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20140509213907.GA20698@kernel.dk> (Jens Axboe's message of "Fri, 9 May 2014 15:39:07 -0600")
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>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-05-12 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 21:39 [PATCH] Avoid always dirtying mapping->flags on O_DIRECT Jens Axboe
2014-05-12 14:46 ` Jeff Moyer [this message]
2014-05-12 15:08 ` 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=x49r43z837o.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=viro@zeniv.linux.org.uk \
/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).