Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3168259lqp; Tue, 26 Mar 2024 01:09:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2wmIoFH3V85wuvL7qTkadmFzVf6spZfrJp84eKiGuv9LS1H36mxDprq3qFR0KIH2BdmzSMZGwDW7Pra8kG4jWBvE1Ni0cWvuF6E2jMQ== X-Google-Smtp-Source: AGHT+IEujMHp+qNGeH/YXvNvDLleAm/ReIfPOenefzmsjxmhgTL3T+fiaQRrEJFtrAZPNcv5hHgd X-Received: by 2002:a05:6a20:9184:b0:1a3:be68:e82b with SMTP id v4-20020a056a20918400b001a3be68e82bmr7074754pzd.45.1711440573240; Tue, 26 Mar 2024 01:09:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711440573; cv=pass; d=google.com; s=arc-20160816; b=cEX72+rqEBq9Vjwtb5hl38OBBiuo0HNsCqba5getba9zBCrdD1lJHD4zW28QxMz+LB 18aGyvcPGyQkuzB2TJYp9wuA73ij9whT5Wy1J8AF18oUUbzl6FPZT9fwy4B1DiSciTfg Mf1vkrshGb0USQTFkrMEOyvlcX4XKL+/jDrXuesPmaWDnDvnFAiGlUdnZkSObJySEdfJ pdTnUMVZvq91xYzKhbw8qNsNjR396N1uhHCtIKdIHXCAj0IsZKSqY0IE/APhQpDWfRjx vRiK1TY5hm047QnTrkO5JlmoGDI6jXp8YZbqBt/24bPwshsNGgAxRh109qnKaxlIlz0o uaZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=+FebEuKGKxEkVs9mnT4s55KdAqLCsppHV1mquMLNE7A=; fh=TTINzJM/1ZLSrRANpNm481LhlB1+3NccZjQVZoOehmk=; b=ohMFvhvys+mOHMQwv5SkAIuvG3rYFljRgVlLN8qOamLpEvy0geXQdo0wPAPWNOFc1x QLMBJ8DqtV3Z5pPPNK5CGbjlBDAHqtqm/nmNp++IPMVtFm8/mSQDET8Ty7UvusQqxgcs WPpHICaW+asqBrXHr1TBm/3uX70BatYUIxmwDYrh/QbUI6rzC9p+yGS9WUG3+LY3uEy3 9AFwoJ7gudxKSttQm3yL+J4r55PF/syXSKWigIPlB2IED5PN/teHMJw8zcJrmnx7E6ps BQNYi0pkC8ChDi43I8/UtEq155FkTelOLrLW9Txoebqn+KdcwgtHjVfd/DgxalpPmZ0c axng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QB0gFE+p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-118515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id im15-20020a170902bb0f00b001dd8ea56a15si5698628plb.121.2024.03.26.01.09.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 01:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118515-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=@gmail.com header.s=20230601 header.b=QB0gFE+p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-118515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4518A2E43B6 for ; Tue, 26 Mar 2024 08:08:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CB6C136E16; Tue, 26 Mar 2024 08:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QB0gFE+p" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 B76B2132811 for ; Tue, 26 Mar 2024 08:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711440484; cv=none; b=HtHAma1xWpNlC2YVXcTOclYsg0jTiQ8Y5Fw7grN9Q9g216kECZoCVKJJiefP5PIZMPfpFbWmZ8B+18T+UKZZjU/MXcOyza82uyMb1on2mMjWuJBGq2oKaZyZIIT/vcN+UmCF1ztbBr4ILZc6pMlO8D+Iu44X+ZoTvlagk1zl2gQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711440484; c=relaxed/simple; bh=2xVA99bePe+j6Vg/ZBkrE49832DO5fQrfsEuBjVPvaQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QEE6lTTqUinPc/QHGnQG/cAI7JAjuupAOEfhsovhuXJ2j+qfL3ThOXDxbV9TGBFPuGHB/ExXy4npomvHrkhY80TGPwhZnfMmGVFNbIV5VO7kvV2MzHBQp/jCEjIS6pfAZbz/F1z87mudr1LrBzoGlqqvsG9nkdOIYoeDIYs+tjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QB0gFE+p; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-33ed4dd8659so3836078f8f.0 for ; Tue, 26 Mar 2024 01:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711440481; x=1712045281; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=+FebEuKGKxEkVs9mnT4s55KdAqLCsppHV1mquMLNE7A=; b=QB0gFE+pDfOzAIdFSRFXbjRcm9PGw0HTzNPZ3a1ARI7aNDgXbgqALVgfDKw0e19MV4 5wATBNBzL6GUsbVjLcdxU5ocPKpRRygP0vc0fDJcXxfedNmq7R23LkN9RtFpbR+Ci/JQ y6XEP/AIt3b1P57WI2jYyoAzQoyld0rXU6eqIeLLZMFZDiddM+1/I6PSGA0Nj1dMNfSj xK1oGYQv/Es6wb4r+lSwR7MUGkgwvFwLNLY0/ZaLPc4MwNJ5ZdBqD8pMEIwPGtdieMxA J20oZZmq9JnTJTFf7Y1uYlkFy2HgZYvev5XVlohuTWbk/qzMM4NTS+cAAqsubI1HBcLC +2wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711440481; x=1712045281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+FebEuKGKxEkVs9mnT4s55KdAqLCsppHV1mquMLNE7A=; b=ZHtGnOLRImthk0kvNcGdcKH6eeRaCHPAvAB9vnklQcesIsItrr9Bxu0ddQEUR/mcck +hvfJHEEs/mrky/2FFl83z/0qkpXfY/HxvFtLetAokCzTzxMlYTKcGxhsHj+oUgx+UQc 57A9o3iRPdrnwUZMEKS31W8eVXTXATGR+ToZwCXD8cwVWmXLLoBHLMhF5wh8OOj5MR5W vRZ5VnzzCXiLDpMIenar7ws2cHTBqxRwrKkrjsdERNSsWW49eiZy5Mkeq2dEreRMhQ54 zd9v5zveHjB98SJMEbDRxnRL0Bn2bwkw7CiMpQLlFnV5DcoTFbLUUZmXlgA/Y6WzpJfx yTiQ== X-Forwarded-Encrypted: i=1; AJvYcCV6JN5mvCiywyMiT1NbNIlwxo5i/ErxomixVlgd4Tja8mnPE9jZxk4RgslMbeo1LpabjmbwMZvJ2p9jKX5wFeEo2wxmGtBarjFZvB28 X-Gm-Message-State: AOJu0YyOevaEWLgptQbF7FC2clr6NJ8g/TQ+eyyDoAvt7VJ8j/+Pwz/e hgB929VNblGlhTWmBV0nUNMjjUKMn4dDQvL6Dsk0zsfZNaidGMN3 X-Received: by 2002:a5d:5917:0:b0:33e:c69f:6769 with SMTP id v23-20020a5d5917000000b0033ec69f6769mr567209wrd.26.1711440480701; Tue, 26 Mar 2024 01:08:00 -0700 (PDT) Received: from gmail.com (1F2EF63C.nat.pool.telekom.hu. [31.46.246.60]) by smtp.gmail.com with ESMTPSA id bf12-20020a0560001ccc00b0033e745b8bcfsm11495208wrb.88.2024.03.26.01.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 01:08:00 -0700 (PDT) Sender: Ingo Molnar Date: Tue, 26 Mar 2024 09:07:58 +0100 From: Ingo Molnar To: Shrikanth Hegde Cc: peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, qyousef@layalina.io, linux-kernel@vger.kernel.org, vschneid@redhat.com, joshdon@google.com, riel@surriel.com Subject: Re: [PATCH] sched/fair: Simplify continue_balancing for newidle Message-ID: References: <20240325153926.274284-1-sshegde@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240325153926.274284-1-sshegde@linux.ibm.com> * Shrikanth Hegde wrote: > newidle(CPU_NEWLY_IDLE) balancing doesn't stop the load balancing if the > continue_balancing flag is reset. Other two balancing (IDLE, BUSY) do > that. newidle balance stops the load balancing if rq has a task or there > is wakeup pending. The same checks are present in should_we_balance for > newidle. Hence use the return value and simplify continue_balancing > mechanism for newidle. Update the comment surrounding it as well. Assuming there are no side-effects to balancing behavior. > No change in functionality intended. Is this actually true? Any change to behavior invalidates such a sentence. > /* > + * We must set idle_stamp _before_ calling sched_balance_rq() > + * for CPU_NEWLY_IDLE, such that we measure the this duration > + * as idle time. > */ 'the this' ...? Thanks, Ingo