Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932067AbWEIXEj (ORCPT ); Tue, 9 May 2006 19:04:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932071AbWEIXEj (ORCPT ); Tue, 9 May 2006 19:04:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:11467 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S932067AbWEIXEi (ORCPT ); Tue, 9 May 2006 19:04:38 -0400 From: Andi Kleen To: virtualization@lists.osdl.org Subject: Re: [RFC PATCH 05/35] Add sync bitops Date: Wed, 10 May 2006 01:04:34 +0200 User-Agent: KMail/1.9.1 Cc: Christoph Lameter , Chris Wright , xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, Ian Pratt References: <20060509084945.373541000@sous-sol.org> <20060509085149.024456000@sous-sol.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605100104.34751.ak@suse.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1024 Lines: 26 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/