2012-06-17 19:52:06 +00:00
|
|
|
From 3a79efa5b8078b8594a5d64e02eae51f5761b048 Mon Sep 17 00:00:00 2001
|
2011-11-20 00:01:55 +00:00
|
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
Date: Thu, 14 Jul 2011 09:56:44 +0200
|
2012-06-17 19:52:06 +00:00
|
|
|
Subject: [130/254] cond-resched-softirq-fix.patch
|
2011-11-20 00:01:55 +00:00
|
|
|
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
---
|
|
|
|
include/linux/sched.h | 4 ++++
|
2012-06-04 21:20:09 +00:00
|
|
|
kernel/sched/core.c | 2 ++
|
2011-11-20 00:01:55 +00:00
|
|
|
2 files changed, 6 insertions(+)
|
|
|
|
|
2012-06-17 19:52:06 +00:00
|
|
|
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
|
|
|
index d177da5..b76e0c8 100644
|
|
|
|
--- a/include/linux/sched.h
|
|
|
|
+++ b/include/linux/sched.h
|
|
|
|
@@ -2700,12 +2700,16 @@ extern int __cond_resched_lock(spinlock_t *lock);
|
2011-11-20 00:01:55 +00:00
|
|
|
__cond_resched_lock(lock); \
|
|
|
|
})
|
|
|
|
|
|
|
|
+#ifndef CONFIG_PREEMPT_RT_FULL
|
|
|
|
extern int __cond_resched_softirq(void);
|
|
|
|
|
|
|
|
#define cond_resched_softirq() ({ \
|
|
|
|
__might_sleep(__FILE__, __LINE__, SOFTIRQ_DISABLE_OFFSET); \
|
|
|
|
__cond_resched_softirq(); \
|
|
|
|
})
|
|
|
|
+#else
|
|
|
|
+# define cond_resched_softirq() cond_resched()
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Does a critical section need to be broken due to another
|
2012-06-17 19:52:06 +00:00
|
|
|
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
|
|
|
|
index 053b830..9bc29c2 100644
|
|
|
|
--- a/kernel/sched/core.c
|
|
|
|
+++ b/kernel/sched/core.c
|
|
|
|
@@ -4605,6 +4605,7 @@ int __cond_resched_lock(spinlock_t *lock)
|
2011-11-20 00:01:55 +00:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(__cond_resched_lock);
|
|
|
|
|
|
|
|
+#ifndef CONFIG_PREEMPT_RT_FULL
|
|
|
|
int __sched __cond_resched_softirq(void)
|
|
|
|
{
|
|
|
|
BUG_ON(!in_softirq());
|
2012-06-04 21:20:09 +00:00
|
|
|
@@ -4618,6 +4619,7 @@ int __sched __cond_resched_softirq(void)
|
2011-11-20 00:01:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(__cond_resched_softirq);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* yield - yield the current processor to other threads.
|