Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3598163lfo; Mon, 23 May 2022 08:54:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG6PsF6I0byaYnThQPb1AybIqw1KkAt+e+RPZ8WLNPxxeFDXYa8qk/KT5ROstTw3L/FqnP X-Received: by 2002:a17:903:153:b0:161:eaba:5b2a with SMTP id r19-20020a170903015300b00161eaba5b2amr18816967plc.30.1653321257264; Mon, 23 May 2022 08:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653321257; cv=none; d=google.com; s=arc-20160816; b=DP4HDYU4rbIWsP0RDcLfcpwmUV9EcuxgU2sFqs7x/L69qHdVr/Un47gpm/rZt/DaOl QJfCs8bFD2DAhZFdMzlicOlI0o0GMZmV6LeNEa/4j7oep3ulnQvcs0YJMqI9rgNJctuL eUkk18EN17sgReUbZM0Gs+H64XWoh6e4d17CC78UNiPCRrzlMpdMEtO/yTKHt0WtGP7q +XPBwoxr+VuitaXesC5woItth8B2+QXl9kWOhyZDL2Cdt5LPFZG1nQuQFsVepa++bwag V9bqjvw28/tP1YwJ7+wlKvTw47yyHzu+z61krKlA6Qcxv/aPZtJ7kcwvSngVsDLxGdsK mf9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=Xvz8pTdOu4fQbxYqVMwf3pWiSGQYuX7yCHLpo5kL/L4=; b=CvclSPK9RbmceJkkeGd0kiw0lsgQqwdviATAT2JEa8g8GSq1fNjdVYeVKKCKEXtHva t0itaUGpp4ivouuC+ZRkOygp5Ibq9s90v4RzuTgZARhw56SglDybPvpPdBOLnh85wvcp mU+tvrvc70OuFRlW6GYztjNq80oD/QwWGatCmZQC+n0FSKoUEYt1waht3acAsRBZY0hb O8bZivWnhXDCqw7FASDRUT8C4PBT91lz0u1/ZuHr71SzjPm2R1KjOnmJ/c4eI7g9jLYB VK1BvCIjzfR1UKiDSjT5YZsu87qMfEPO+7ycI1khdfs3+KXBVE82yHIa3FOkDFtd1ghB rSTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=SKL1Kklk; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q20-20020a656854000000b003f276bebf30si8226047pgt.393.2022.05.23.08.54.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 08:54:17 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=SKL1Kklk; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B31C61297; Mon, 23 May 2022 08:53:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238297AbiEWPxT (ORCPT + 99 others); Mon, 23 May 2022 11:53:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234924AbiEWPwm (ORCPT ); Mon, 23 May 2022 11:52:42 -0400 Received: from mail-wm1-x349.google.com (mail-wm1-x349.google.com [IPv6:2a00:1450:4864:20::349]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E85533C713 for ; Mon, 23 May 2022 08:52:41 -0700 (PDT) Received: by mail-wm1-x349.google.com with SMTP id l15-20020a05600c1d0f00b003973901d3b4so2946772wms.2 for ; Mon, 23 May 2022 08:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Xvz8pTdOu4fQbxYqVMwf3pWiSGQYuX7yCHLpo5kL/L4=; b=SKL1Kklk7s8dSDdvMgS8eeSgC61HXgt2xH5Wl/6cGOyIdVc1bvXM/TaE4dskgCo3zp YAOVkWLsMwZY1MdvQmgrY0g90vHbmFB7O5tilQa7XHCgxyoz5EQrunxngyJX0gRyJOnr j9v9J0KrSC7XPDIK6da5ZxOjfp20MHezR/XsRqgBRk09vz6b6xv7h53ygZv+fTNVKMq7 W9a/KrseFSAZx7jwXMUgYxVAx51lhTC6eHLHolzZ7OzK9oCy/VHNMnvfigheAqeDGBQo hEaG7P9i4u8XLEnqkBREH/5JAuNHp+eLPEhrYONoic0XEOM/sbse28D0teIvdp8Ouh3X iz0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Xvz8pTdOu4fQbxYqVMwf3pWiSGQYuX7yCHLpo5kL/L4=; b=ciMF1xW0ypoUYRKXWM4NSwJHWt5TzY2CHX/3SidWp107HOwkn4V1QyMedW24n/rzqO ZJd8qHgwSV2yw2STv9QLqZ/oXJs9WGHNOlr0NmrR3LlC5gkISQfvyGpI2ArUbbMmSMC/ yme7nPldoYYZTYsmMUfVPzGfHkBGO+7T+KfvONm9SV8Ci+HEY5/LGXnk3X3WCicy2j9x DYsnZDTavXNidhlR/sKGE1zPHQSXug10fPJFsHK3rAW5BwUZNE3bR+c921RpoVTV17lm dSwNxBGhgsj4Z35mZDVRWAFipok4lZZGiRLeLW0MUqOeGYQccDXJbct7qT33UJw9xQVU LArw== X-Gm-Message-State: AOAM531H4wRZRRQYnq+sgpjLwUA2NE4AX9qvkO5MQDbpmozRYWVvdmEe dQ/LRNKv04C2CGKhCmneH10++Al+3cDVeA/5 X-Received: from vdonnefort.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2eea]) (user=vdonnefort job=sendgmr) by 2002:a05:600c:3d8b:b0:397:469c:7bbd with SMTP id bi11-20020a05600c3d8b00b00397469c7bbdmr8345997wmb.62.1653321160524; Mon, 23 May 2022 08:52:40 -0700 (PDT) Date: Mon, 23 May 2022 16:51:37 +0100 In-Reply-To: <20220523155140.2878563-1-vdonnefort@google.com> Message-Id: <20220523155140.2878563-5-vdonnefort@google.com> Mime-Version: 1.0 References: <20220523155140.2878563-1-vdonnefort@google.com> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog Subject: [PATCH v9 4/7] sched/fair: Rename select_idle_mask to select_rq_mask 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, tao.zhou@linux.dev, kernel-team@android.com, vdonnefort@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 c531976ee960..68f5eb8a1de7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9502,7 +9502,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) { @@ -9551,7 +9551,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 73a9dc522b73..2d7bba2f1da2 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5897,7 +5897,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 @@ -6387,7 +6387,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(); @@ -6473,7 +6473,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.36.1.124.g0e6072fb45-goog