All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/2] sched/core: Get rid of 'cpu' argument in wq_worker_sleeping()
Date: Mon, 29 Feb 2016 20:09:50 +0100	[thread overview]
Message-ID: <20160229190949.GA4261@redhat.com> (raw)
In-Reply-To: <5f0a5da6830b7dd881d54f11fd5772bee1236863.1456676913.git.agordeev@redhat.com>

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.

  parent reply	other threads:[~2016-02-29 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28 16:40 [PATCH 0/2] sched/core: Cleanup leftovers in __schedule() Alexander Gordeev
2016-02-28 16:40 ` [PATCH 1/2] sched/core: Get rid of 'cpu' argument in wq_worker_sleeping() Alexander Gordeev
2016-02-28 17:47   ` kbuild test robot
2016-02-29 19:09   ` Oleg Nesterov [this message]
2016-02-28 16:40 ` [PATCH 2/2] sched/core: Get rid of 'cpu' variable in __schedule() Alexander Gordeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160229190949.GA4261@redhat.com \
    --to=oleg@redhat.com \
    --cc=agordeev@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.