lkml.org 
[lkml]   [2005]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Nick's core remove PageReserved broke vmware...
From
Date
On Wed, 2005-11-02 at 21:41 +0000, Hugh Dickins wrote:

> The only extant problem here is if the pages are private, and you
> fork while this is going on, and the parent user process writes to the
> area before completion: then COW leaves the child with the page being
> DMAed into, giving the parent a copied page which may be incomplete.

Won't happen, and if it does, it's a user error to rely on that working,
so it doesn't matter.

> It's important that any necessary COW be done at get_user_pages time,
> if there's any possibility that you'll be DMAing into them. So when
> in doubt, call it for write access.

True, I forgot about COW... it still annoys me to mark dirty pages that
may not be in the end... but hell, the main usefulness of this DMA stuff
is DMA to memory anyway (AGP is good enough for the other direction most
of the time).

> Take a look at Andrew's educational comment on set_page_dirty_lock
> in mm/page-writeback.c. You do have the list of pages you need to
> page_cache_release, don't you? So it should be easy to dirty them.

Ok, so just passing 'write' to get_user_pages() is good enough; right ?

Thanks,
Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-02 22:51    [W:0.070 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site