From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757072AbYFSAAN (ORCPT ); Wed, 18 Jun 2008 20:00:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755287AbYFRX7w (ORCPT ); Wed, 18 Jun 2008 19:59:52 -0400 Received: from gw.goop.org ([64.81.55.164]:58304 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755247AbYFRX7u (ORCPT ); Wed, 18 Jun 2008 19:59:50 -0400 Message-ID: <4859A149.9090004@goop.org> Date: Wed, 18 Jun 2008 16:59:05 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: benh@kernel.crashing.org CC: Ingo Molnar , LKML , x86@kernel.org, xen-devel , Thomas Gleixner , Hugh Dickins , Zachary Amsden , kvm-devel , Virtualization Mailing List , Rusty Russell , Peter Zijlstra , Linus Torvalds Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction References: <1213831403.8011.24.camel@pasglop> In-Reply-To: <1213831403.8011.24.camel@pasglop> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Benjamin Herrenschmidt wrote: > On Mon, 2008-06-16 at 04:30 -0700, Jeremy Fitzhardinge wrote: > >> The only current user of this interface is mprotect >> > > Do you plan to use it with fork ultimately ? > Good point, I'd overlooked that. I guess that means using it in ptep_set_wrprotect(). At present the x86 ptep_set_wrprotect() just uses clear_bit on the pte, which is a locked cycle. Is that significantly cheaper than an xchg + set? (Same number of locked operations...) J