Re: ARMv5 and atomic operations

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

 



On Sun, 22 Apr 2012, Chris Tyler wrote:

> 6. There is the kernel's "user space atomic helper" (kuser_cmpxchg64) at
> 0xffff0f60, see Documentation/arm/kernel_user_helpers.txt. The kernel
> puts an instruction sequence here tuned for the current arch that can be
> called by userland to provide an atomic compare/exchange -- if it can be
> done natively, the instruction sequence does that, otherwise it does a
> syscall (with IRQ protection etc).

No, there is no syscall involved here.  Doing so would have killed 
performances for any trivial amount of atomic operations.

The way this works is to perform the operation, using non-atomic 
instructions as they're not available on ARMv5, and if an interrupt or a 
page fault occurs inside the critical region that the kernel controls, 
then the operation is rewinded and resumed the next time the user space 
task gets to run.  This way you get the same performance as with native 
atomic instructions on later processors, except for the added branch 
instruction.


Nicolas
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux