Re: [PATCH 4/4] add ksm kernel shared memory driver.

Jeremy Fitzhardinge
2009-04-16T16:09:01Z

Andrea Arcangeli wrote:
> On Wed, Apr 15, 2009 at 05:43:03PM -0700, Jeremy Fitzhardinge wrote:
>
>> Shouldn't that be kmap_atomic's job anyway? Otherwise it would be hard to
>>
>
> No because those are full noops in no-highmem kernels. I commented in
> other email why I think it's safe thanks to the wrprotect + smp tlb
> flush of the userland PTE.
>

I think Andrew's query was about data cache synchronization in
architectures with virtually indexed d-cache. On x86 it's a non-issue,
but on architectures for which it is an issue, I assume kmap_atomic does
any necessary cache flushes, as it does tlb flushes on x86 (which may be
none at all, if no mapping actually happens).

J