* Nick Piggin <[email protected]> wrote:
> I'm worried about the situation where we allocate but don't use the
> new page: it blows quite a bit of cache. Then, when we do get around
> to using it, it will be cold(er).
couldnt the new pte be flipped in atomically via cmpxchg? That way we
could do the page clearing close to where we are doing it now, but
without holding the mmap_sem.
to solve the pte races we could use a bit in the [otherwise empty] pte
to signal "this pte can be flipped in from now on", which bit would
automatically be cleared if mprotect() or munmap() is called over that
range (without any extra changes to those codepaths). (in the rare case
if the cmpxchg() fails, we go into a slowpath that drops the newly
allocated page, re-lookups the vma and the pte, etc.)
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]