All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: benh@kernel.crashing.org
Cc: Hugh Dickins <hugh@veritas.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: PTE access rules & abstraction
Date: Thu, 25 Sep 2008 15:27:57 -0700	[thread overview]
Message-ID: <48DC106D.9010601@goop.org> (raw)
In-Reply-To: <1222379063.8277.202.camel@pasglop>

Benjamin Herrenschmidt wrote:
> On Thu, 2008-09-25 at 11:15 -0700, Jeremy Fitzhardinge wrote:
>   
>> The ptep_modify_prot_start/commit pair specifies a single pte update in
>> such a way to allow more implementation flexibility - ie, there's no
>> naked requirement for an atomic fetch-and-clear operation.  I chose the
>> transaction-like terminology to emphasize that the start/commit
>> functions must be strictly paired; there's no way to fail or abort the
>> "transaction".  A whole group of those start/commit pairs can be batched
>> together without affecting their semantics.
>>     
>
> I still can't see the point of having now 3 functions instead of just
> one such as ptep_modify_protection(). I don't see what it buys you other
> than adding gratuituous new interfaces.
>   

Yeah, that would work too; that's pretty much how Xen implements it
anyway.  The main advantage of the start/commit pair is that the
resulting code was completely unchanged from the old code.  The mprotect
sequence using ptep_modify_protection would end up reading the pte twice
before writing it.

    J

WARNING: multiple messages have this Message-ID (diff)
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: benh@kernel.crashing.org
Cc: Hugh Dickins <hugh@veritas.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: PTE access rules & abstraction
Date: Thu, 25 Sep 2008 15:27:57 -0700	[thread overview]
Message-ID: <48DC106D.9010601@goop.org> (raw)
In-Reply-To: <1222379063.8277.202.camel@pasglop>

Benjamin Herrenschmidt wrote:
> On Thu, 2008-09-25 at 11:15 -0700, Jeremy Fitzhardinge wrote:
>   
>> The ptep_modify_prot_start/commit pair specifies a single pte update in
>> such a way to allow more implementation flexibility - ie, there's no
>> naked requirement for an atomic fetch-and-clear operation.  I chose the
>> transaction-like terminology to emphasize that the start/commit
>> functions must be strictly paired; there's no way to fail or abort the
>> "transaction".  A whole group of those start/commit pairs can be batched
>> together without affecting their semantics.
>>     
>
> I still can't see the point of having now 3 functions instead of just
> one such as ptep_modify_protection(). I don't see what it buys you other
> than adding gratuituous new interfaces.
>   

Yeah, that would work too; that's pretty much how Xen implements it
anyway.  The main advantage of the start/commit pair is that the
resulting code was completely unchanged from the old code.  The mprotect
sequence using ptep_modify_protection would end up reading the pte twice
before writing it.

    J

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-09-25 22:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 17:42 PTE access rules & abstraction Benjamin Herrenschmidt
2008-09-19 17:42 ` Benjamin Herrenschmidt
2008-09-22  6:22 ` Jeremy Fitzhardinge
2008-09-22  6:22   ` Jeremy Fitzhardinge
2008-09-22 21:05   ` Benjamin Herrenschmidt
2008-09-22 21:05     ` Benjamin Herrenschmidt
2008-09-23  3:10     ` Nick Piggin
2008-09-23  3:10       ` Nick Piggin
2008-09-23  3:16       ` David Miller
2008-09-23  3:16         ` David Miller, Nick Piggin
2008-09-23  5:35         ` Benjamin Herrenschmidt
2008-09-23  5:35           ` Benjamin Herrenschmidt
2008-09-23  6:18           ` Nick Piggin
2008-09-23  6:18             ` Nick Piggin
2008-09-23  5:31       ` Benjamin Herrenschmidt
2008-09-23  5:31         ` Benjamin Herrenschmidt
2008-09-23  6:13         ` Jeremy Fitzhardinge
2008-09-23  6:13           ` Jeremy Fitzhardinge
2008-09-23  6:49           ` Benjamin Herrenschmidt
2008-09-23  6:49             ` Benjamin Herrenschmidt
2008-09-23  9:50             ` Nick Piggin
2008-09-23  9:50               ` Nick Piggin
2008-09-23 11:54               ` peter
2008-09-23 11:54                 ` peter
2008-09-24 18:45     ` Hugh Dickins
2008-09-24 18:45       ` Hugh Dickins
2008-09-24 21:20       ` Benjamin Herrenschmidt
2008-09-24 21:20         ` Benjamin Herrenschmidt
2008-09-24 21:57         ` Jeremy Fitzhardinge
2008-09-24 21:57           ` Jeremy Fitzhardinge
2008-09-24 22:07           ` Benjamin Herrenschmidt
2008-09-24 22:07             ` Benjamin Herrenschmidt
2008-09-24 22:43             ` Jeremy Fitzhardinge
2008-09-24 22:43               ` Jeremy Fitzhardinge
2008-09-24 22:53               ` Benjamin Herrenschmidt
2008-09-24 22:53                 ` Benjamin Herrenschmidt
2008-09-24 23:55         ` Hugh Dickins
2008-09-24 23:55           ` Hugh Dickins
2008-09-25  1:04           ` Benjamin Herrenschmidt
2008-09-25  1:04             ` Benjamin Herrenschmidt
2008-09-25 18:15             ` Jeremy Fitzhardinge
2008-09-25 18:15               ` Jeremy Fitzhardinge
2008-09-25 21:44               ` Benjamin Herrenschmidt
2008-09-25 21:44                 ` Benjamin Herrenschmidt
2008-09-25 22:27                 ` Jeremy Fitzhardinge [this message]
2008-09-25 22:27                   ` Jeremy Fitzhardinge
2008-09-25 23:02                   ` Benjamin Herrenschmidt
2008-09-25 23:02                     ` Benjamin Herrenschmidt
2008-09-24 22:17       ` Martin Schwidefsky
2008-09-24 22:17         ` Martin Schwidefsky

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=48DC106D.9010601@goop.org \
    --to=jeremy@goop.org \
    --cc=benh@kernel.crashing.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=schwidefsky@de.ibm.com \
    /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.