From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755625AbYEWS66 (ORCPT ); Fri, 23 May 2008 14:58:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751925AbYEWS6t (ORCPT ); Fri, 23 May 2008 14:58:49 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:57775 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbYEWS6s (ORCPT ); Fri, 23 May 2008 14:58:48 -0400 Date: Fri, 23 May 2008 11:57:51 -0700 (PDT) From: Linus Torvalds To: Jeremy Fitzhardinge cc: Ingo Molnar , LKML , xen-devel , Thomas Gleixner , Hugh Dickins , Zachary Amsden , kvm-devel , Virtualization Mailing List , Rusty Russell , Peter Zijlstra Subject: Re: [PATCH 0 of 4] mm+paravirt+xen: add pte read-modify-write abstraction In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Linus