From: Andi Kleen Subject: Re: [RFC PATCH 05/35] Add sync bitops Date: Wed, 10 May 2006 01:04:34 +0200 Message-ID: <200605100104.34751.ak@suse.de> References: <20060509084945.373541000@sous-sol.org> <20060509085149.024456000@sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: virtualization@lists.osdl.org Cc: Chris Wright , Ian Pratt , xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, Christoph Lameter List-Id: xen-devel@lists.xenproject.org On Wednesday 10 May 2006 00:56, Christoph Lameter wrote: > On Tue, 9 May 2006, Chris Wright wrote: > > > Add "always lock'd" implementations of set_bit, clear_bit and > > change_bit and the corresponding test_and_ functions. Also add > > "always lock'd" implementation of cmpxchg. These give guaranteed > > strong synchronisation and are required for non-SMP kernels running on > > an SMP hypervisor. > > Could you explain why this is done and what is exactly meant with "always > looked"? Wh the performance impact? When UP guest runs on SMP hypervisor they still need the LOCK prefix to talk to the hypervisor through shared memory in a smp safe way. Normally UP kernels don't use any LOCK prefixes. I suggested to refactor the bitops this way earlier for this. -Andi