From: "Jan Beulich" Subject: Re: credit scheduler svc->flags access race? Date: Thu, 05 Jan 2012 07:58:36 +0000 Message-ID: <4F05663C020000780006A899@nat28.tlf.novell.com> References: <1325300125668-5111504.post@n5.nabble.com> <1325730985766-5121613.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1325730985766-5121613.post@n5.nabble.com> 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: "Liu.yi" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 05.01.12 at 03:36, "Liu.yi" wrote: > Atomic operations using LOCK prefix (like set_bit and clear_bit) will block > all the physical cpus which excute memory access. ... to that same cache line. > Does this fact implies > that spin locks are more efficient when their's granularity is small? No - after all, acquiring a spin lock unavoidably implies using a LOCKed instruction. Jan