Having the memory cache dealing in virtual memory has also its advantages, it means that each *applications* has the whole memory cache available.
Obviously then, context switch has to save and restore the cache - but after all that is the memory which is really often used by the application, and it will worth it to restart the application with its cache "hot".
I do not know if the cache memory can be saved/restored on that ARM processor, and probably some optimisation is needed if the application do not use some of the cache lines or is short lived, but this whole virtual memory cache system may be an improvement in some cases.
Posted Oct 27, 2009 7:46 UTC (Tue) by robbe (guest, #16131)
[Link]
I may miss something, but restoring the *whole* cache at context switch
will not magically be faster than restoring *all* inidividual cachelines
on first (re)use. So you are essentially trading a huge context switch
delay for less initial cache misses. Overall this should at best perform
equally (if each restored cacheline is used at least once), and typically
worse (if there are cachelines that won't be used again) than the normal,
lazy strategy.
Unless there is some win by doing bulk memory transfers. But individual
cachelines should be wide enough to incure this win also.