summarylogtreecommitdiffstats
path: root/bfs-009-add-preempt_offset-argument-to-should_resched.patch
diff options
context:
space:
mode:
Diffstat (limited to 'bfs-009-add-preempt_offset-argument-to-should_resched.patch')
-rw-r--r--bfs-009-add-preempt_offset-argument-to-should_resched.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/bfs-009-add-preempt_offset-argument-to-should_resched.patch b/bfs-009-add-preempt_offset-argument-to-should_resched.patch
new file mode 100644
index 000000000000..cce5cf0a31c1
--- /dev/null
+++ b/bfs-009-add-preempt_offset-argument-to-should_resched.patch
@@ -0,0 +1,37 @@
+
+Upstream commit fe32d3cd5e8eb0f82e459763374aa80797023403 called:
+"sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()"
+adds an argument 'preempt_offset' to should_resched().
+This patch adds it to BFS.
+
+Signed-off-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com>
+
+--- linux-4.1.12/kernel/sched/bfs.c 2015-10-23 20:46:12.479367398 +0200
++++ linux-4.1.12-bfs/kernel/sched/bfs.c 2015-10-23 20:44:39.515377240 +0200
+@@ -4663,7 +4663,7 @@
+
+ int __sched _cond_resched(void)
+ {
+- if (should_resched()) {
++ if (should_resched(0)) {
+ preempt_schedule_common();
+ return 1;
+ }
+@@ -4681,7 +4681,7 @@
+ */
+ int __cond_resched_lock(spinlock_t *lock)
+ {
+- int resched = should_resched();
++ int resched = should_resched(PREEMPT_LOCK_OFFSET);
+ int ret = 0;
+
+ lockdep_assert_held(lock);
+@@ -4703,7 +4703,7 @@
+ {
+ BUG_ON(!in_softirq());
+
+- if (should_resched()) {
++ if (should_resched(SOFTIRQ_DISABLE_OFFSET)) {
+ local_bh_enable();
+ preempt_schedule_common();
+ local_bh_disable();