linux/arch/x86/um/asm
Christian Borntraeger 79ab11cdb9 locking/core: Introduce cpu_relax_yield()
For spinning loops people do often use barrier() or cpu_relax().
For most architectures cpu_relax and barrier are the same, but on
some architectures cpu_relax can add some latency.
For example on power,sparc64 and arc, cpu_relax can shift the CPU
towards other hardware threads in an SMT environment.
On s390 cpu_relax does even more, it uses an hypercall to the
hypervisor to give up the timeslice.
In contrast to the SMT yielding this can result in larger latencies.
In some places this latency is unwanted, so another variant
"cpu_relax_lowlatency" was introduced. Before this is used in more
and more places, lets revert the logic and provide a cpu_relax_yield
that can be called in places where yielding is more important than
latency. By default this is the same as cpu_relax on all architectures.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Noam Camus <noamc@ezchip.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: virtualization@lists.linux-foundation.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1477386195-32736-2-git-send-email-borntraeger@de.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-11-16 10:15:09 +01:00
..
apic.h um: asm/apic.h is there only to shadow the x86 one... 2011-11-02 14:15:22 +01:00
arch_hweight.h
archparam.h
barrier.h x86/cpufeature: Carve out X86_FEATURE_* 2016-01-30 11:22:17 +01:00
checksum_32.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
checksum_64.h um/x86: merge 32 and 64bit variants of checksum.h 2012-10-09 22:28:16 +02:00
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
desc.h
elf.h um: Rework uaccess code 2015-05-31 17:32:36 +02:00
irq_vectors.h um: irq_vectors.h just shadows x86 one 2011-11-02 14:15:24 +01:00
mm_context.h um: take ldt.h to arch/x86/um/asm/mm_context.h 2011-11-02 14:15:21 +01:00
module.h
processor_32.h um: Rewrite show_stack() 2013-11-17 11:27:25 +01:00
processor_64.h um: Rewrite show_stack() 2013-11-17 11:27:25 +01:00
processor.h locking/core: Introduce cpu_relax_yield() 2016-11-16 10:15:09 +01:00
ptrace.h ARCH: AUDIT: audit_syscall_entry() should not require the arch 2014-09-23 16:21:26 -04:00
required-features.h um: required-features.h is there only to shadow x86 one... 2011-11-02 14:15:23 +01:00
segment.h um: Rework uaccess code 2015-05-31 17:32:36 +02:00
syscall.h um: Add full asm/syscall.h support 2016-01-10 21:49:49 +01:00
vm-flags.h