lkml.org 
[lkml]   [2016]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] sched/core: Get rid of 'cpu' argument in wq_worker_sleeping()
On 02/28, Alexander Gordeev wrote:
>
> -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 +886,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 != smp_processor_id()))
> return NULL;

I think both changes are fine, but perhaps it would be better to keep
raw_smp_processor_id(). Unless you did this on purpose, but then it makes
sense to add a note into the changelog.

Oleg.

\
 
 \ /
  Last update: 2016-02-29 21:01    [W:0.045 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site