Alan Cox wrote:
> > struct page of course). Note that it doesn't matter if another thread,
> > and this includes truncate/write in another thread, clobbers the page
> > data. That's just the normal effect of two concurrent writers to the
> > same memory.
> Oh it does matter. You might send out a page of kernel data by mistake, or
> one some machines take a fault
Of course you still have to lock the page (bump the reference count) and
write-fault if it needs unsharing.
What I mean is it doesn't matter if another thread writes to the page,
even from kernel space, as long as it's still the same user space page.
You don't have to prevent _other_ writers from accessing the page, so
you don't need to modify page tables or do any TLB flushes.
(This applies on x86 at least. I'm not so sure how DMA cache coherency
works on other architectures.)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:17 EST