[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160229190949.GA4261@redhat.com>
Date: Mon, 29 Feb 2016 20:09:50 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Alexander Gordeev <agordeev@...hat.com>
Cc: linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [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.
Powered by blists - more mailing lists