remarkable-linux/arch/metag
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
..
boot metag: enable building of all dtbs 2015-10-27 16:12:16 -05:00
configs metag: minimal TZ1090 (Comet) SoC infrastructure 2013-06-13 12:14:07 +01:00
include locking/core: Introduce cpu_relax_yield() 2016-11-16 10:15:09 +01:00
kernel nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
lib metag: Fix typos 2016-07-15 09:55:49 +01:00
mm metag: Drop show_mem() from mem_init() 2016-08-09 13:41:30 +01:00
oprofile metag: OProfile support 2013-03-15 13:21:05 +00:00
tbx metag: Fix misspellings in comments. 2016-04-18 12:45:54 +02:00
Kconfig lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Kconfig.soc metag: remove ARCH_WANT_OPTIONAL_GPIOLIB 2016-04-26 13:39:22 +02:00
Makefile metag: use common make variables for dtb builds 2015-10-27 16:12:15 -05:00