From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction Date: Wed, 18 Jun 2008 22:03:43 -0700 Message-ID: <4859E8AF.30306@goop.org> References: <1213831403.8011.24.camel@pasglop> <4859A149.9090004@goop.org> <4859A528.1010107@goop.org> <1213835971.8011.54.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1213835971.8011.54.camel@pasglop> Sender: linux-kernel-owner@vger.kernel.org To: benh@kernel.crashing.org Cc: Linus Torvalds , xen-devel , Peter Zijlstra , kvm-devel , x86@kernel.org, LKML , Virtualization Mailing List , Hugh Dickins , Ingo Molnar , Thomas Gleixner List-Id: virtualization@lists.linuxfoundation.org Benjamin Herrenschmidt wrote: > On Wed, 2008-06-18 at 17:24 -0700, Linus Torvalds wrote: > >> On Wed, 18 Jun 2008, Jeremy Fitzhardinge wrote: >> >>> Along the lines of: >>> >> Hell no. There's a reason we have a special set_wrprotect() thing. We can >> do it more efficiently on native hardware by just clearing the bit >> atomically. No need to do the cmpxchg games. >> > > But we can't batch ... > Which architecture are you interested in? If it isn't x86, you can probably get anything past Linus ;) I'll do some measurements to see what effect the batchable ptep_set_wrprotect() has on native. If it's significant, I'll propose making it conditional on CONFIG_PARAVIRT. J