Messages in this thread | | | From | Nick Piggin <> | Subject | Re: Question about do_wp_page() and lock_page() | Date | Thu, 15 Jan 2009 18:01:23 +1100 |
| |
On Thursday 15 January 2009 08:35:08 Larry Woodman wrote: > Why is it safe for do_wp_page() to call cow_user_page() without locking > the old_page first? If a Direct IO read is outstanding on the old_page > or its the buffer to the file_read_actor() cant its contents change > during the COW fault? Is this not a problem?
Direct IO doesn't lock the pages either.
There has simply never been any synchronisation here (by design: see MADV_DONTFORK/MADV_DOFORK/VM_DONTCOPY etc).
This is one thing which Andrea had been trying to improve. If it can be done without introducing nasty overheads, then yes it would be nice to improve COW vs DIO semantics.
| |