All of lore.kernel.org
 help / color / mirror / Atom feed
* page_mkwrite seems broken
@ 2005-02-09 14:28 Hugh Dickins
  2005-10-24 15:16 ` what happened to page_mkwrite? - was: " Anton Altaparmakov
  0 siblings, 1 reply; 25+ messages in thread
From: Hugh Dickins @ 2005-02-09 14:28 UTC (permalink / raw)
  To: David Howells
  Cc: Christoph Hellwig, Anton Altaparmakov, Andrew Morton,
	linux-kernel

On Fri, 4 Feb 2005, Hugh Dickins wrote in another thread:
> 
> Isn't this exactly what David Howells' page_mkwrite stuff in -mm's
> add-page-becoming-writable-notification.patch is designed for?
> 
> Though it looks a little broken to me as it stands (beyond the two
> fixup patches already there).  I've not found time to double-check
> or test, apologies in advance if I'm libelling, but...
> 
> (a) I thought the prot bits do_nopage gives a pte in a shared writable
>     mapping include write permission, even when it's a read fault:
>     that can't be allowed if there's a page_mkwrite.
> 
> (b) I don't understand how do_wp_page's "reuse" logic for whether it
>     can just go ahead and use the existing anonymous page, would have
>     any relevance to calling page_mkwrite on a shared writable page,
>     which must be used and not COWed however many references there are.

I have now looked further, and both points still seem valid to me:
the page_mkwrite calling code looks doubly broken.  (Tested?)

Nor has there been any movement on the points raised by Christoph,
that aops->page_mkwrite is redundant, and do_wp_page_mk_pte_writable
separation unhelpful.

I could probably put page_mkwrite to use in tmpfs (to eliminate its
unsatisfactory but never over-troubling shmem_recalc_inode), but not
as it currently stands.

Are you planning any movement on this, David?
Or should I have a go sometime?

Hugh

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [Ocfs2-devel] [-mm PATCH] ocfs2: Shared writeable mmap
  2006-06-20  7:07 ` Peter Zijlstra
@ 2006-06-20 12:59 David Howells
  2006-06-20  7:07 ` Peter Zijlstra
  0 siblings, 1 reply; 25+ messages in thread
From: David Howells @ 2006-06-20 12:59 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Andrew Morton, Mark Fasheh, dhowells, linux-fsdevel, ocfs2-devel

Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> -	if (unlikely(vma->vm_flags & VM_SHARED)) {
> +	if (unlikely(vma->vm_flags & (VM_SHARED|VM_WRITE) ==
> +				VM_SHARED|VM_WRITE) {

NAK!

"==" is higher priority than "|".  What you meant was:

-	if (unlikely(vma->vm_flags & VM_SHARED)) {
+	if (unlikely(vma->vm_flags & (VM_SHARED|VM_WRITE) ==
+				(VM_SHARED|VM_WRITE)) {

David

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2006-06-20 13:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09 14:28 page_mkwrite seems broken Hugh Dickins
2005-10-24 15:16 ` what happened to page_mkwrite? - was: " Anton Altaparmakov
2005-10-24 15:26   ` David Howells
2005-10-24 15:43     ` Anton Altaparmakov
2005-10-24 16:01       ` Hugh Dickins
2005-10-24 19:38         ` Anton Altaparmakov
2005-10-24 20:31           ` Hugh Dickins
2005-10-24 21:18             ` Anton Altaparmakov
2005-10-24 16:23       ` [PATCH] Add notification of page becoming writable to VMA ops David Howells
2005-10-24 19:11         ` Hugh Dickins
2005-10-25  7:59           ` Anton Altaparmakov
2005-10-25  8:26             ` Hugh Dickins
2005-10-25  8:49               ` Anton Altaparmakov
2005-10-25  9:49           ` David Howells
2005-10-25  9:55           ` David Howells
2005-10-25 10:12           ` David Howells
2005-10-25 13:18           ` [PATCH] Add notification of page becoming writable to VMA ops [try #2] David Howells
2005-11-30 13:58             ` [PATCH] Add notification of page becoming writable to VMA ops [try #3] David Howells
2005-11-30 14:40               ` Miklos Szeredi
2005-11-30 14:50                 ` David Howells
2005-11-30 15:20               ` [PATCH] Add notification of page becoming writable to VMA ops [try #4] David Howells
2006-01-11 12:19                 ` [PATCH] Add notification of page becoming writable to VMA ops [try #5] David Howells
2005-10-24 15:36   ` what happened to page_mkwrite? - was: Re: page_mkwrite seems broken Hugh Dickins
2005-10-24 15:49     ` Anton Altaparmakov
  -- strict thread matches above, loose matches on Subject: below --
2006-06-20 12:59 [Ocfs2-devel] [-mm PATCH] ocfs2: Shared writeable mmap David Howells
2006-06-20  7:07 ` Peter Zijlstra
2006-06-19 23:46   ` Mark Fasheh
2006-06-20  0:07     ` Andrew Morton
2006-06-20 13:02       ` David Howells
2006-06-20 13:20         ` [PATCH] Add notification of page becoming writable to VMA ops David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.