From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
stable-rt@vger.kernel.org
Subject: [PATCH RT 6/7] net: Use cpu_chill() instead of cpu_relax()
Date: Tue, 13 Mar 2012 22:27:04 -0400 [thread overview]
Message-ID: <20120314022945.771027206@goodmis.org> (raw)
In-Reply-To: 20120314022658.783312660@goodmis.org
[-- Attachment #1: 0006-net-Use-cpu_chill-instead-of-cpu_relax.patch --]
[-- Type: text/plain, Size: 943 bytes --]
From: Thomas Gleixner <tglx@linutronix.de>
Retry loops on RT might loop forever when the modifying side was
preempted. Use cpu_chill() instead of cpu_relax() to let the system
make progress.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
net/rds/ib_rdma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index 819c35a..256ad87 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -33,6 +33,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/rculist.h>
+#include <linux/delay.h>
#include "rds.h"
#include "ib.h"
@@ -294,7 +295,7 @@ static inline void wait_clean_list_grace(void)
for_each_online_cpu(cpu) {
flag = &per_cpu(clean_list_grace, cpu);
while (test_bit(CLEAN_LIST_BUSY_BIT, flag))
- cpu_relax();
+ cpu_chill();
}
}
--
1.7.8.3
next prev parent reply other threads:[~2012-03-14 2:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 2:26 [PATCH RT 0/7] [ANNOUNCE] 3.0.23-rt40-rc1 Steven Rostedt
2012-03-14 2:26 ` [PATCH RT 1/7] Revert "ACPI: Convert embedded controller lock to raw spinlock" Steven Rostedt
2012-03-14 2:27 ` [PATCH RT 2/7] softirq: Check preemption after reenabling interrupts Steven Rostedt
2012-03-14 2:27 ` [PATCH RT 3/7] rt: Introduce cpu_chill() Steven Rostedt
2012-03-14 2:27 ` [PATCH RT 4/7] fs: dcache: Use cpu_chill() in trylock loops Steven Rostedt
2012-03-14 2:27 ` [PATCH RT 5/7] fs: namespace: Use cpu_chill() instead of cpu_relax() Steven Rostedt
2012-03-14 2:27 ` Steven Rostedt [this message]
2012-03-14 2:27 ` [PATCH RT 7/7] Linux 3.0.23-rt40-rc1 Steven Rostedt
2012-03-14 12:52 ` [PATCH RT 0/7] [ANNOUNCE] 3.0.23-rt40-rc1 Karsten Wiese
2012-03-14 12:52 ` Karsten Wiese
2012-03-14 15:14 ` Steven Rostedt
2012-03-14 15:14 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120314022945.771027206@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.