Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4636970ioa; Wed, 27 Apr 2022 08:00:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4uvHownFrzKKqc9PV5lgC0IAVcyKDLl1y891kg6FoWf2GMDrpjqccBAcy7w6E/G7qkEA7 X-Received: by 2002:a05:6870:970d:b0:e5:db16:5297 with SMTP id n13-20020a056870970d00b000e5db165297mr7516098oaq.66.1651071654136; Wed, 27 Apr 2022 08:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651071654; cv=none; d=google.com; s=arc-20160816; b=RQk3mR4w+M5EDTw3nb3q/sjyFj2UOEicdYTi1TMbj1UphL24+qup+m1ABlk8QHIdAd 52DWd5B/sJvspSRxcv4Uj/d3d36GmUzaf1lj+MPOcWPzEdsyAWOwbRVdL8XuQgs8X7FO yXObz0+iYQRmwmeWf4X04hGF5zaWz1ddEPygx38XeHSKuk2PWtTeidna2B+zWQQoXLpD aaMhb/YGpj/Am5XI3EmCbOpHJmtKQ+BND5lUooiRw5IL0j9ETTssgDA2k79gg4OW74Kd AK96GNiP4Hx34EAYLSs4XemZFzZVU1ozBQIjNwvcbKnh+Hfp4ZG3D7+fh5c+z7YGAcZF mqTw== 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=UxdN3WRzpfDk/VCl2Xjq45pf2aTf+Fw8v7B9Kr2+EeA=; b=TY+KxqcdIvj+JYj/qmQr4D+dZJjRvcOmsOCR1z3IK9hf1d7BamkMXROhurKPEChjJr l+6x/bP2A6/rYtGMCo6HPBixQt2Jf7ET1WfZ1jPKgj1U8ZKZG02CVQRr6+vS2vNS6TtF 45q79HZ8Qx65lVt2IC9Q1QYOMwqMzIaDZ9OFJSAkDdJC1Y0u2tzxQUAgiqTPIgjbjpZ4 lKbbnQEcX6o4rZ8z0VfCW8LZ7lgGFsbAF8tJrPWQcNIEETBJQ6EOJfT45NLMKIE+pfh7 2IWDcJ23k/nYUfk8ym+lzAns3J95j32I3IUC2hm1oFDk5W4xp7etd3fUUG9ykqFsxaRQ +ZEw== 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 bc41-20020a05682016a900b002c2c14b84c7si1331158oob.0.2022.04.27.08.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 08:00:54 -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 7AE995594; Wed, 27 Apr 2022 07:33:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238259AbiD0Ogz (ORCPT + 99 others); Wed, 27 Apr 2022 10:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238142AbiD0Ogf (ORCPT ); Wed, 27 Apr 2022 10:36:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47F02643F for ; Wed, 27 Apr 2022 07:33:22 -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 0F958143D; Wed, 27 Apr 2022 07:33:22 -0700 (PDT) Received: from localhost.localdomain (unknown [10.57.44.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 92C323F5A1; Wed, 27 Apr 2022 07:33:20 -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 v7 4/7] sched/fair: Rename select_idle_mask to select_rq_mask Date: Wed, 27 Apr 2022 15:33:01 +0100 Message-Id: <20220427143304.3950488-5-vincent.donnefort@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220427143304.3950488-1-vincent.donnefort@arm.com> References: <20220427143304.3950488-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 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 e0d5b1ba565d..a4ad4d82f217 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5850,7 +5850,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 @@ -6340,7 +6340,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(); @@ -6426,7 +6426,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