diff options
author | Mark Salyzyn <salyzyn@android.com> | 2015-09-21 21:39:50 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-10-05 16:30:50 +0100 |
commit | 569ba74a7ba69f46ce2950bf085b37fea2408385 (patch) | |
tree | 3a5ce66c7a3f903c9ce4927e8da4e187e3fb3870 /arch/arm64 | |
parent | 95485fdc64b1067e0e88d8c7980eb57994ad450e (diff) | |
download | blackbird-op-linux-569ba74a7ba69f46ce2950bf085b37fea2408385.tar.gz blackbird-op-linux-569ba74a7ba69f46ce2950bf085b37fea2408385.zip |
arm64: readahead: fault retry breaks mmap file read random detection
This is the arm64 portion of commit 45cac65b0fcd ("readahead: fault
retry breaks mmap file read random detection"), which was absent from
the initial port and has since gone unnoticed. The original commit says:
> .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.
With this change, Mark reports that:
> 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.
Cc: Shaohua Li <shli@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Riley Andrews <riandrews@android.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/mm/fault.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index aba9ead1384c..9fadf6d7039b 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; } } |