Elimination of cpu_l2cache_* functions
Mark Tinguely
marktinguely at gmail.com
Mon Feb 7 20:06:29 UTC 2011
On 2/7/2011 12:43 PM, Marcel Moolenaar wrote:
> All,
>
> I've been reviewing the use of the cpu_l2cache_* functions and found
> that 1) they're missing from cpu_witch() and 2) they are always used
> in conjunction with either cpu_idcache_* or cpu_dcache_*.
>
> Since most CPU variants define them as null ops, isn't it better to
> incorporate the functionality of cpu_l2cache_* in cpu_idcache_* and
> cpu_dcache_* and eliminate them altogether?
>
> Any objections to me removing cpu_l2cache_* and therefore changing
> the semantics of cpu_idcache_* and cpu_dcahce_* to apply to all
> relevant cache levels?
>
> Thanks,
It was pointed out to me that the level two cache operation were removed
from the context switch on purpose, for performance reasons. I think
this exception is why we still have both a level one and level two cache
operation definitions.
I proposed the senerio that the Sheeva cluster IO filesystem corruption
problem is related to level two caches not being written back and
removed upon context switch. Assuming we want to keep the performance
gain by not performing the level two cache operations when we perform a
context switch, and since I believe that the Sheeva has PIPT level two
caches, I have a proposed fix to pmap_idcache_wdinv_range() that maps
the page to a local KVA and doing the appropriate level two cache
operation when needed.
---
In ARMv6 and ARMv7, the inner (level one) caches are PIPT, and all
these cache operations go away with the exception of the sync area of
the busdma routine.
--Mark Tinguely
More information about the freebsd-arm
mailing list