aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-04-05 17:23:47 +0200
committerIngo Molnar <mingo@elte.hu>2011-04-14 08:52:36 +0200
commit74f8e4b2335de45485b8d5b31a504747f13c8070 (patch)
treef8f8ba3e346239c44177d09620e65b18870d911f /kernel
parent7608dec2ce2004c234339bef8c8074e5e601d0e9 (diff)
sched: Remove rq argument to sched_class::task_waking()
In preparation of calling this without rq->lock held, remove the dependency on the rq argument. Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/20110405152729.071474242@chello.nl Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/sched_fair.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d4b815d345b..46f42cac4eb 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2531,7 +2531,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
p->state = TASK_WAKING;
if (p->sched_class->task_waking) {
- p->sched_class->task_waking(rq, p);
+ p->sched_class->task_waking(p);
en_flags |= ENQUEUE_WAKING;
}
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 96b2c95ac35..ad4c414f456 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1372,11 +1372,13 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
#ifdef CONFIG_SMP
-static void task_waking_fair(struct rq *rq, struct task_struct *p)
+static void task_waking_fair(struct task_struct *p)
{
struct sched_entity *se = &p->se;
struct cfs_rq *cfs_rq = cfs_rq_of(se);
+ lockdep_assert_held(&task_rq(p)->lock);
+
se->vruntime -= cfs_rq->min_vruntime;
}