highmem and cache handling

Mulyadi Santosa mulyadi.santosa at gmail.com
Thu Mar 29 02:31:41 EDT 2012


Hi Vladimir...

On Wed, Mar 28, 2012 at 19:30, Vladimir Murzin <murzin.v at 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



More information about the Kernelnewbies mailing list