Skip to content

Commit

Permalink
sched: Move wq_worker_waking to the correct site
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 14, 2011
1 parent c6eb3dd commit c2f7115
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,10 @@ static inline void ttwu_activate(struct task_struct *p, struct rq *rq,
schedstat_inc(p, se.statistics.nr_wakeups_remote);

activate_task(rq, p, en_flags);

/* if a worker is waking up, notify workqueue */
if (p->flags & PF_WQ_WORKER)
wq_worker_waking_up(p, cpu_of(rq));
}

static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq,
Expand All @@ -2445,9 +2449,6 @@ static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq,
rq->idle_stamp = 0;
}
#endif
/* if a worker is waking up, notify workqueue */
if ((p->flags & PF_WQ_WORKER) && success)
wq_worker_waking_up(p, cpu_of(rq));
}

/**
Expand Down

0 comments on commit c2f7115

Please sign in to comment.