52 lines
1.4 KiB
Diff
52 lines
1.4 KiB
Diff
Subject: cond-resched-softirq-fix.patch
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Thu, 14 Jul 2011 09:56:44 +0200
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
include/linux/sched.h | 4 ++++
|
|
kernel/sched.c | 2 ++
|
|
2 files changed, 6 insertions(+)
|
|
|
|
Index: linux-3.2/include/linux/sched.h
|
|
===================================================================
|
|
--- linux-3.2.orig/include/linux/sched.h
|
|
+++ linux-3.2/include/linux/sched.h
|
|
@@ -2599,12 +2599,16 @@ extern int __cond_resched_lock(spinlock_
|
|
__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
|
|
Index: linux-3.2/kernel/sched.c
|
|
===================================================================
|
|
--- linux-3.2.orig/kernel/sched.c
|
|
+++ linux-3.2/kernel/sched.c
|
|
@@ -5813,6 +5813,7 @@ int __cond_resched_lock(spinlock_t *lock
|
|
}
|
|
EXPORT_SYMBOL(__cond_resched_lock);
|
|
|
|
+#ifndef CONFIG_PREEMPT_RT_FULL
|
|
int __sched __cond_resched_softirq(void)
|
|
{
|
|
BUG_ON(!in_softirq());
|
|
@@ -5826,6 +5827,7 @@ int __sched __cond_resched_softirq(void)
|
|
return 0;
|
|
}
|
|
EXPORT_SYMBOL(__cond_resched_softirq);
|
|
+#endif
|
|
|
|
/**
|
|
* yield - yield the current processor to other threads.
|