Received: by 10.223.176.5 with SMTP id f5csp361220wra; Mon, 5 Feb 2018 23:43:54 -0800 (PST) X-Google-Smtp-Source: AH8x225AgHhIezXVv3k7mMfzRBlVHzLwJ7LLswzC4xHP5Ueya5UA493TPZynpRj5u2ljR+Yz+7uM X-Received: by 2002:a17:902:51e9:: with SMTP id y96-v6mr1536530plh.344.1517903033927; Mon, 05 Feb 2018 23:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517903033; cv=none; d=google.com; s=arc-20160816; b=ONOLhivwDhcd7bs3G8b7CUXQc2Ay9LPmspUjME+36+rF15RntwUDG3rPT/DU4U99qm pN3k6X1Lt7vboHI8BCdgAGxCjYBb1tTFd2KuZG0v6TU5KI0AI9tXlJt/+q65hoIbebZN eiDTHoBF+Y6rGk2TmOMxtMIrrwg0bhI3TLE9+fhO5W0866HyqQYvrBnX1U7l6owryQ9r thmwxdcCXH/eOgq0jPvLtvw4pAXdEQWjy1eKexX74/mhxdkLGhlpMr9fl+k3j3pqCscP fr6hv1W0CDO2zVUt0JzMQytFTk31uP+Yql5HFsJnUDa4guTgtJxGFPUETtgPEsf6Ll97 PyBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=nDpwAqKXysmeKghXc/pHfvL6HfryqKPhaAvDsaJZ9F4=; b=eyJuGF78qVNLSORBYPIO3KqowI4xvReMgArc5TQchDN4oagnJBMPP7d96V9UDFPDPo srmwhg48cMjRFNtow27L/yMte2RPkYxCskILeU6bXoKbrAUG9FJ+kmEfjEDotiU5SgRf 0rbzColFgPwKWqhgJCk6v05oPV9YhwFrGzOUblTFgH8JON2LgCJakjyV7HTB6Ghn7wM/ sZKijtSJ/R+mrUQxfdDctQdA82quyFZmTGRqtJ/z9X36LsST/zO056555NrFd+ZjBYtx 5OMP5fnLQY4hm/NaKux4UtjvdoLuaYLRLMAs970J3kORF9CdryV/Uwu/+3kEEJ91ieLM 6m+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33-v6si660508pld.761.2018.02.05.23.43.39; Mon, 05 Feb 2018 23:43:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbeBFHnE (ORCPT + 99 others); Tue, 6 Feb 2018 02:43:04 -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 Received: by mail-wr0-f196.google.com with SMTP id h9so859995wre.12 for ; Mon, 05 Feb 2018 23:42:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nDpwAqKXysmeKghXc/pHfvL6HfryqKPhaAvDsaJZ9F4=; b=NVDqzlmMobq3DCIK5ChdakPokyDE2Oc+CA2G8TLjcmuB0ZzkgSr+zjZajzTjZQBw9H rRWYnYevsNQpZTKIHGeYYLwWEFo3qkkGU5gPs3YXm0z0xIahvNFcgw+jmzbO5qLTvnZo 7L2vAjUgaT8OAiU2QU0h5GKOhB2UT7UHk33eznJ6687KMmI4SiCih/Qoep/+PhFJy6AS YwhD0DVgF0h7mMr/x4Uaa1AP0hnUz0mimRhOi8PLmH2zj4BUQNrU+glBqt1IV9Zkv1DC hLSpjl655lCrTH/cJSBML5n3uI8QfaRy99TImvEJXWpGsvZQbrRFMbNJ/e/ejPc9Ij2e nqHA== X-Gm-Message-State: APf1xPDncVxmESM2EJuxz2kGFgg4R8//D6I5YcTHFWiJwD/FRZEyLH9D IDMWBwYwJfdVnkeTBd5M5xbBBg== X-Received: by 10.223.161.27 with SMTP id o27mr1179705wro.97.1517902976588; Mon, 05 Feb 2018 23:42:56 -0800 (PST) Received: from localhost.localdomain ([151.15.228.62]) by smtp.gmail.com with ESMTPSA id h194sm37607126wma.8.2018.02.05.23.42.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Feb 2018 23:42:56 -0800 (PST) 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 Precedence: bulk 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