Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp492397lqr; Wed, 5 Jun 2024 11:46:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpreFVmxLcKu6f/snWVd8O+Ca6T7XL39JL+7ahFq1Ue7XRpIivtwKCvy0FPXcsF7f6hcQQDOnljUw5sMSljA7gofvWlr4lpvm4Wu41Ew== X-Google-Smtp-Source: AGHT+IGhMdaw2Bd/ZHRy6+7AvOwWGj3QxFne3jdrUGKS5dhvVuqlAZK4C+3MQ3ra+/e6VeEMa1+C X-Received: by 2002:a05:6a21:3996:b0:1b2:b5af:ce5f with SMTP id adf61e73a8af0-1b2b712dfedmr4137329637.42.1717613197964; Wed, 05 Jun 2024 11:46:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717613197; cv=pass; d=google.com; s=arc-20160816; b=lF/Rp/Jo/IqHHbNtvUTYnkhSUz1egmzD6cn5lqTQPbfLjlsjI1yJ6848MpqvKZTKhY NTk/PRgea4e+nCrcpU3PFsorjoCrnKYn+1DR4xD2X4ZWeUgOshyjStMqFVv2TuuNPuFT a1YAcVMhW++aSWDHAuh9KEbRowY1azHiwW+lO6M9uHLtUY+umYLy9EGTxShw1GECDOQm y2nbDYiD6LT94KcIQMq5gU0xuBrm+BQIZXUJNzES3iLVyvaJSTo0mKtqrN9V+8CFOE5G 1RKwN8k3NpMZWWvcpfnmZwRVYZ3jDaLkf7HBvrGtyAUt9BVtZQagPNYegHKk4wD2jGEO aI/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=Dsz7U78JHKJXQzI/wWfkv/8DJUAiobGNht99JV/9MX4=; fh=lUCKvo/194roG0hIBcyolExnIwJtK7I9SaWwWdipw5g=; b=pfN4cujlDcEK0UaHGVVQMfuZ//tXfLcHeUCBSgmd/YzRFNkg2epRPz9sqrSq6NUQsi FF8uN5JZmtEPkGeflKsE2509D1fIHoYZyARmLJzniPIY4EjYKqRSyy4f95sTb3U3GbbD Ap7a49qu7nJbapI6rQQwXXN1seJwFNyE6cU+GFYqsi/EMU/hxnXeH/uiihLp4AGDIq6X 5Z51J9PFyNvWZ2YHaM56mwRV12Gss/OS7vpxueAlFtAN1THo35ecvdKJkQ1AYQ7dWxE5 yd14DeF2q7k7CGS/HKHyEeJCfmMHdr/Pi1Rg58ddo4bwr65EBDixlupPgm/mSd1H/WQk dkLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6V95OJ1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-202958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-702735d40f1si5430792b3a.156.2024.06.05.11.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6V95OJ1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-202958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 AF4A7288541 for ; Wed, 5 Jun 2024 17:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7B6F18F2E7; Wed, 5 Jun 2024 17:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e6V95OJ1" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 4E9A714D6F6; Wed, 5 Jun 2024 17:07:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717607261; cv=none; b=oNs8H/hF4BpzACssPt9T9mM6V4MYy1zr/yisHWOY/DMg1IdObep70nGf0dPHWnFueSFbdmtAc21Eied0yBlyGQZ8QLkpBlMYHUUJ8a3le3eAYfoZ7qMGLiLlOLwaindczaPDfIli+Ouo6Z3M2dZW7LPLeJGzRmW16j/k/hw4Wlw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717607261; c=relaxed/simple; bh=admCTi0dRN3e9uqsj0+Zv4ya/X1UvHIHHvEvMdzomKI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=YKTbchw9tb1XLf9pXku5SReX9fcxbFJGYzyhkM0wYL+a2HOpMNRgBnlkzEqbVVkDk7KWla2fTC98XX2or2vStRT39QRJALoA3tzwM9/9BOE02guuKpZuS/qDYkuborbb9sY6SADdbvr5Jmbn76zM2eqVPmDb4kdplW9AJwP9Drk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=e6V95OJ1; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717607260; x=1749143260; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=admCTi0dRN3e9uqsj0+Zv4ya/X1UvHIHHvEvMdzomKI=; b=e6V95OJ11K1mq4MN/1E88wtlEEV4KB12DuG/ndnyZkirifbIUOkhwqPq ol/pbEoxpPY3z4W/8bOnLjSdnvCab/Fi3gO5ShXQy5DsoFJLriaBCqwKw oakmLnvQq2EVcjGHj9YYUcg3+2ctjx10VuWcU9uvJnOGbcqx4vuBJaJvK gDomLCyxvAvO0pkVi90SVjYXp6fMOdStQIi8ctYleC4Z6v9BmoEjpkyiq KEDeeH+bFLGWUKGYjWs91Ok1pm4by1+8XMnWWhddS7HA30OIeOmZlLrsP C/4bxn5re90RwjjPr31ZhW2oE2zC2AOQ+zESIXdaPjSvTq2BVbh3k3tmI g==; X-CSE-ConnectionGUID: 8pIqXb/3TguF9PNHF7tw9w== X-CSE-MsgGUID: gld8nkvsShG0YDXsJgDIaw== X-IronPort-AV: E=McAfee;i="6600,9927,11094"; a="31779190" X-IronPort-AV: E=Sophos;i="6.08,217,1712646000"; d="scan'208";a="31779190" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 10:07:40 -0700 X-CSE-ConnectionGUID: DzUyDe2QQBS/BgG3E97Bdw== X-CSE-MsgGUID: iYxnW/oiQv6PnFC3eWUcIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,217,1712646000"; d="scan'208";a="38224501" Received: from smulagon-mobl2.amr.corp.intel.com (HELO [10.212.148.106]) ([10.212.148.106]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 10:07:34 -0700 Message-ID: <6c4a508382d7f485c87814152282679aff120f86.camel@linux.intel.com> Subject: Re: [tip: sched/core] sched/balance: Skip unnecessary updates to idle load balancer's flags From: Tim Chen To: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org Cc: "Peter Zijlstra (Intel)" , Chen Yu , Vincent Guittot , x86@kernel.org, Mohini Narkhede Date: Wed, 05 Jun 2024 10:07:33 -0700 In-Reply-To: <171759927306.10875.2450909647126184930.tip-bot2@tip-bot2> References: <20240531205452.65781-1-tim.c.chen@linux.intel.com> <171759927306.10875.2450909647126184930.tip-bot2@tip-bot2> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-3.fc36) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-06-05 at 14:54 +0000, tip-bot2 for Tim Chen wrote: >=20 > Signed-off-by: Tim Chen > Signed-off-by: Peter Zijlstra (Intel) > Reviewed-by: Chen Yu > Reviewed-by: Vincent Guittot > Link: https://lore.kernel.org/r/20240531205452.65781-1-tim.c.chen@linux.i= ntel.com Peter, Thanks for putting the patch in tip. Can you also also add=C2=A0 Tested-by: Mohini Narkhede Thanks. Tim > --- > kernel/sched/fair.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 63113dc..41b5838 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -11892,6 +11892,13 @@ static void kick_ilb(unsigned int flags) > return; > =20 > /* > + * Don't bother if no new NOHZ balance work items for ilb_cpu, > + * i.e. all bits in flags are already set in ilb_cpu. > + */ > + if ((atomic_read(nohz_flags(ilb_cpu)) & flags) =3D=3D flags) > + return; > + > + /* > * Access to rq::nohz_csd is serialized by NOHZ_KICK_MASK; he who sets > * the first flag owns it; cleared by nohz_csd_func(). > */