All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm+eric@npwt.net (Eric W. Biederman)
To: Jason Crawford <jasonc@cacr.caltech.edu>
Cc: Linux MM <linux-mm@kvack.org>
Subject: Re: Linux wppage patch (fwd)
Date: 30 Jun 1998 12:59:11 -0500	[thread overview]
Message-ID: <m1ww9y7ouo.fsf@flinx.npwt.net> (raw)
In-Reply-To: Rik van Riel's message of Fri, 26 Jun 1998 07:34:10 +0200 (CEST)

>>>>> "JC" == Rik van Riel <H.H.vanRiel@phys.uu.nl> writes:

JC> ---------- Forwarded message ----------
JC> Date: Thu, 25 Jun 1998 21:10:00 -0700 (PDT)
JC> From: Jason Crawford <jasonc@cacr.caltech.edu>
JC> To: h.h.vanriel@phys.uu.nl
JC> Subject: Linux wppage patch

JC> 2. Make a slight change to the way the custom nopage routine is called.
JC> The third argument to nopage is declared as "write_access" in the
JC> definition of the VM operations struct in mm.h. But when it's called, it
JC> is actually "no_share", computed as:

JC> 	(vma->vm_flags & VM_SHARED) ? 0 : write_access

JC> My code, however, needs to know whether the access was a write even
JC> though it is shared memory, so I would like to change this argument to
JC> just "write_access". Since the VMA is passed in to the routine anyway,
JC> the VM flags will be available, and any routine which wants to calculate
JC> "no_share" can do so. Again, I searched the Linux source tree, and only
JC> the generic filemap_nopage routine uses the no_share argument. It can
JC> easily be changed to accept "write_access" instead of "no_share" and
JC> calculate "no_share" before it does any work.

Your code basically looks reasonable but there is a potential gotcha
in the works.

Shared pages are never write protected by the nopage routine so you
will never discover if a shared page has been written too...

Which could cause all kinds of havoc for distrubuted shared memory.

Eric

      reply	other threads:[~1998-06-30 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-26  5:34 Linux wppage patch (fwd) Rik van Riel
1998-06-30 17:59 ` Eric W. Biederman [this message]

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=m1ww9y7ouo.fsf@flinx.npwt.net \
    --to=ebiederm+eric@npwt.net \
    --cc=jasonc@cacr.caltech.edu \
    --cc=linux-mm@kvack.org \
    /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 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.