All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] kill the awful task_rq_unlock_wait() hack
Date: Fri, 19 Mar 2010 19:40:23 +0100	[thread overview]
Message-ID: <20100319184023.GA522@redhat.com> (raw)

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.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---

 include/linux/sched.h |    1 -
 kernel/sched.c        |    8 --------
 kernel/exit.c         |    5 -----
 3 files changed, 14 deletions(-)

--- 34-rc1/include/linux/sched.h~10_KILL_RQ_UNLOCK_WAIT	2010-03-19 17:32:44.000000000 +0100
+++ 34-rc1/include/linux/sched.h	2010-03-19 19:17:17.000000000 +0100
@@ -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)
--- 34-rc1/kernel/sched.c~10_KILL_RQ_UNLOCK_WAIT	2010-03-15 09:42:08.000000000 +0100
+++ 34-rc1/kernel/sched.c	2010-03-19 19:18:22.000000000 +0100
@@ -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)
 {
--- 34-rc1/kernel/exit.c~10_KILL_RQ_UNLOCK_WAIT	2010-03-19 18:55:02.000000000 +0100
+++ 34-rc1/kernel/exit.c	2010-03-19 19:17:53.000000000 +0100
@@ -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);
 	}
 }


             reply	other threads:[~2010-03-19 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 18:40 Oleg Nesterov [this message]
2010-04-09 19:38 ` [PATCH 3/3] kill the awful task_rq_unlock_wait() hack Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100319184023.GA522@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.