Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp110874rbe; Wed, 28 Feb 2024 14:01:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPeLnZXdH0mSmf19hQLKtvNsLQffQnYpiuzlOHlzOuTZbwuj1bV2aACFhM4MvihotFDetXSnhcs2wxdoFU0POlfAbNaGbLGd/1qLAFzg== X-Google-Smtp-Source: AGHT+IFUtAFT1kUF0JaH55HZcbIKe1zcFUvBkNYb5vC7LSvKlUsbse+UEwcTQwWfu8YNEApIX8a/ X-Received: by 2002:a05:6214:30e:b0:68f:87a6:19b8 with SMTP id i14-20020a056214030e00b0068f87a619b8mr416595qvu.4.1709157694628; Wed, 28 Feb 2024 14:01:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709157694; cv=pass; d=google.com; s=arc-20160816; b=nudfJVEOFs7nW3SPkDvMjTl/vh80GeugSwneTI/keuvH8vTkQ8DIxBonfMj+JdR0Ef 1MhC17nwfJAjNpw7bP2uHy9rxfGkc0uz8cxZ2YcndFAUB9NyFF69xCto+HaZIAp9BtQ3 b5koMO73Cqz2YbMXPQqCWi9u0KFKOudwD8MFXBvklS+jlrcCQOk3ecXdwbqpTB9SuTLw CQNXUpDpVs2eXstiNwDIWzrRNBhnvXy/eHD3ca9hwM+53ci90DivDpttKz2WtKPlu2Xr acJ+n/7ejNfBnjWwJhWLxK/ha6nRo+4xLsbftvEV2fcICpfWlW964k596bnD7mdD25Ka Nlvw== 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=3SA4r/Gx3AtSlXeawLQ8OLlk/NKfZsBIGDG7j0d/YTE=; fh=aKsKE5fLBw4tya2d2+dn+6dU3ZzlKFdKa4YkHd3HkLY=; b=SuVjSiRqxUePPlKHntpind84xJ8Z9klVcDnFtVsN7u6aRaizEhOFPh+Xd58sF5tBlH 1yIy2GpnGGClqjSqD4mmZbVfLti8ZUeZ5uZuY1rZJ2nhKSvqqUiB59HY1AiZSoo4e5YF nGtZahqpeuLjzLdIrcoVRtrsRd4fmMj0ZGmVNwkVIF9N0A+Fn5SUlvGIMePDWtWrfLMx tebSsoiZ4t3Uh41syX64Kfol4Y7Ctjr1NcG0RthwyBzjcvrZY8D6LkL03v3H5X/ZMWqR rmPjuXIfwmfLRF3RQ+odiJXw3pxfzBLEPLnogtZdED8c3zAbTtP1VI8GAuezWjZpZDz6 MBBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iYUTMa5G; 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-85757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e9-20020a0562140d8900b0068fcacfb34asi22741qve.235.2024.02.28.14.01.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:01:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iYUTMa5G; 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-85757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85757-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5711B1C22044 for ; Wed, 28 Feb 2024 22:01:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64CE87D090; Wed, 28 Feb 2024 22:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iYUTMa5G"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5SHvrTi6" 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 0EEB572927; 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=1709157619; cv=none; b=Qr/T0UhMXi3/E44fpRl6l5K0TJ8HYobtZGK3XuDnSVxW/pAopbTdySb2FjMn5E9apLaigwNhmVCXAp6mTqg9DkpZxc37MUfw/KO4r8SB2UsUHHKQQnP/GHvz2M2yrxZCHWULzES706NVE9w/lEJm4r/5xpdVch8Ibn3/h+dxuKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157619; c=relaxed/simple; bh=D4dsBE9SNfENmZbQssQYh+CbA2Sd3b8W99GldeI0y3E=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=oO9LP3u4+zRfJ2sR34KebsW3KyLds0enMH6RUivHphRYe27TRKJiKqcG6mmVxZk5Uui+fAqnhBfo6E2M4rmC6mHrQt0zki3loTczLKleB9g50rtl2Grq/RyT0QxQTQsyLSCj8hu/dlq/ExWkLP32pzeVEOO+NOiieEXfAmkBfNg= 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=iYUTMa5G; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5SHvrTi6; 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=3SA4r/Gx3AtSlXeawLQ8OLlk/NKfZsBIGDG7j0d/YTE=; b=iYUTMa5GhuXF0NZAxuDK1eTDWvLkp+JvRxM2AOGOzX3smBHXgKZojaAnaVTdhugH0Pns6Y BiG684VT+0N0tR1X2KDarPxJzPFfOmcuImoCCPX0Qa2LdKbxQ5406XmArp4p4xOrohOQbe TvUC5eaf0BcX7q7HXhonc4hWz4U0NSJ/VFtjW73DExg90gZaKLSYJIlO1GkcxuVszox3UU B9zdOVQd+kqaVOR5z6T1gxslgnJvSFrj7olX4ohs7Us/rxbFgrXgFDSo9PaEkt2pmpWBvA 6ruG+PBK3JZdAF39n2rpWcUvLTPr+DeA34wFRbYd9PcxK/ei08Ho2E9FkTCY0A== 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=3SA4r/Gx3AtSlXeawLQ8OLlk/NKfZsBIGDG7j0d/YTE=; b=5SHvrTi6gVT82g2SGy4dGDUcRDYdKnJ26RJnm0qJ3iGdwndCA+zKi5fP//2vTUoaY+xpFt CDGT/6IHdE2HPTDw== 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: Do strict inequality check for busiest misfit task group Cc: David Vernet , Ingo Molnar , Vincent Guittot , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240206043921.850302-3-void@manifault.com> References: <20240206043921.850302-3-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: <170915760926.398.7923117841020138205.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: 7f1a7229718d788f26a711374da83adc2689837f Gitweb: https://git.kernel.org/tip/7f1a7229718d788f26a711374da83adc2689837f Author: David Vernet AuthorDate: Mon, 05 Feb 2024 22:39:20 -06:00 Committer: Ingo Molnar CommitterDate: Wed, 28 Feb 2024 15:19:24 +01:00 sched/fair: Do strict inequality check for busiest misfit task group In update_sd_pick_busiest(), when comparing two sched groups that are both of type group_misfit_task, we currently consider the new group as busier than the current busiest group even if the new group has the same misfit task load as the current busiest group. We can avoid some unnecessary writes if we instead only consider the newest group to be the busiest if it has a higher load than the current busiest. This matches the behavior of other group types where we compare load, such as two groups that are both overloaded. Let's update the group_misfit_task type comparison to also only update the busiest group in the event of strict inequality. 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-3-void@manifault.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 41dda53..448520f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10032,7 +10032,7 @@ static bool update_sd_pick_busiest(struct lb_env *env, * If we have more than one misfit sg go with the biggest * misfit. */ - if (sgs->group_misfit_task_load < busiest->group_misfit_task_load) + if (sgs->group_misfit_task_load <= busiest->group_misfit_task_load) return false; break;