Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp22697pxb; Tue, 12 Apr 2022 15:41:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP6ufTvBVQGgRqW5t4Ip6jK9Ryy/RFFAzTPFjjG4qhohvwZKNdXAza4ow4gI+r4OV5RsF9 X-Received: by 2002:a63:f34d:0:b0:399:5abe:b2e1 with SMTP id t13-20020a63f34d000000b003995abeb2e1mr33049841pgj.451.1649803311182; Tue, 12 Apr 2022 15:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649803311; cv=none; d=google.com; s=arc-20160816; b=MxDs5/QvwoHA+a1peFbmVj0oVbdhVOWwO4pebsd4w0FyTnVdYnLzDCwrneFvKETcL8 3FMy7AJ2YBXmT/R9BcS5E57S+vfl0f7lsXDiwhEEBrkEgYMe7K2DCBtDsFOSmGkFDL3a 8WFRbcWd45hrBsy+4/qcs2QG/QOC1nkb/0l2pJ1TpqFlLUlO2XCl5PliY68MgWEETh2Q UmAmt7CGrYkECLtsruMWeSyMmBSvH6tvqGoZ50Gdw9H/EdHEhpgDAszl93GdYuuRx/4L hdnR6K08sCECPYZl2PmUY+QO4Ji65S4AcLgKA6RlRkOZqOI/uuQdPXxteQeq+PCFd4FL i21Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5XcpZSuVhID9jAxv79jsH0h/1Qex3r/2846nqAidKsU=; b=YIPcIGU/PuQoYkfH0gaDW2p86sUAG2g+oExk//Ovvm1DvMXPk89nCUdim64ChScqI6 YrvwND7CYUurltB91dHuYJMiqYbT/GW1CJjDRiR4KAwU4EP2h89SXmhfLV87scJb4GpS +n3xmXKWIMmzFJlZrEyOycvmcr9+4UEDsrudlm9Cfsco4LzfgCorfpfgLL8wcpiyXvw4 Ll+tvG/KLnVZm5xnL27/JCQp1+44bLS8FR/6Eu7IgM/TxcXevAk5duZyAKqs39oI4065 BvJ2DypSTK3mTkDT9NN/2W1ep34j+eUk4zCgGQ+GHlT9p0JQmSibmvgahHiYAEXAmb7m 2Pcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c7-20020a63ef47000000b0039905cd1790si3843475pgk.579.2022.04.12.15.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E45F310611B; Tue, 12 Apr 2022 14:20:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356273AbiDLNpV (ORCPT + 99 others); Tue, 12 Apr 2022 09:45:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356079AbiDLNoz (ORCPT ); Tue, 12 Apr 2022 09:44:55 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D82D84ECED for ; Tue, 12 Apr 2022 06:42:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3E6F1576; Tue, 12 Apr 2022 06:42:37 -0700 (PDT) Received: from localhost.localdomain (unknown [10.57.94.90]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7A86E3F70D; Tue, 12 Apr 2022 06:42:36 -0700 (PDT) From: Vincent Donnefort To: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, chris.redpath@arm.com, qperret@google.com Subject: [PATCH v4 4/7] sched/fair: Rename select_idle_mask to select_rq_mask Date: Tue, 12 Apr 2022 14:42:17 +0100 Message-Id: <20220412134220.1588482-5-vincent.donnefort@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220412134220.1588482-1-vincent.donnefort@arm.com> References: <20220412134220.1588482-1-vincent.donnefort@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dietmar Eggemann Decouple the name of the per-cpu cpumask select_idle_mask from its usage in select_idle_[cpu/capacity]() of the CFS run-queue selection (select_task_rq_fair()). This is to support the reuse of this cpumask in the Energy Aware Scheduling (EAS) path (find_energy_efficient_cpu()) of the CFS run-queue selection. Signed-off-by: Dietmar Eggemann diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a62d25ec5b0d..f3f5540bae9e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9456,7 +9456,7 @@ static struct kmem_cache *task_group_cache __read_mostly; #endif DECLARE_PER_CPU(cpumask_var_t, load_balance_mask); -DECLARE_PER_CPU(cpumask_var_t, select_idle_mask); +DECLARE_PER_CPU(cpumask_var_t, select_rq_mask); void __init sched_init(void) { @@ -9505,7 +9505,7 @@ void __init sched_init(void) for_each_possible_cpu(i) { per_cpu(load_balance_mask, i) = (cpumask_var_t)kzalloc_node( cpumask_size(), GFP_KERNEL, cpu_to_node(i)); - per_cpu(select_idle_mask, i) = (cpumask_var_t)kzalloc_node( + per_cpu(select_rq_mask, i) = (cpumask_var_t)kzalloc_node( cpumask_size(), GFP_KERNEL, cpu_to_node(i)); } #endif /* CONFIG_CPUMASK_OFFSTACK */ diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7cd1fb073fcf..f1e78f6adc98 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5848,7 +5848,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) /* Working cpumask for: load_balance, load_balance_newidle. */ DEFINE_PER_CPU(cpumask_var_t, load_balance_mask); -DEFINE_PER_CPU(cpumask_var_t, select_idle_mask); +DEFINE_PER_CPU(cpumask_var_t, select_rq_mask); #ifdef CONFIG_NO_HZ_COMMON @@ -6338,7 +6338,7 @@ static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd */ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool has_idle_core, int target) { - struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_idle_mask); + struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_rq_mask); int i, cpu, idle_cpu = -1, nr = INT_MAX; struct rq *this_rq = this_rq(); int this = smp_processor_id(); @@ -6424,7 +6424,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) int cpu, best_cpu = -1; struct cpumask *cpus; - cpus = this_cpu_cpumask_var_ptr(select_idle_mask); + cpus = this_cpu_cpumask_var_ptr(select_rq_mask); cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr); task_util = uclamp_task_util(p); -- 2.25.1