POC: mm: Optimize readahead for executable mappings
On arm64 if memory is physically contiguous and naturally aligned to the
"contpte" size, we can use contpte mappings, which improves utilization
of the TLB. When paired with the "small-sized THP" changes, this works
well to reduce dTLB pressure. However iTLB pressure is still high due to
executable mappings having a low liklihood of being in the required
folio size, even when the filesystem supports readahead into large
folios (e.g. XFS).
Change the readahead config so that if it is being requested for an
executable mapping, do a synchronous read of the contpte order in an
aligned manner.
On arm64, this increases contpte-mapped executable pages from ~5% to
~90% when running a kernel compilation benchmark, and reduces the
runtime of the compilation by ~1.5% overall.
Note: This is currently a proof-of-concept patch which directly tunes
readahead for arm64 with 4K page size. Work is required to make this
patch suitable for upstream.
Signed-off-by:
Ryan Roberts <ryan.roberts@arm.com>
Loading
Please register or sign in to comment