Skip to contentSkip to conversation

cleanup legacy sched hacks

PATCH Applied Jan Kiszka 2 participants 2 messages May 13, 2007

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 cleanup legacy sched hacks

I don't think we need those two legacy hacks anymore as we killed preempt_disable/enable calls over non-root domain. I converted them into context checks and got no warnings so far.

---
 kernel/sched.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
kernel/sched.c +4 -9
Index: linux-2.6.20/kernel/sched.c
===================================================================
@@ -3422,10 +3422,8 @@ asmlinkage void __sched schedule(void)
 	long *switch_count;
 	struct rq *rq;
 
-#ifdef CONFIG_IPIPE
-	if (unlikely(!ipipe_root_domain_p))
-		return;
-#endif /* CONFIG_IPIPE */
+	ipipe_check_context(ipipe_root_domain);
+
 	/*
 	 * Test if we are atomic.  Since do_exit() needs to call into
 	 * schedule() atomically, we ignore that path for now.
@@ -3600,11 +3598,8 @@ asmlinkage void __sched preempt_schedule
 	struct task_struct *task = current;
 	int saved_lock_depth;
 #endif
-#ifdef CONFIG_IPIPE
-	/* Do not reschedule over non-Linux domains. */
-	if (unlikely(!ipipe_root_domain_p))
-		return;
-#endif /* CONFIG_IPIPE */
+	ipipe_check_context(ipipe_root_domain);
+
 	/*
 	 * If there is a non-zero preempt_count or interrupts are disabled,
 	 * we do not want to preempt the current task.  Just return..
#1 lore raw
Quoted 3 lines · Jan Kiszka

I don't think we need those two legacy hacks anymore as we killed preempt_disable/enable calls over non-root domain. I converted them into context checks and got no warnings so far.

Merged, thanks.

Signature · 1 line
Philippe.