• Paul Mundt's avatar
    sh: sh4_flush_cache_mm() optimizations. · 654d364e
    Paul Mundt authored
    The i-cache flush in the case of VM_EXEC was added way back when as a
    sanity measure, and in practice we only care about evicting aliases from
    the d-cache. As a result, it's possible to drop the i-cache flush
    completely here.
    
    After careful profiling it's also come up that all of the work associated
    with hunting down aliases and doing ranged flushing ends up generating
    more overhead than simply blasting away the entire dcache, particularly
    if there are many mm's that need to be iterated over. As a result of
    that, just move back to flush_dcache_all() in these cases, which restores
    the old behaviour, and vastly simplifies the path.
    
    Additionally, on platforms without aliases at all, this can simply be
    nopped out. Presently we have the alias check in the SH-4 specific
    version, but this is true for all of the platforms, so move the check up
    to a generic location. This cuts down quite a bit on superfluous cacheop
    IPIs.
    Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
    654d364e
cache.c 8.48 KB