Skip to contentSkip to conversation

kill the awful task_rq_unlock_wait() hack

PATCH In review Oleg Nesterov 2 participants 2 messages Mar 19, 2010 – Apr 9, 2010 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 kill the awful task_rq_unlock_wait() hack

Now that task->signal can't go away we can revert the horrible hack added by ad474caca3e2a0550b7ce0706527ad5ab389a4d4.

And we can do more cleanups sched_stats.h/posix-cpu-timers.c later.

---

 include/linux/sched.h |    1 -
 kernel/sched.c        |    8 --------
 kernel/exit.c         |    5 -----
 3 files changed, 14 deletions(-)
include/linux/sched.h renamed from include/linux/sched.h~10_KILL_RQ_UNLOCK_WAIT +0 -1
@@ -265,7 +265,6 @@ extern void init_idle(struct task_struct
 extern void init_idle_bootup_task(struct task_struct *idle);
 
 extern int runqueue_is_locked(int cpu);
-extern void task_rq_unlock_wait(struct task_struct *p);
 
 extern cpumask_var_t nohz_cpu_mask;
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
kernel/sched.c renamed from kernel/sched.c~10_KILL_RQ_UNLOCK_WAIT +0 -8
@@ -957,14 +957,6 @@ static struct rq *task_rq_lock(struct ta
 	}
 }
 
-void task_rq_unlock_wait(struct task_struct *p)
-{
-	struct rq *rq = task_rq(p);
-
-	smp_mb(); /* spin-unlock-wait is not a full memory barrier */
-	raw_spin_unlock_wait(&rq->lock);
-}
-
 static void __task_rq_unlock(struct rq *rq)
 	__releases(rq->lock)
 {
kernel/exit.c renamed from kernel/exit.c~10_KILL_RQ_UNLOCK_WAIT +0 -5
@@ -146,11 +146,6 @@ static void __exit_signal(struct task_st
 	if (sig) {
 		flush_sigqueue(&sig->shared_pending);
 		taskstats_tgid_free(sig);
-		/*
-		 * Make sure ->signal can't go away under rq->lock,
-		 * see account_group_exec_runtime().
-		 */
-		task_rq_unlock_wait(tsk);
 		tty_kref_put(tty);
 	}
 }