Re: [kvm-unit-tests PATCH] x86: Make set/clear_bit() atomic

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

 



On Fri, Feb 14, 2025, Nicolas Saenz Julienne wrote:
> x86 is the only architecture that defines set/clear_bit() as non-atomic.
> This makes it incompatible with arch-agnostic code that might implicitly
> require atomicity. And it was observed to corrupt the 'online_cpus'
> bitmap, as non BSP CPUs perform RmWs on the bitmap concurrently during
> bring up. See:
> 
> ap_start64()
>   save_id()
>     set_bit(apic_id(), online_cpus)
> 
> Address this by making set/clear_bit() atomic.

OMG, this is arguaby worse than the per-CPU stack/data mess.  *sigh*

I'll grab this, I'm putting together a pull request for a few things.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux