From: Hugh Dickins <hugh@veritas.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Bryan Henderson <hbryan@us.ibm.com>,
David Howells <dhowells@redhat.com>,
Andrew Morton <akpm@osdl.org>,
fsdevel <linux-fsdevel@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
nathans@sgi.com, Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Subject: Re: RFC: [PATCH-2.6] Add helper function to lock multiple page cache pages - nopage alternative
Date: Fri, 4 Feb 2005 17:17:55 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0502041657080.10578@goblin.wat.veritas.com> (raw)
In-Reply-To: <1107531392.12460.14.camel@imp.csi.cam.ac.uk>
On Fri, 4 Feb 2005, Anton Altaparmakov wrote:
> On Thu, 2005-02-03 at 11:23 -0800, Bryan Henderson wrote:
> >
> > I think the point is that we can't have a "handler for writes," because
> > the writes are being done by simple CPU Store instructions in a user
> > program. The handler we're talking about is just for page faults. Other
>
> That was my understanding.
>
> > operating systems approach this by actually _having_ a handler for a CPU
> > store instruction, in the form of a page protection fault handler -- the
> > nopage routine adds the page to the user's address space, but write
> > protects it. The first time the user tries to store into it, the
> > filesystem driver gets a chance to do what's necessary to support a dirty
> > cache page -- allocate a block, add additional dirty pages to the cache,
> > etc. It would be wonderful to have that in Linux.
>
> It would. This would certainly solve this problem.
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.
Didn't look further, think you should take a look at page_mkwrite,
but don't expect the implementation to be correct yet.
Hugh
next prev parent reply other threads:[~2005-02-04 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-02 15:12 RFC: [PATCH-2.6] Add helper function to lock multiple page cache pages Anton Altaparmakov
2005-02-02 15:43 ` Matthew Wilcox
2005-02-02 15:56 ` Anton Altaparmakov
2005-02-02 22:34 ` Andrew Morton
2005-02-03 10:37 ` Anton Altaparmakov
2005-02-03 10:47 ` Andrew Morton
2005-02-03 11:23 ` Anton Altaparmakov
2005-02-03 19:23 ` RFC: [PATCH-2.6] Add helper function to lock multiple page cache pages - nopage alternative Bryan Henderson
2005-02-04 15:36 ` Anton Altaparmakov
2005-02-04 17:17 ` Hugh Dickins [this message]
2005-02-03 19:03 ` RFC: [PATCH-2.6] Add helper function to lock multiple page cache pages - loop device Bryan Henderson
2005-02-06 19:42 ` RFC: [PATCH-2.6] Add helper function to lock multiple page cache pages Anton Altaparmakov
2005-02-06 20:42 ` Andrew Morton
2005-02-16 21:56 ` Anton Altaparmakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0502041657080.10578@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=aia21@cam.ac.uk \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=hbryan@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathans@sgi.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®