WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 0 of 4] mm+paravirt+xen: add pte read-modify-writ

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 0 of 4] mm+paravirt+xen: add pte read-modify-write abstraction
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 23 May 2008 21:42:23 +0100
Cc: Zachary Amsden <zach@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, kvm-devel <kvm-devel@xxxxxxxxxxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Virtualization Mailing List <virtualization@xxxxxxxxxxxxxx>, Hugh Dickins <hugh@xxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Delivery-date: Fri, 23 May 2008 13:43:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.LFD.1.10.0805231133130.3081@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1211552448@localhost> <alpine.LFD.1.10.0805231133130.3081@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080501)
Linus Torvalds wrote:
On Fri, 23 May 2008, Jeremy Fitzhardinge wrote:
This series adds the pte_rmw_start() and pte_rmw_commit() operations,
which change this sequence to:

        ptent = pte_rmw_start(mm, addr, pte);
        ptent = pte_modify(ptent, newprot);
        /* ... */
        pte_rmw_commit(mm, addr, pte, ptent);

Can you please rename these.

It's not a general "read-modify-write" operation on the PTE, and this *only* works for changing protection details. In particular, you cannot use pte_rmw_start/commit to change the actual page. So it's very much about just protection bits.

Well, you could use it to update the page and protection bits while preserving the AD bits, but I don't think that's very useful.

It should probably also be called ptep_xyz(), since it takes a pte pointer, not a pte.

So maybe calling it "ptent = ptep_modify_prot_start(..)" ... "ptep_modify_prot_commit(..)" or something.

Yep, sounds fine to me.

   J


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel