Displaying 20 results from an estimated 718 matches for "cpu_relax".
2016 Oct 25
7
[GIT PULL v2 0/5] cpu_relax: drop lowlatency, introduce yield
...d1c0eb51ef87ff2eab5c994949e69:
Linux 4.9-rc2 (2016-10-23 17:10:14 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git tags/cpurelax
for you to fetch changes up to dcc37f9044436438360402714b7544a8e8779b07:
processor.h: remove cpu_relax_lowlatency (2016-10-25 09:49:57 +0200)
----------------------------------------------------------------
cpu_relax: drop lowlatency, introduce 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...
2016 Oct 25
7
[GIT PULL v2 0/5] cpu_relax: drop lowlatency, introduce yield
...d1c0eb51ef87ff2eab5c994949e69:
Linux 4.9-rc2 (2016-10-23 17:10:14 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git tags/cpurelax
for you to fetch changes up to dcc37f9044436438360402714b7544a8e8779b07:
processor.h: remove cpu_relax_lowlatency (2016-10-25 09:49:57 +0200)
----------------------------------------------------------------
cpu_relax: drop lowlatency, introduce 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...
2016 Oct 25
0
[GIT PULL v2 1/5] processor.h: 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 t...
2016 Oct 25
0
[GIT PULL v2 5/5] processor.h: remove cpu_relax_lowlatency
As there are no users left, we can remove cpu_relax_lowlatency.
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
arch/alpha/include/asm/processor.h | 1 -
arch/arc/include/asm/processor.h | 2 --
arch/arm/include/asm/processor.h | 1 -
arch/arm64/include/asm/processor.h | 1 -
arch/avr32/include/as...
2016 Nov 16
2
[PATCH 1/1] sched: provide common cpu_relax_yield definition
No need to duplicate the same define everywhere. Since
the only user is stop-machine and the only provider is
s390, we can use a default implementation of cpu_relax_yield
in sched.h.
Suggested-by: Russell King <linux at armlinux.org.uk>
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
arch/alpha/include/asm/processor.h | 1 -
arch/arc/include/asm/processor.h | 3 ---
arch/arm/include/asm/processor.h | 2 --...
2016 Nov 16
2
[PATCH 1/1] sched: provide common cpu_relax_yield definition
No need to duplicate the same define everywhere. Since
the only user is stop-machine and the only provider is
s390, we can use a default implementation of cpu_relax_yield
in sched.h.
Suggested-by: Russell King <linux at armlinux.org.uk>
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
arch/alpha/include/asm/processor.h | 1 -
arch/arc/include/asm/processor.h | 3 ---
arch/arm/include/asm/processor.h | 2 --...
2016 Oct 21
1
[PATCH/RFC 0/5] cpu_relax: introduce yield, remove lowlatency
On 10/21/2016 04:57 PM, David Miller wrote:
> From: Christian Borntraeger <borntraeger at de.ibm.com>
> Date: Fri, 21 Oct 2016 13:58:53 +0200
>
>> For spinning loops people did 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 s390
>> cpu_relax gives up the time slice to the hypervisor. On power cpu_relax
>> tries to give some of the CPU to the neighbor threa...
2016 Oct 21
1
[PATCH/RFC 0/5] cpu_relax: introduce yield, remove lowlatency
On 10/21/2016 04:57 PM, David Miller wrote:
> From: Christian Borntraeger <borntraeger at de.ibm.com>
> Date: Fri, 21 Oct 2016 13:58:53 +0200
>
>> For spinning loops people did 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 s390
>> cpu_relax gives up the time slice to the hypervisor. On power cpu_relax
>> tries to give some of the CPU to the neighbor threa...
2016 Nov 15
2
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
> 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,...
2016 Nov 15
2
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
> 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,...
2016 Oct 25
0
[GIT PULL v2 4/5] processor.h: Remove cpu_relax_lowlatency users
With the s390 special case of a yielding cpu_relax implementation gone,
we can now remove all users of cpu_relax_lowlatency and replace them
with cpu_relax.
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
drivers/gpu/drm/i915/i915_gem_request.c | 2 +-
drivers/vhost/net.c | 4 ++--
kernel/locking/mcs...
2016 Nov 15
1
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
On Tue, Nov 15, 2016 at 02:19:53PM +0100, Christian Borntraeger wrote:
> On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote:
> > On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
> >> 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.
>...
2016 Nov 15
1
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
On Tue, Nov 15, 2016 at 02:19:53PM +0100, Christian Borntraeger wrote:
> On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote:
> > On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
> >> 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.
>...
2016 Oct 25
0
[GIT PULL v2 3/5] s390: make cpu_relax a barrier again
stop_machine seemed to be the only important place for yielding during
cpu_relax. This was fixed by using cpu_relax_yield. Therefore, we can
now redefine cpu_relax to be a barrier instead on s390, making s390
identical to all other architectures.
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
arch/s390/include/asm/processor.h | 2 +-
1 file changed...
2007 Dec 06
0
[PATCH] linux/x86: Use cpu_relax() rather than barrier() in smp_call_function()
...============
--- head-2007-11-30.orig/arch/i386/kernel/smp-xen.c 2007-12-06 14:56:17.000000000 +0100
+++ head-2007-11-30/arch/i386/kernel/smp-xen.c 2007-12-04 09:36:41.000000000 +0100
@@ -525,11 +525,11 @@
/* Wait for response */
while (atomic_read(&data.started) != cpus)
- barrier();
+ cpu_relax();
if (wait)
while (atomic_read(&data.finished) != cpus)
- barrier();
+ cpu_relax();
spin_unlock(&call_lock);
return 0;
Index: head-2007-11-30/arch/x86_64/kernel/smp-xen.c
===================================================================
--- head-2007-11-30.orig/arch/x86_...
2014 May 08
2
[PATCH v10 06/19] qspinlock: prolong the stay in the pending bit path
...AL|_Q_PENDING_VAL)) {
> + /*
> + * If both the lock and pending bits are set, we wait
> + * a while to see if that either bit will be cleared.
> + * If that is no change, we return and be queued.
> + */
> + if (!retry)
> + return 0;
> + retry--;
> + cpu_relax();
> + cpu_relax();
> + *pval = val = atomic_read(&lock->val);
> + continue;
> + } else if (val == _Q_PENDING_VAL) {
> + /*
> + * Pending bit is set, but not the lock bit.
> + * Assuming that the pending bit holder is going to
> + * set the lock bit...
2014 May 08
2
[PATCH v10 06/19] qspinlock: prolong the stay in the pending bit path
...AL|_Q_PENDING_VAL)) {
> + /*
> + * If both the lock and pending bits are set, we wait
> + * a while to see if that either bit will be cleared.
> + * If that is no change, we return and be queued.
> + */
> + if (!retry)
> + return 0;
> + retry--;
> + cpu_relax();
> + cpu_relax();
> + *pval = val = atomic_read(&lock->val);
> + continue;
> + } else if (val == _Q_PENDING_VAL) {
> + /*
> + * Pending bit is set, but not the lock bit.
> + * Assuming that the pending bit holder is going to
> + * set the lock bit...
2016 Nov 15
0
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote:
> On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
>> 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_re...
2016 Nov 15
0
[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield
...rote:
> On Tue, Nov 15, 2016 at 02:19:53PM +0100, Christian Borntraeger wrote:
>> On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote:
>>> On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote:
>>>> 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 envi...
2008 May 08
2
[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly
...ometimes the hang resolved
itself after some minutes)
Changing stop_machine to yield the cpu to the hypervisor when yielding inside
the guest fixed the problem for me. While I am not completely happy with this
patch, I think it causes no harm and it really improves the situation for me.
I used cpu_relax for yielding to the hypervisor, does that work on all
architectures?
p.s.: If you want to reproduce the problem, cpu hotplug and kprobes use
stop_machine_run and both triggered the problem after some retries.
Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
CC: Ingo Moln...