linux/debian/patches/features/all/rt/0150-cond-resched-softirq-f...

56 lines
1.5 KiB
Diff

From de0530ce61f74137dfedef057fab9fcd32b662cd Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 14 Jul 2011 09:56:44 +0200
Subject: [PATCH 150/278] cond-resched-softirq-fix.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/sched.h | 4 ++++
kernel/sched.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 57d5b54..08f5c5b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2614,12 +2614,16 @@ extern int __cond_resched_lock(spinlock_t *lock);
__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
diff --git a/kernel/sched.c b/kernel/sched.c
index 6abb0b7..45f1d1f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6012,6 +6012,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());
@@ -6025,6 +6026,7 @@ int __sched __cond_resched_softirq(void)
return 0;
}
EXPORT_SYMBOL(__cond_resched_softirq);
+#endif
/**
* yield - yield the current processor to other threads.
--
1.7.10