lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Question about do_wp_page() and lock_page()
Date
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.



\
 
 \ /
  Last update: 2009-01-15 08:27    [W:0.675 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site