[PATCH RT 09/10] fs/dcache: incremental fixup of the retry routine

Steven Rostedt
2016-09-22T23:17:55Z

[-- Attachment #1: 0009-fs-dcache-incremental-fixup-of-the-retry-routine.patch --]
[-- Type: text/plain, Size: 1218 bytes --]

3.18.42-rt45-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

It has been pointed out by tglx that on UP the non-RT task could spin
its entire time slice because the lock owner is preempted. This won't
happen on !RT. So we back to "chill" if we can't cond_resched() did not
work.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
fs/dcache.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 44a3419c7125..986acc945c06 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -39,8 +39,6 @@
#include <linux/prefetch.h>
#include <linux/ratelimit.h>
#include <linux/list_lru.h>
-#include <linux/sched/rt.h>
-#include <linux/sched/deadline.h>
#include "internal.h"
#include "mount.h"

@@ -769,10 +767,11 @@ kill_it:
if (parent == dentry) {
/* the task with the highest priority won't schedule */
r = cond_resched();
- if (!r && (rt_task(current) || dl_task(current)))
+ if (!r)
cpu_chill();
- } else
+ } else {
dentry = parent;
+ }
goto repeat;
}
}
--
2.8.1