From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Jones Subject: Re: [PATCH 3/4] Pte xchg optimization.patch Date: Thu, 12 Apr 2007 14:18:09 -0400 Message-ID: <20070412181809.GC25646@redhat.com> References: <200704120530.l3C5UweV022834@zach-dev.vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <200704120530.l3C5UweV022834@zach-dev.vmware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Zachary Amsden Cc: Andrew Morton , Andi Kleen , Virtualization Mailing List , Chris Wright , David Rientjes , Hugh Dickins , Linux Kernel Mailing List List-Id: virtualization@lists.linuxfoundation.org On Wed, Apr 11, 2007 at 10:30:58PM -0700, Zachary Amsden wrote: > In situations where page table updates need only be made locally, and th= ere > is no cross-processor A/D bit races involved, we need not use the heavyw= eight > xchg instruction to atomically fetch and clear page table entries. Inst= ead, > we can just read and clear them directly. > = > This introduces a neat optimization for non-SMP kernels; drop the atomic > xchg operations from page table updates. Would it be feasible to do this using the smp_alternatives stuff? Given many distros are now shipping SMP-only kernels, it'd be nice to get that win without using having to rebuild their kernels. Dave -- = http://www.codemonkey.org.uk From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030628AbXDLSTU (ORCPT ); Thu, 12 Apr 2007 14:19:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030657AbXDLSTU (ORCPT ); Thu, 12 Apr 2007 14:19:20 -0400 Received: from mx1.redhat.com ([66.187.233.31]:56274 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030628AbXDLSTT (ORCPT ); Thu, 12 Apr 2007 14:19:19 -0400 Date: Thu, 12 Apr 2007 14:18:09 -0400 From: Dave Jones To: Zachary Amsden Cc: Andrew Morton , Andi Kleen , Jeremy Fitzhardinge , Rusty Russell , Chris Wright , Hugh Dickins , David Rientjes , Michel Lespinasse , Virtualization Mailing List , Linux Kernel Mailing List Subject: Re: [PATCH 3/4] Pte xchg optimization.patch Message-ID: <20070412181809.GC25646@redhat.com> Mail-Followup-To: Dave Jones , Zachary Amsden , Andrew Morton , Andi Kleen , Jeremy Fitzhardinge , Rusty Russell , Chris Wright , Hugh Dickins , David Rientjes , Michel Lespinasse , Virtualization Mailing List , Linux Kernel Mailing List References: <200704120530.l3C5UweV022834@zach-dev.vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200704120530.l3C5UweV022834@zach-dev.vmware.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2007 at 10:30:58PM -0700, Zachary Amsden wrote: > In situations where page table updates need only be made locally, and there > is no cross-processor A/D bit races involved, we need not use the heavyweight > xchg instruction to atomically fetch and clear page table entries. Instead, > we can just read and clear them directly. > > This introduces a neat optimization for non-SMP kernels; drop the atomic > xchg operations from page table updates. Would it be feasible to do this using the smp_alternatives stuff? Given many distros are now shipping SMP-only kernels, it'd be nice to get that win without using having to rebuild their kernels. Dave -- http://www.codemonkey.org.uk