From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752862AbcB2TJy (ORCPT ); Mon, 29 Feb 2016 14:09:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53151 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbcB2TJw (ORCPT ); Mon, 29 Feb 2016 14:09:52 -0500 Date: Mon, 29 Feb 2016 20:09:50 +0100 From: Oleg Nesterov To: Alexander Gordeev Cc: linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH 1/2] sched/core: Get rid of 'cpu' argument in wq_worker_sleeping() Message-ID: <20160229190949.GA4261@redhat.com> References: <5f0a5da6830b7dd881d54f11fd5772bee1236863.1456676913.git.agordeev@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f0a5da6830b7dd881d54f11fd5772bee1236863.1456676913.git.agordeev@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.