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 5/7] fs: namespace: Use cpu_chill() instead of cpu_relax()
Date: Tue, 13 Mar 2012 22:27:03 -0400 [thread overview]
Message-ID: <20120314022945.493350229@goodmis.org> (raw)
In-Reply-To: 20120314022658.783312660@goodmis.org
[-- Attachment #1: 0005-fs-namespace-Use-cpu_chill-instead-of-cpu_relax.patch --]
[-- Type: text/plain, Size: 931 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>
---
fs/namespace.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index c563781..3270cde 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -31,6 +31,7 @@
#include <linux/idr.h>
#include <linux/fs_struct.h>
#include <linux/fsnotify.h>
+#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include "pnode.h"
@@ -346,7 +347,7 @@ int mnt_want_write(struct vfsmount *mnt)
*/
while (mnt->mnt_flags & MNT_WRITE_HOLD) {
preempt_enable();
- cpu_relax();
+ cpu_chill();
preempt_disable();
}
/*
--
1.7.8.3
next prev parent reply other threads:[~2012-03-14 2:27 UTC|newest]
Thread overview: 10+ 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 ` Steven Rostedt [this message]
2012-03-14 2:27 ` [PATCH RT 6/7] net: Use cpu_chill() instead of cpu_relax() Steven Rostedt
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 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.493350229@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).