Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp110837rbe; Wed, 28 Feb 2024 14:01:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUzCFqST6sRObp3To659Fio9cr3qlUap9hM88JIsDWp5XPku1c4IukL9PImERz4o9WX44RCTt9yWT7hPcKqm6vbIgnd3usX+vif4wPOlw== X-Google-Smtp-Source: AGHT+IGz5+G090699DKcO9JOgOJCLSds4B4YevX2yZnskVHMPDmfc2QZAOkjMGOOQcG8Q/Csnbl2 X-Received: by 2002:a05:6a20:65a3:b0:1a1:f00:7a9 with SMTP id p35-20020a056a2065a300b001a10f0007a9mr436682pzh.20.1709157691150; Wed, 28 Feb 2024 14:01:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709157691; cv=pass; d=google.com; s=arc-20160816; b=CqxhkOKuko7HB9dYGLnXbt5mOiuCLSwp3KwGKKb/MvmEy9Feqb+y+m0Ty0OQgVKVkZ UzryrKE1eoc5jSHDuSf/qyxKnfUkeAVkSclkqFB2l8ZhBl/G5XoQWEeTntrYkiQC6LsU rkqPZdpUXn4WxhIgxNsg6cBPeKbUwlJQKu5DhsO3Lh31LEaxP0t85M5sEkAeU6COHf7M nzk8zyuCXCcaDQoCnGlj+uiaEG2ecx4VBzWh8rfraPUfV0xOBlGU7rXm5tq1+lEXLMK9 YF/l5FFRjmaZOot09vrD0HnD/KinIUCn/ozRkZZpuZwj2IwH0pHtIwAirwow0pmQ4Q5u /Asw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=a40RlwL8R2DxtAw9DQ1Rv47BdvRqUCvsOh8PymgKpb0=; fh=aKsKE5fLBw4tya2d2+dn+6dU3ZzlKFdKa4YkHd3HkLY=; b=WRpOEuizLUoEdCnS3hdDSWJ79basVvQS0Lv3u7230B2pMtQFTJwp1EzjZvR7R3QKrq OwqZ/Em9vPyMrC4VdbM4/PqdibDTN86FMc5lso+yosS+Ur2htihzSN+4oEid0wikHgx6 mu3fdJqL97QFQvb27hhSgL7lOKXpMirwUnDm6DVu1bmSgu2Hb1RyOgQA8WUX6SjVHC+g pPsWmwLNw0a6q6HPKWS24jZFPF2UmZyiYnRbE17XafIxjluVeFwfUB9F3B/ZbcuaJAh2 RC4dWxABNjuzdmxLIlmQ4bhLcjcRYRb09ld1fYV6jEpw/SVwjsOXr4rGoQmFnT0zdHvU yQHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=L5aIosW4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85755-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85755-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e23-20020a63d957000000b005dc96170131si357066pgj.766.2024.02.28.14.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:01:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85755-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=L5aIosW4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85755-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85755-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 64849287C29 for ; Wed, 28 Feb 2024 22:01:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6739F76F1F; Wed, 28 Feb 2024 22:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="L5aIosW4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="q1kVylNL" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFD3A72921; Wed, 28 Feb 2024 22:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157618; cv=none; b=aGSOQ1cbxtYiDVGUZfRD6aVBIpJzPW0iGRLBwfJq10Jvay9cffeHg+IdrXgIh0/Zu6j8W1JhawrJlq4dqPeUP9RhXoovzeq5Pt50qkt6yl1sZEPfBk6hHwAusdzs8AQ3ZnlBLHHUywO10M3LXMo4/EJl01vJ2+2IBKwpaXCWDjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157618; c=relaxed/simple; bh=Kbc3CBARYMyxP7nPSVDq+QDIHWWxcTvx3Pdbwk22UGs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=SMelB35oeVdQe8bwL0r1PJKQOpQBe9k1r3HNVNStczUsZr9E47fJ+To6NwPH1lbsEJNAL9c+iFCUhjK3o/dm9Vmii/DXCN+FLwIXDWS2ZKksSsesOYzkB4yTKroXgIBcMuoSAEaTcX4CpIBEZwxy2mxd0gAWr4KtDmFsP/0Vbdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=L5aIosW4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=q1kVylNL; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 28 Feb 2024 22:00:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709157610; 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=a40RlwL8R2DxtAw9DQ1Rv47BdvRqUCvsOh8PymgKpb0=; b=L5aIosW4W7cub/ulHJn4vSWlmA401qPLPee2jmTH2aEwQdSJrVxv3skYFADuVxPajRxP3h nSsAa1ECto86TibDekUCqzGO75hV8hBCDUOO731tyZNEEf1/lmOzbvridBlLP3vBSeHwTB uEpI2M9aj6lxOYCLrmvAdxtlXX3BuEYKiQ9vZauUTG1Eb5yBgNhmVZ1Pbwn9xPLmzplAOL P1xQNHtzqw1j/5yK10Ylezx/QNltL46Wgn5Zn0RISAUH409Do6cukkstxx0k4ns5OHej1K rwJohTg8Famw150o0qeFhxO2wkQc+EQ+4qzG+wQyQhAOh1AXgnCkui8sk1fQBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709157610; 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=a40RlwL8R2DxtAw9DQ1Rv47BdvRqUCvsOh8PymgKpb0=; b=q1kVylNL5uS3S2dwyKxxId36I3eo7O2wwMlElo9nB03bIGqhlAnJEELfwtCPsdjXRshUxw MKHSFqF74J3pinDQ== From: "tip-bot2 for David Vernet" 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: Remove unnecessary goto in update_sd_lb_stats() Cc: David Vernet , Ingo Molnar , Vincent Guittot , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240206043921.850302-2-void@manifault.com> References: <20240206043921.850302-2-void@manifault.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170915760996.398.17950890395789943511.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the sched/core branch of tip: Commit-ID: 9dfbc26d27aaf0f5958c5972188f16fe977e5af5 Gitweb: https://git.kernel.org/tip/9dfbc26d27aaf0f5958c5972188f16fe977e5af5 Author: David Vernet AuthorDate: Mon, 05 Feb 2024 22:39:19 -06:00 Committer: Ingo Molnar CommitterDate: Wed, 28 Feb 2024 15:19:23 +01:00 sched/fair: Remove unnecessary goto in update_sd_lb_stats() 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. Signed-off-by: David Vernet Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20240206043921.850302-2-void@manifault.com --- 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 352222d..41dda53 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10580,16 +10580,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;