Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4633714pxb; Tue, 5 Oct 2021 07:14:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjfJ73V4Evp3Z2tMxDS2AcNy9lU84PHoX6sWNI4Rvzi/TopMs7eRSErikGR2YLy3hQsFk2 X-Received: by 2002:a17:906:6809:: with SMTP id k9mr12611761ejr.424.1633443290231; Tue, 05 Oct 2021 07:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633443290; cv=none; d=google.com; s=arc-20160816; b=ep6/o+08fdIixs4Dqka0O9lo41fEGsE/pztoCLu80CQUJbSziO/oHySod/X00sJjw2 MIwV8vd5StfYqK3UxOvQFG6DT7sKe6/5H8+KdAD3K8gB33IO5AgCfGs7Znj9So0v2ReM oq66lSMRoAvkJGju/fxwFH/zCDeVGfxcGbvXbIoQSUaj2r+tsYetehj3OaWLpbAbqdSP 7nVDxNCQOJhDCM3TYbdHui3DtM+J6kScud5NDCdycaopyyV9/0xlxGQmwjlrnniKZxMK As2I4w+AFDuAPkzzRohkzJ0SMwh2PbBahAed+ukAYrt2zHO3ZqPkq9Zh689rOfZgas+6 aoAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=BfIGWch3fSGtrGxUza+JqehnlVAElbgELkrhR8+3Nho=; b=0IR9+qtufnNHpyNbYDg/j/JcqYsB0LmVE0uhqkyyuMEJxgRiWFGkGy1/IkAPuAZ3d6 /jsrLy4lueTwM9Fm7CIK7rE53r9QxaDjwEtHIRz9yRG6yU9ZCBpyoP15FErr5400McLX qugtlOLVh6JWMOQsHu+wyDNUiM6wR8GP0TPVfiGcxpK9XCoK1Ao920kG3HZJxwm+Bya5 SdndmvVx/ornaFlxJzojckGytYgEfm0sPKTAG9VJqbejV/z1RFGeMH7OgnLv49jrD07V KdAnF2rbT9zZwhvSKEiwZ1EsQs+mQdcEBZfnmcJXUFjrTmw629j+9F0KCQbPRQry3e3b rKBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tlqemuXO; dkim=neutral (no key) header.i=@linutronix.de header.b="CFk/DlTf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 21si21334828ejc.493.2021.10.05.07.14.22; Tue, 05 Oct 2021 07:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tlqemuXO; dkim=neutral (no key) header.i=@linutronix.de header.b="CFk/DlTf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235930AbhJEOOJ (ORCPT + 99 others); Tue, 5 Oct 2021 10:14:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235421AbhJEON4 (ORCPT ); Tue, 5 Oct 2021 10:13:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B9B6C061765; Tue, 5 Oct 2021 07:12:03 -0700 (PDT) Date: Tue, 05 Oct 2021 14:12:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633443122; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BfIGWch3fSGtrGxUza+JqehnlVAElbgELkrhR8+3Nho=; b=tlqemuXOaOAgr9gmbcIDdQzloCuUcYVvIJo2+7uFFvPby0gH4DXmY/p3xiwubIzTFktZaE 3dj2MDmhW5YcU8f8AsVeLMAhPXSvylwYeXnT+9AXJvTOvVo7jppKp77NmdREc1zggFEsVc 8UawVSfVvPChzg/Kqv4tLaffBjNvT/Z11M3AGsHfjdjmFDtDSfIrX+qUgZx1gs6yNQ05rI 5vSuX7CdDk+Ym1+cGBDwvOdUxZ99qOzbJHKP7CEbkdBHYL2mmg+eZNRTAu2KFlNLNgqt3W FPkv8PBjkTjSRWDItwKslHNZXekcr/tofazDhYOOIQF4P3g6ASo4VH5r3B1blg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633443122; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BfIGWch3fSGtrGxUza+JqehnlVAElbgELkrhR8+3Nho=; b=CFk/DlTf5oK/sHdohfUObl8qgleJET4Pnpc8bJRDlQVqUrzzcbQz7KoEbWw/3SUS1pDq/C p9trcgCdxUFUInDQ== From: "tip-bot2 for Ricardo Neri" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Provide update_sg_lb_stats() with sched domain statistics Cc: "Peter Zijlstra (Intel)" , Ricardo Neri , "Joel Fernandes (Google)" , Len Brown , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210911011819.12184-5-ricardo.neri-calderon@linux.intel.com> References: <20210911011819.12184-5-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Message-ID: <163344312131.25758.15888370038716365881.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: c0d14b57fe0c11b65ce8a1a4a58a48f3f324ca0f Gitweb: https://git.kernel.org/tip/c0d14b57fe0c11b65ce8a1a4a58a48f3f324ca0f Author: Ricardo Neri AuthorDate: Fri, 10 Sep 2021 18:18:17 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 05 Oct 2021 15:52:03 +02:00 sched/fair: Provide update_sg_lb_stats() with sched domain statistics Before deciding to pull tasks when using asymmetric packing of tasks, on some architectures (e.g., x86) it is necessary to know not only the state of dst_cpu but also of its SMT siblings. The decision to classify a candidate busiest group as group_asym_packing is done in update_sg_lb_stats(). Give this function access to the scheduling domain statistics, which contains the statistics of the local group. Originally-by: Peter Zijlstra (Intel) Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joel Fernandes (Google) Reviewed-by: Len Brown Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210911011819.12184-5-ricardo.neri-calderon@linux.intel.com --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e050b1d..2e8ef33 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8579,6 +8579,7 @@ group_type group_classify(unsigned int imbalance_pct, * @sg_status: Holds flag indicating the status of the sched_group */ static inline void update_sg_lb_stats(struct lb_env *env, + struct sd_lb_stats *sds, struct sched_group *group, struct sg_lb_stats *sgs, int *sg_status) @@ -8587,7 +8588,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, memset(sgs, 0, sizeof(*sgs)); - local_group = cpumask_test_cpu(env->dst_cpu, sched_group_span(group)); + local_group = group == sds->local; for_each_cpu_and(i, sched_group_span(group), env->cpus) { struct rq *rq = cpu_rq(i); @@ -9150,7 +9151,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd update_group_capacity(env->sd, env->dst_cpu); } - update_sg_lb_stats(env, sg, sgs, &sg_status); + update_sg_lb_stats(env, sds, sg, sgs, &sg_status); if (local_group) goto next_group;