WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [RFC PATCH 02/33] Add sync bitops


On 18 Jul 2006, at 10:56, Arjan van de Ven wrote:

plain text document attachment (synch-ops)
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.

Hi,

this sounds really like the wrong approach; you know you're compiling
for xen, so why not just make set_bit() and the others use the lock'd
instructions at compile time?

Then all users of bitops would unnecessarily pay the price when running in a single-CPU guest. Only a few of our bitops callers absolutely require the lock prefix in all cases.

  -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>