Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1838537rdb; Sun, 4 Feb 2024 03:46:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWKIxDySpVUm0PDdod4+LBNNTfeweJHcWQxjiCjd4ZXCzjQ0bibR63jylf3vToBqxTMt9E X-Received: by 2002:a05:6a20:2446:b0:19e:89ae:a0b8 with SMTP id t6-20020a056a20244600b0019e89aea0b8mr1409278pzc.2.1707047174581; Sun, 04 Feb 2024 03:46:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707047174; cv=pass; d=google.com; s=arc-20160816; b=mIlYHRqS4E015kU+9X+pvkePWyHtWUN34E75c/97vWWiafU75me4itMR/1hm302lVy ucoOMjTszXB7VW2YraxI7iCIvrc+CCyFqaJi2qJgoCY+WdqjWreUPeOiGU6cU3UJzHwg mBUEP+5rDJi13rNVmtMH42ddNGE6G8Dh4WIRIc7aouY+mXrD22jQmpQsEb7uXGPrErf2 0bTeHWA6cW6FvU7Bc43dlgyyAzTkEYZfWAMJnQNY2ovdzqusUdu9tgYvg7dbLHHTo269 elqoowyhTqQIgHdE2QBNZkAYUyQPXQAp2qNTAynOCnRsK76KKbKZIDi3hTjoB16etEJb t+qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=3rkWxkZIZnZS6vY+tGpyDAUE64mPHdya01WcnVrnuEU=; fh=hEniYBt/s+kfpOkTMHg1in5omciPYnuTyr93fK8aXOc=; b=Okjo10CkVXHGxX39DS6B2MWLh6BpzRwOZr38NWiXi6lvt+d0Yp8EUsCafHeL6vs1Z6 hMiMTTqBnxPAmqxtA/yn/Cm+tpCgPhSXtU+BU3FuxSdYB0fFJZsw4Q21q/kDjomMZ6UW 8oTmReRUzDYrhPBtNujWUpySMw57a3xaKsFfcdhLoTzVkSYpHzqRNzYBkyLauWBpcJKM 5KCI3n+IN2ZUJGsf0dgRQ1lBsLrjWyJLvYryu+AQ8nsztwSRGjN4lN34PlXNspwtrZ2o DK5YfumcGG+91F04yLXBBLxsmC88nsBcHScKau90SRdo6iJcv+f0aHUPySUg3LqAEc/t iVJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hJqmGnWi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-51611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51611-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCU32eFIxId1op5skKEFbLnVcs9CgQ/var/cwyL5HfFZ0HmSOXbBNwQRVqdxVjVX/7Gy/qdAxriOX4f1epb1LAqptdkan+yFCb5UcfVTjQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v31-20020a63481f000000b005d6787271aesi4325550pga.237.2024.02.04.03.46.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 03:46:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hJqmGnWi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-51611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51611-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 1A9AFB2165C for ; Sun, 4 Feb 2024 11:45:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D91352230F; Sun, 4 Feb 2024 11:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hJqmGnWi" Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (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 7D42622081 for ; Sun, 4 Feb 2024 11:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707047132; cv=none; b=Xa8OftqYfhdrZVZAcixQsPE3VzbMfkBDTUZdM+jGczmYl6lhrteJaW+PbOHyAYGyQzf2aXIEbDvs7CaqmPCcS3uQLoReywwQMavZk/4MgckQEJYPyZhzeFdMqqVHjD1Hr4lB86qzg4b8tw86QzprjyGrMeFzblRQnL1XYLGIRNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707047132; c=relaxed/simple; bh=XR83UQlwxz6s5+olPT6yncgAKlHegp9awIw+AN/9VJk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=A7iGc+kwrEuAInV4vPuciPD20088zePAgJvMvNcFIJuz1ZwvIq4zJnSV3f3RlIlxme9k9iO5slwanrilYhKnjwG4s+2sPCWqtSZKS3S13ImZQnawNi12qz1uyyFrVHdgP/1FXvl2YESnNs6Q/Issd9dLh4jVC9DQ8u2PeMrjBrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hJqmGnWi; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-290b37bb7deso2888200a91.0 for ; Sun, 04 Feb 2024 03:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707047130; x=1707651930; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3rkWxkZIZnZS6vY+tGpyDAUE64mPHdya01WcnVrnuEU=; b=hJqmGnWiSGKsObJ17nQvT2TUvf++PC+WopYLn2Qea5ly9WIx9XDVYhOU5iS1NsMlyh RLPg7i0tqXZTKwSUTi965ARrGK7sQuZ8XCH9erhHXDkeEx+ip94KNEeHQp8HQKCzCUiO bdqP56+70M9K5ll8dA43vSOxY6OBTfZiZ5dZWjfMnvVphx9aQX73oxy7kRS80kmXDA0d mMFXo8HyRnj9vmq2v35b5ju7E20YMDNrWA1pV0ZDGsgXFOK31+X7ofbcpRHt4YSJqLSy PQFV4EqETn8B6sFcE2D693GR6vLBv5xt8g8ZPj/soQAU4x8jyFf0anaKehpQMYLK2cz1 i9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707047130; x=1707651930; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3rkWxkZIZnZS6vY+tGpyDAUE64mPHdya01WcnVrnuEU=; b=BhuuxRpkyid0CERLqZiH/E/wpzyi85aOArJ5qPHGUiTGpsbT9614W/mli+J5CnkSEH u9XQryX26IrM1m5eXl6UGIDLXfDaIvqcTKUnH0QdCDBO20dpCy4/mgNZqzeG8mkZkUhr 5WigEw53EOwdhLN4LxFrCfTgzR25viQwnQ0Pd1Fx3Fep4Vg3RuGKO7XwmXJ7qPLRzUgk 6FUdq2WqOB2RWwDkUIMVFtZmkiqf+DEm7wF9uS6tbU/0Q2xtWMN8j7Dt2XS4rVNVAm8z aoRStuw8RUjhlDTZAxMSMC5dDmvJ6QjXV2EOykjqwplgBG7WRKRlR4VI5ilMinrAGlji Ut2A== X-Gm-Message-State: AOJu0YyZRH/gCzyiEDH8ZFkg2YrIb1MdmYJgqyVVVJwt3gfSaFLM+CsE 5wJKbVhdc64KQVKUNibScJ0gncu2ucDEgA/Rj4InhRfFcZJ9wpgS4Ao1mPZakN5wApo57k9I0DQ z36upl+nREksVfvThZwbaLzvSYUwuP6phcawI4w== X-Received: by 2002:a17:90b:e0c:b0:295:d722:a420 with SMTP id ge12-20020a17090b0e0c00b00295d722a420mr6260158pjb.6.1707047129757; Sun, 04 Feb 2024 03:45:29 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240204044618.46100-1-void@manifault.com> <20240204044618.46100-3-void@manifault.com> In-Reply-To: <20240204044618.46100-3-void@manifault.com> From: Vincent Guittot Date: Sun, 4 Feb 2024 12:45:18 +0100 Message-ID: Subject: Re: [PATCH v2 2/3] sched/fair: Do strict inequality check for busiest misfit task group To: David Vernet Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, kernel-team@meta.com Content-Type: text/plain; charset="UTF-8" On Sun, 4 Feb 2024 at 05:46, David Vernet wrote: > > 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. fair enough Reviewed-by: Vincent Guittot > > Signed-off-by: David Vernet > --- > 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 e7519ea434b1..76d03106040d 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -10028,7 +10028,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; > > -- > 2.43.0 >