Received: by 10.223.176.5 with SMTP id f5csp2811514wra; Mon, 5 Feb 2018 10:13:31 -0800 (PST) X-Google-Smtp-Source: AH8x2240/9my932ZHiE+mU4/X3NSvYrtC2fUWYUw8sll+VfV/k/JYg/lKcwIwFK+h+kRTbkICozV X-Received: by 2002:a17:902:3281:: with SMTP id z1-v6mr44523846plb.431.1517854410959; Mon, 05 Feb 2018 10:13:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517854410; cv=none; d=google.com; s=arc-20160816; b=IlRVJH/Dzh0kWwAGK1T330PSoEUKoxjTaVMvi8GgBuNe17dG15a4mxHiuS2HLDvU8B XTn4ZALRXYJfOIqd+Jw2te88548bIyR08dQQkIUYjIRAr8N0++EhGX6VdU62B1rUot9O +2VeXAmEMxtAZGsvLf1Tc3P/TqppM6F2PArDj8yUBy8GIOz8Vc3iVZ1e4GdH4U3/gH/X 2zSRxiAs0rlb/LQ2r20XztuDiU7U62OajgRivSAzrvlo9rg9AYmYAqV1CuV+Nzr9v8v7 WWVLF5lFEX9/wAN4OTiAghRrBHGc88oW0BOXPtjasCtsfY/dKXYuwpwuGSbA4TpUi+U8 MLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=svhT440qsJlhBiih03yxlBd/yNlbCZmmk1+wrcNkV5Y=; b=QzNLYoS9kw95EdNt8GoiF5ybcSah55q9B/sW3AONEtNqchMljBE/Rwy3da28ttKBvU Xu5W8xABgn6ttjHJE3nlLz8Po202rPUJVU8HKBSxVp2kpZwv9kgoqbBxJWqdu+SKf/L8 5PvBrzqOFhr/n5854OMJkWZLZt2jLWgZJh427+fs4zAmB3Xv64/Z9iMiHk2Wo7q1BG9c +MPoYB72UgqrR2S4M+Sl1kcDWWjEh00gndChppscGWAZkeqZnLzaYT8OYedGl6hnJlSd RHbKYLv0NOxCAC0fKxtxi9gca3zMpkQur59r4RpDsqyJ3A6fIlPgzwqTEGbI0Mp9ocpk Jnhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZbPTLwfO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14-v6si208773plj.226.2018.02.05.10.13.16; Mon, 05 Feb 2018 10:13:30 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ZbPTLwfO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753327AbeBESL4 (ORCPT + 99 others); Mon, 5 Feb 2018 13:11:56 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:38381 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbeBESLv (ORCPT ); Mon, 5 Feb 2018 13:11:51 -0500 Received: by mail-wm0-f48.google.com with SMTP id 141so27557897wme.3 for ; Mon, 05 Feb 2018 10:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=svhT440qsJlhBiih03yxlBd/yNlbCZmmk1+wrcNkV5Y=; b=ZbPTLwfOnsMUwg/cqQOPSnj2t+cSxhHUkJiMqB/mDlc03vml74goBCKFqBH1U7ef0m l/MIyla2UMsHkOuqDxuj1dgCZAfmuEs01zBMEZusS4ean2A2yeRoVCaMpOrjJk8mxXys yXeWPdo1Eg7I1ZXX05LJbkKL9d1JPE6mrx4nc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=svhT440qsJlhBiih03yxlBd/yNlbCZmmk1+wrcNkV5Y=; b=rM/XmYhaUxyteYC7FZLfTcwZgf5eeVdmD4ic6OWhOXK2ENZpRo4fbOWGpqx8cc1Xd9 c/zaIi+gMCoCGny2WYzuFa1d7Uz9zZLQUSubPo+AQJIi0S/ZbiyFjyGO95LXpvMhThNZ TMaOLNb5AmBVGlMnwiVk6V4eZ3HggRL+g4fZ4ahS7TpH1xlJM0pEcxYM9g4xkCU9kbJ3 3NCDvsSsO6bMHVUekQytOS82krE18N9ViHX+EM71+nmDEV06msCfchCh65DXpYKwlCLV ioNs/nHeS8LCZDxC7JwYyk7FlvS9GV68mkpGzGYtTNy+HgBrbTjwuvvXPt7CmwGXaB2l PE9w== X-Gm-Message-State: APf1xPD/zDDEU7DY6Ec0fAGKoUx+T8Msq4I0D+KhvLxr3/bc3XFqeR9x Pd1mAoJVnSfRxAbEhR7Sokz2ordF0BAftWnBoQVYHg== X-Received: by 10.80.220.3 with SMTP id q3mr249278edk.176.1517854310292; Mon, 05 Feb 2018 10:11:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.168.164 with HTTP; Mon, 5 Feb 2018 10:11:49 -0800 (PST) In-Reply-To: <20180202101951.GS19535@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> From: Mathieu Poirier Date: Mon, 5 Feb 2018 11:11:49 -0700 Message-ID: Subject: Re: [PATCH V2 1/7] sched/topology: Adding function partition_sched_domains_locked() To: Juri Lelli Cc: Peter Zijlstra , Li Zefan , Ingo Molnar , Steven Rostedt , Claudio Scordino , Daniel Bristot de Oliveira , Tommaso Cucinotta , "luca.abeni" , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). Mathieu > >> + */ >> +void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], >> + struct sched_domain_attr *dattr_new) >> +{ >> + mutex_lock(&sched_domains_mutex); >> + partition_sched_domains_locked(ndoms_new, doms_new, dattr_new); >> mutex_unlock(&sched_domains_mutex); >> } > > Best, > > - Juri