From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbeBFHnG (ORCPT ); Tue, 6 Feb 2018 02:43:06 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:45069 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbeBFHm5 (ORCPT ); Tue, 6 Feb 2018 02:42:57 -0500 X-Google-Smtp-Source: AH8x224Noplnw0lZ4Q1XNxL6IdceiOmiPxDO5USckhOeZWp2hlev+0P3n6Qlf5hKoaYa9jVAFRBNsA== Date: Tue, 6 Feb 2018 08:42:53 +0100 From: Juri Lelli To: Mathieu Poirier Cc: Peter Zijlstra , Li Zefan , Ingo Molnar , Steven Rostedt , Claudio Scordino , Daniel Bristot de Oliveira , Tommaso Cucinotta , "luca.abeni" , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/7] sched/topology: Adding function partition_sched_domains_locked() Message-ID: <20180206074253.GA19535@localhost.localdomain> References: <1517503869-3179-1-git-send-email-mathieu.poirier@linaro.org> <1517503869-3179-2-git-send-email-mathieu.poirier@linaro.org> <20180202101951.GS19535@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/18 11:11, Mathieu Poirier wrote: > On 2 February 2018 at 03:19, Juri Lelli wrote: > > Hi Mathieu, > > > > On 01/02/18 09:51, Mathieu Poirier wrote: > >> Introducing function partition_sched_domains_locked() by taking > >> the mutex locking code out of the original function. That way > >> the work done by partition_sched_domains_locked() can be reused > >> without dropping the mutex lock. > >> > >> This patch doesn't change the functionality provided by the > >> original code. > >> > >> Signed-off-by: Mathieu Poirier > >> --- > > > > [...] > > > >> +/* > >> + * Call with hotplug lock held > > > > Is this the one that we can actually check if it's locked with > > > > lockdep_assert_cpus_held() > > > > ? > > Hi Juri, > > You are correct - we could call lockdep_assert_cpus_held() but in my > opinion it would be in a separate patch and probably outside the scope > of this work. The sole purpose of this patch is to get the > locking/unlocking operations of mutex sched_domains_mutex out of > function partition_sched_domains_locked(). Fair enough. I just thought though that, since you are adding the comment above, we could as well add an explicit check for hotplug lock. Best, - Juri