[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] mixture of atomic and non-atomic operations on CPU masks



>>> On 10.09.14 at 12:03, <Ian.Campbell@xxxxxxxxxxxxx> wrote:
> On Wed, 2014-09-10 at 07:46 +0100, Jan Beulich wrote:
>> the inconsistency here has been puzzling me for a while, and I think
>> we ought to do something about it (perhaps not for 4.5 anymore,
>> but then right after): cpumask_(test_and_)?(set|clear)_cpu all use
>> the respective atomic bitops, in contrast to all other operations on
>> cpumask_t.
> 
> Did that just happen by accident because the bitops are sync by default
> with a non-sync variant?

I'm afraid not - in some cases the 1-bit manipulation functions are
indeed expected to be usable in racy situations. I.e. I think Linux
(from where we got all this) has this deliberately this way, not
paying attention to the inconsistency and the often pointless
extra overhead.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.