Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1717972rdb; Sat, 3 Feb 2024 20:48:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTjOhg59IJopjx4HHP5MUaEvYuFx5atxeXcMfZGXByUZwIpEH+jlG3zjDRGycpIf1S2YSB X-Received: by 2002:a05:6808:1383:b0:3bf:c27c:d2c6 with SMTP id c3-20020a056808138300b003bfc27cd2c6mr7079237oiw.44.1707022122965; Sat, 03 Feb 2024 20:48:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707022122; cv=pass; d=google.com; s=arc-20160816; b=MUtJ+4TOhEl8a/I7wEdkz6OVfXTF13sbxCE1AF0KLc+LFSu7Ck1Fq7k1LRZKV6C9HT Mu3vLfYgJwY3rtl/QhxJXlCW9u6Aaz8gfqc6GKTb6OLGxTnxhLYpF37FaAttEluAt05t tpTd5hwLehVlD6gV7AtfygXejQ/YrJXTc9LGEwBZyds73f60uhVzssm3Z02x43qtjyzF F3uL2aW52oCSdzFxT/SWaCa7PJXhBHxXri5oOY9l+vyid4Ak5PUz+xITr7nSP5bm7aAP ezje+ql2nrH/ekG9+v6W7mdjRflNCf+CU6+yiZ091JVDHe1kGJ0FAlVRL/0HqRolMhBD o3Tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=hTl2D4iOo0GV1DAY/ZjWEvwTNDLK6aFt78YqxSZPvBQ=; fh=kre0oAlvzuW4blOWzYRdwZAc2eDk/9j36VnSvmzU16E=; b=u7tvlTvWzxBx0ordZvE95i5gtYScPgrATKZki8aLiDqt0nw5e78Rd5VahyLoJ3wWJE ouo6gu2vCZeQUzLiy+bC36svFZI77xcb5QzN8Ct+RWNNWvWPdecK/lMDjjZ2hz/nSaLp eRlArDwaN/xaglt+0pacB+UFupk+iVuxm28QzaxacoJYAfcwR+COCMBp0MQwQjGbKKEh /2CDas0cvWDWgbd2t3Q0whkS5OIcnfqM7zop9ryjkkcSIXMthib1z9uySVoFwbKjp3kH tJ+FtlO+muLMdGQD/l0TiW0ESGbu+UyTfzG9qLoMhEQOQ4ix5xnoHYh/i9EKlm+Oq0CS oyCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51427-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWrX8xHjsJOP2WuauRf1Lx4d5XvYVXiNoJqkLlQUBSzDq9CowckEHg5YsxL8ouZRWHvpQtS9AxK+ySdMRxdYGMF47cRMm38LhjRmTXBpw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a19-20020aa78653000000b006e02ddae821si1395610pfo.395.2024.02.03.20.48.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 20:48:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51427-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 01D1FB25C03 for ; Sun, 4 Feb 2024 04:47:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3E858C01; Sun, 4 Feb 2024 04:46:37 +0000 (UTC) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89F586FA8 for ; Sun, 4 Feb 2024 04:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707021997; cv=none; b=HPbpDryiNI7SidDvWt9nZHv330871qsryTIYGSLGPTasddOvNO1xMyldweUFklKFfK6jJ9/SruapIW+TOfC84fI8/MtOBtREeDQHm8bvkmIMDd2uhpjs8cxNGa9AZcGIUT57zDBYeyn4gANzyd/q3yWRFWkgrzFibf7iRPnzDzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707021997; c=relaxed/simple; bh=esJff9D3QxDKh73OdhoQpybzSp8tl3pv5yUOn5L2Or0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oPhyZx6BCcBjOGiOILtAU3t6dFBNB55ProfJIs41NTNWLD6DurfB19PdRnJ38efnPDiLkIR7J9lN2OtL4RyDfiZQugQHPmt/o7MoYP6thcLsD7xkM0azVPCdOXXT0Elz0UVomfPEa+eQn42o+f4KYreqyB9DObuIT1meMmY2k14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=manifault.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.222.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=manifault.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-783ef8ae70aso247544485a.2 for ; Sat, 03 Feb 2024 20:46:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707021994; x=1707626794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hTl2D4iOo0GV1DAY/ZjWEvwTNDLK6aFt78YqxSZPvBQ=; b=C1Z0tjsMTcXNvyQ0l4P5j3ERERGxJDEWDAe9WaVgxYx7sZ2fKD757JmlTu6qFT35fv HI5SsLeWyU+aFld7AgQpL9bXE8rjgnHkeFNX1DssmcMQkoEYnCInMxex2OvnoRRg9EOb VkyK1gJpd5ktvMYAeZ1i9BOBfpZLOwPIVPCnwWoyGC/j5kOwOQznNZzlqAM6TwLD7+pv /AE65wFTbm2lY+ImoWwCdUgLJGRQcey+cZgpm8FgbarkJgL2mSeBX7y76h2ocfWKPT3t edm5JbqZTFAvOVoLKXrU4bkpmt9hdtTlczUwst2N93dSi+dXJbkgtusuni2UiRy+Xkgk C/xw== X-Gm-Message-State: AOJu0Yz9SDsXM7gRj44wfxhmH/pyGXy+4+vWtxS5K6MO01qa5WHV4pDY p5XshD+0CUqQRHVoeRcfSjdnD1sUTZ7vjAzCDkqrW2NU0iYQbsrRuUXCRlZu9Y8= X-Received: by 2002:a0c:e082:0:b0:686:a185:dc11 with SMTP id l2-20020a0ce082000000b00686a185dc11mr2339381qvk.55.1707021993889; Sat, 03 Feb 2024 20:46:33 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXEw3NEGoax1wKTMcPEjLAOa+mI6JFt9Fn9dr/BacCCq/KLmBIwJglX11ETVmzHeqLm7qluTBvMjTx5KBbBEH0DMJPk25rtJEbif1AowmGxrK+a4z7BcUSxCyG+3mL01bcsMIBa5JkJ6gDplxUMnmB0FLMflqp7e7ggdpiUgx8rdVJPhJXXKcehp1s1+Nkh+bNs71h9J4th8kHpGOjm8cL7QoLc8hokaQW3GFcDmy9oqqsSug+rvKmpt/7xvkfig5eY9dcbLb1TE67qK+kncPpzAb2KoZnbh/samfk5Z2puv4O+FH/Cyw2KoZSG3ieGGeSWN1w7f1/sg0uQuZHjMZsKHxna27YLbiaX7A== Received: from localhost (c-24-1-27-177.hsd1.il.comcast.net. [24.1.27.177]) by smtp.gmail.com with ESMTPSA id ny6-20020a056214398600b00681785c95e0sm2434781qvb.46.2024.02.03.20.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 20:46:33 -0800 (PST) From: David Vernet To: linux-kernel@vger.kernel.org Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, kernel-team@meta.com Subject: [PATCH v2 1/3] sched/fair: Remove unnecessary goto in update_sd_lb_stats() Date: Sat, 3 Feb 2024 22:46:16 -0600 Message-ID: <20240204044618.46100-2-void@manifault.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240204044618.46100-1-void@manifault.com> References: <20240204044618.46100-1-void@manifault.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In update_sd_lb_stats(), when we're iterating over the sched groups that comprise a sched domain, we're skipping the call to update_sd_pick_busiest() for the sched group that contains the local / destination CPU. We use a goto to skip the call, but we could just as easily check !local_group, as there's no other logic that we need to skip with the goto. Let's remove the goto, and check for !local_group in the if statement instead. Reviewed-by: Valentin Schneider Signed-off-by: David Vernet --- kernel/sched/fair.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b803030c3a03..e7519ea434b1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10578,16 +10578,11 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd update_sg_lb_stats(env, sds, sg, sgs, &sg_status); - if (local_group) - goto next_group; - - - if (update_sd_pick_busiest(env, sds, sg, sgs)) { + if (!local_group && update_sd_pick_busiest(env, sds, sg, sgs)) { sds->busiest = sg; sds->busiest_stat = *sgs; } -next_group: /* Now, start updating sd_lb_stats */ sds->total_load += sgs->group_load; sds->total_capacity += sgs->group_capacity; -- 2.43.0