[patch 2/8] Implement always-locked bit ops, for memory shared with an SMP hypervisor.

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

 



Christoph Lameter wrote:
> Thats a good goal but what about the rest of us who have to maintain 
> additional forms of bit operations for all architectures. How much is this 
> burden? Are locked atomic bitops really that more expensive?
>   

It needn't be all architectures yet - only architectures that want to 
compile Xen drivers are really affected.  Perhaps a better place for 
these locking primitives is in a Xen-specific driver header which 
defines appropriate primitives for the architectures required?  Last I 
remember, there were still some issues here where atomic partial word 
operations couldn't be supported on some architectures.

To answer your question, yes.  On most i386 cores, locks destroy 
performance, and even unintentional use of a single locked operation in 
a critical path, on uncontended local memory, can have several hundred 
cycles downstream penalty.  I accidentally used one once during context 
switch, and saw a 30% reduction in switch performance - on a modern 
processor.

Zach


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux