]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: readahead: fault retry breaks mmap file read random detection
authorMark Salyzyn <salyzyn@android.com>
Mon, 21 Sep 2015 20:39:50 +0000 (21:39 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 5 Oct 2015 15:30:50 +0000 (16:30 +0100)
commit3bdea5d6d5733dd9f3bbacaed991d04fdfc9200f
tree3a5ce66c7a3f903c9ce4927e8da4e187e3fb3870
parent6d467920bd273ccb31d2004a51c975aad3d1c5ff
arm64: readahead: fault retry breaks mmap file read random detection

This is the arm64 portion of commit fc69e91cee6d ("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>
arch/arm64/mm/fault.c