diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2016-03-02 12:53:31 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-03-02 10:28:47 -0500 |
commit | 9b7f6597f013d449d6700d11820faf91ee0ec985 (patch) | |
tree | 0d5ec5620940bfcdfecade4ff0c49944a1f7ff5f /kernel/workqueue.c | |
parent | 23217b443b4b0439c8b55d3be0482d3cd7fbc5ac (diff) | |
download | lwn-9b7f6597f013d449d6700d11820faf91ee0ec985.tar.gz lwn-9b7f6597f013d449d6700d11820faf91ee0ec985.zip |
sched/core: Get rid of 'cpu' argument in wq_worker_sleeping()
Given that wq_worker_sleeping() could only be called for a
CPU it is running on, we do not need passing a CPU ID as an
argument.
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 3a1c99b0c1b3..16f4986205e9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -858,7 +858,6 @@ void wq_worker_waking_up(struct task_struct *task, int cpu) /** * wq_worker_sleeping - a worker is going to sleep * @task: task going to sleep - * @cpu: CPU in question, must be the current CPU number * * This function is called during schedule() when a busy worker is * going to sleep. Worker on the same cpu can be woken up by @@ -870,7 +869,7 @@ void wq_worker_waking_up(struct task_struct *task, int cpu) * Return: * Worker task on @cpu to wake up, %NULL if none. */ -struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu) +struct task_struct *wq_worker_sleeping(struct task_struct *task) { struct worker *worker = kthread_data(task), *to_wakeup = NULL; struct worker_pool *pool; @@ -886,7 +885,7 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu) pool = worker->pool; /* this can only happen on the local cpu */ - if (WARN_ON_ONCE(cpu != raw_smp_processor_id() || pool->cpu != cpu)) + if (WARN_ON_ONCE(pool->cpu != raw_smp_processor_id())) return NULL; /* |