highmem and cache handling
Hello everyone! I can see across the Linux kernel source code that some kmap*()/kunmap*() pairs are coupled with flush_dcache_page(). Sometimes it is done outside kmap*()/kunmap() pairs, sometimes inside... I'm curious is there any rule how it should be done correctly or it should be handled case by case? Best wishes, Vladimir Murzin
Hi Vladimir... On Wed, Mar 28, 2012 at 19:30, Vladimir Murzin <murzin.v@gmail.com> wrote:
Hello everyone!
I can see across the Linux kernel source code that some kmap*()/kunmap*() pairs are coupled with flush_dcache_page(). Sometimes it is done outside kmap*()/kunmap() pairs, sometimes inside... I'm curious is there any rule how it should be done correctly or it should be handled case by case?
Never "read" such "rule", but IMHO to be sure TLB really cache the new mapping, flush_dcache_page() logically should be done before kmap(). But I think it's platform dependent.... not sure though.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (2)
-
Mulyadi Santosa -
Vladimir Murzin