From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261891AbVANDlz (ORCPT ); Thu, 13 Jan 2005 22:41:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261915AbVANDlv (ORCPT ); Thu, 13 Jan 2005 22:41:51 -0500 Received: from scrub.xs4all.nl ([194.109.195.176]:9403 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S261888AbVANDji (ORCPT ); Thu, 13 Jan 2005 22:39:38 -0500 Message-ID: <41E73EE4.50200@linux-m68k.org> Date: Fri, 14 Jan 2005 04:39:16 +0100 From: Roman Zippel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: en MIME-Version: 1.0 To: Christoph Lameter CC: Andrew Morton , nickpiggin@yahoo.com.au, torvalds@osdl.org, ak@muc.de, hugh@veritas.com, linux-mm@kvack.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org Subject: Re: page table lock patch V15 [0/7]: overview References: <41E4BCBE.2010001@yahoo.com.au> <20050112014235.7095dcf4.akpm@osdl.org> <20050112104326.69b99298.akpm@osdl.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, Christoph Lameter wrote: > Introduction of the cmpxchg is one atomic operations that replaces the two > spinlock ops typically necessary in an unpatched kernel. Obtaining the > spinlock requires an spinlock (which is an atomic operation) and then the > release involves a barrier. So there is a net win for all SMP cases as far > as I can see. But there might be a loss in the UP case. Spinlocks are optimized away, but your cmpxchg emulation enables/disables interrupts with every access. bye, Roman