* Nick Piggin <[email protected]> wrote:
> > 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.
>
> We have nothing to pin the pte page with if we're not holding the
> mmap_sem.
why does it have to be pinned? The page is mostly private to this thread
until it manages to flip it into the pte. Since there's no pte presence,
there's no swapout possible [here i'm assuming anonymous malloc()
memory, which is the main focus of Arjan's patch]. Any parallel
unmapping of that page will be caught and the installation of the page
will be prevented by the 'bit-spin-lock' embedded in the pte.
> But even in that case, there is nothing in the mmu gather / tlb flush
> interface that guarantees an architecture cannot free the page table
> pages immediately (ie without waiting for the flush IPI). This would
> make sense on architectures that don't walk the page tables in
> hardware.
but the page wont be found by any other CPU, so it wont be freed! It is
private to this CPU. The page has no pte presence. It will only be
present and lookupable as a result of the cmpxchg() flipping the page
into the pte.
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]