From: Mark Salyzyn <salyzyn@android.com>
To: linux-kernel@vger.kernel.org
Cc: Mark Salyzyn <salyzyn@android.com>,
Riley Andrews <riandrews@android.com>,
Shaohua Li <shli@kernel.org>,
Shaohua Li <shaohua.li@fusionio.com>,
Rik van Riel <riel@redhat.com>,
Wu Fengguang <fengguang.wu@intel.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Vladimir Murzin <vladimir.murzin@arm.com>,
Dave P Martin <Dave.Martin@arm.com>,
David Hildenbrand <dahi@linux.vnet.ibm.com>,
James Morse <james.morse@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: ARM64 readahead: fault retry breaks mmap file read random detection
Date: Mon, 21 Sep 2015 13:39:50 -0700 [thread overview]
Message-ID: <1442868028-27055-1-git-send-email-salyzyn@android.com> (raw)
Description from commit 45cac65b0fcd
("readahead: fault retry breaks mmap file read random detection")
.fault now can retry. The retry can break state machine of .fault. In
filemap_fault, if page is miss, ra->mmap_miss is increased. In the second
try, since the page is in page cache now, ra->mmap_miss is decreased. And
these are done in one fault, so we can't detect random mmap file access.
Add a new flag to indicate .fault is tried once. In the second try, skip
ra->mmap_miss decreasing. The filemap_fault state machine is ok with it.
I only tested x86, didn't test other archs, but looks the change for other
archs is obvious, but who knows :)
< snip >
Yup, arm64 needs this too! Random read improves by 250%, sequential
read improves by 40%, and random write by 400% to an eMMC device with
dm crypto wrapped around it.
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Riley Andrews <riandrews@android.com>
Cc: Shaohua Li <shli@kernel.org>
Cc: Shaohua Li <shaohua.li@fusionio.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
---
arch/arm64/mm/fault.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index aba9ead..9fadf6d 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -287,6 +287,7 @@ retry:
* starvation.
*/
mm_flags &= ~FAULT_FLAG_ALLOW_RETRY;
+ mm_flags |= FAULT_FLAG_TRIED;
goto retry;
}
}
--
2.6.0.rc0.131.gf624c3d
next reply other threads:[~2015-09-21 20:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 20:39 Mark Salyzyn [this message]
2015-09-21 21:09 ` Will Deacon
2015-09-21 21:36 ` Mark Salyzyn
2015-09-21 23:51 ` Will Deacon
2015-09-22 14:15 ` Mark Salyzyn
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=1442868028-27055-1-git-send-email-salyzyn@android.com \
--to=salyzyn@android.com \
--cc=Dave.Martin@arm.com \
--cc=catalin.marinas@arm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=fengguang.wu@intel.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=riandrews@android.com \
--cc=riel@redhat.com \
--cc=shaohua.li@fusionio.com \
--cc=shli@kernel.org \
--cc=vladimir.murzin@arm.com \
--cc=will.deacon@arm.com \
/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
Powered by JetHome