* [PATCH -tip] Remove unused argument dest_cpu to migrate_task()
@ 2010-11-26 7:07 Nikanth Karthikesan
2010-11-26 15:03 ` [tip:sched/core] sched: " tip-bot for Nikanth Karthikesan
0 siblings, 1 reply; 2+ messages in thread
From: Nikanth Karthikesan @ 2010-11-26 7:07 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel
Remove unused argument, 'dest_cpu' of migrate_task(), and pass runqueue,
as it is always known at the call site.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index 717bf7d..b6999bc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2060,10 +2060,8 @@ static int migration_cpu_stop(void *data);
* The task's runqueue lock must be held.
* Returns true if you have to wait for migration thread.
*/
-static bool migrate_task(struct task_struct *p, int dest_cpu)
+static bool migrate_task(struct task_struct *p, struct rq *rq)
{
- struct rq *rq = task_rq(p);
-
/*
* If the task is not on a runqueue (and not running), then
* the next wake-up will properly place the task.
@@ -3224,7 +3222,7 @@ void sched_exec(void)
* select_task_rq() can race against ->cpus_allowed
*/
if (cpumask_test_cpu(dest_cpu, &p->cpus_allowed) &&
- likely(cpu_active(dest_cpu)) && migrate_task(p, dest_cpu)) {
+ likely(cpu_active(dest_cpu)) && migrate_task(p, rq)) {
struct migration_arg arg = { p, dest_cpu };
task_rq_unlock(rq, &flags);
@@ -5505,7 +5503,7 @@ again:
goto out;
dest_cpu = cpumask_any_and(cpu_active_mask, new_mask);
- if (migrate_task(p, dest_cpu)) {
+ if (migrate_task(p, rq)) {
struct migration_arg arg = { p, dest_cpu };
/* Need help from migration thread: drop lock and wait. */
task_rq_unlock(rq, &flags);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:sched/core] sched: Remove unused argument dest_cpu to migrate_task()
2010-11-26 7:07 [PATCH -tip] Remove unused argument dest_cpu to migrate_task() Nikanth Karthikesan
@ 2010-11-26 15:03 ` tip-bot for Nikanth Karthikesan
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Nikanth Karthikesan @ 2010-11-26 15:03 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, a.p.zijlstra, knikanth, tglx, mingo
Commit-ID: b7a2b39d9b7703ccf068f549c8dc3465fc41d015
Gitweb: http://git.kernel.org/tip/b7a2b39d9b7703ccf068f549c8dc3465fc41d015
Author: Nikanth Karthikesan <knikanth@suse.de>
AuthorDate: Fri, 26 Nov 2010 12:37:09 +0530
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 26 Nov 2010 15:05:36 +0100
sched: Remove unused argument dest_cpu to migrate_task()
Remove unused argument, 'dest_cpu' of migrate_task(), and pass runqueue,
as it is always known at the call site.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <201011261237.09187.knikanth@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index abe7aec..35a6373 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2061,10 +2061,8 @@ static int migration_cpu_stop(void *data);
* The task's runqueue lock must be held.
* Returns true if you have to wait for migration thread.
*/
-static bool migrate_task(struct task_struct *p, int dest_cpu)
+static bool migrate_task(struct task_struct *p, struct rq *rq)
{
- struct rq *rq = task_rq(p);
-
/*
* If the task is not on a runqueue (and not running), then
* the next wake-up will properly place the task.
@@ -3224,7 +3222,7 @@ void sched_exec(void)
* select_task_rq() can race against ->cpus_allowed
*/
if (cpumask_test_cpu(dest_cpu, &p->cpus_allowed) &&
- likely(cpu_active(dest_cpu)) && migrate_task(p, dest_cpu)) {
+ likely(cpu_active(dest_cpu)) && migrate_task(p, rq)) {
struct migration_arg arg = { p, dest_cpu };
task_rq_unlock(rq, &flags);
@@ -5504,7 +5502,7 @@ again:
goto out;
dest_cpu = cpumask_any_and(cpu_active_mask, new_mask);
- if (migrate_task(p, dest_cpu)) {
+ if (migrate_task(p, rq)) {
struct migration_arg arg = { p, dest_cpu };
/* Need help from migration thread: drop lock and wait. */
task_rq_unlock(rq, &flags);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-26 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 7:07 [PATCH -tip] Remove unused argument dest_cpu to migrate_task() Nikanth Karthikesan
2010-11-26 15:03 ` [tip:sched/core] sched: " tip-bot for Nikanth Karthikesan
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.