diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-04-13 07:28:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:52:33 -0400 |
commit | c2f7115e2e52a6c187b8c1f54f0e4970bb677be0 (patch) | |
tree | 1f975d91404c79a4962bd70cc70a005f0cba9a4a /kernel/sched.c | |
parent | c6eb3dda25892f1f974f5420f63e6721aab02f6f (diff) |
sched: Move wq_worker_waking to the correct site
wq_worker_waking_up() needs to match wq_worker_sleeping(), since the
latter is only called on deactivate, move the former near activate.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/n/top-t3m7n70n9frmv4pv2n5fwmov@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 55cc50323ce1..81ab58efd788 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2421,6 +2421,10 @@ static inline void ttwu_activate(struct task_struct *p, struct rq *rq, | |||
2421 | schedstat_inc(p, se.statistics.nr_wakeups_remote); | 2421 | schedstat_inc(p, se.statistics.nr_wakeups_remote); |
2422 | 2422 | ||
2423 | activate_task(rq, p, en_flags); | 2423 | activate_task(rq, p, en_flags); |
2424 | |||
2425 | /* if a worker is waking up, notify workqueue */ | ||
2426 | if (p->flags & PF_WQ_WORKER) | ||
2427 | wq_worker_waking_up(p, cpu_of(rq)); | ||
2424 | } | 2428 | } |
2425 | 2429 | ||
2426 | static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq, | 2430 | static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq, |
@@ -2445,9 +2449,6 @@ static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq, | |||
2445 | rq->idle_stamp = 0; | 2449 | rq->idle_stamp = 0; |
2446 | } | 2450 | } |
2447 | #endif | 2451 | #endif |
2448 | /* if a worker is waking up, notify workqueue */ | ||
2449 | if ((p->flags & PF_WQ_WORKER) && success) | ||
2450 | wq_worker_waking_up(p, cpu_of(rq)); | ||
2451 | } | 2452 | } |
2452 | 2453 | ||
2453 | /** | 2454 | /** |