From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932579AbaH0Hic (ORCPT ); Wed, 27 Aug 2014 03:38:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58037 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932079AbaH0Hib (ORCPT ); Wed, 27 Aug 2014 03:38:31 -0400 Message-ID: <53FD8AF1.8010608@suse.com> Date: Wed, 27 Aug 2014 09:38:25 +0200 From: =?ISO-8859-1?Q?J=FCrgen_Gro=DF?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Dexuan Cui , KY Srinivasan , "chrisw@sous-sol.org" , "jeremy@goop.org" , Jan Beulich CC: "linux-kernel@vger.kernel.org" Subject: Re: sync_set_bit() vs set_bit() -- what's the difference? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/27/2014 09:30 AM, Dexuan Cui wrote: > I'm curious about the difference. :-) > > sync_set_bit() is only used in drivers/hv/ and drivers/xen/ while set_bit() is used in all other places. What makes hv/xen special? In set_bit() the "lock" prefix will be dropped if only one processor is present. sync_set_bit() is always attributed with "lock". xen and hv might require "lock" semantics even if the current OS is running on only one processor, as syncing with other processors running other OS's might be necessary. Juergen