Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp253312lqt; Thu, 6 Jun 2024 02:33:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmEZtRVK9ZudqG8xsdvvxKCvgyH33b/fT9r+m8nWz9PH7I08gnaMusACZRQhMJpfo2PtO2a3OXQmiqo/FJOhYn8z6xjlvrP9obfxWcQw== X-Google-Smtp-Source: AGHT+IExd6cFWgSq6YwYgz1LUxXflLK1s7WgU7BvEyPncw0oKaq4MLMjCsQ6ocEaOW/6vdqzKUDK X-Received: by 2002:a17:90a:68c9:b0:2c2:c8b:f187 with SMTP id 98e67ed59e1d1-2c27db53199mr5841332a91.36.1717666415869; Thu, 06 Jun 2024 02:33:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717666415; cv=pass; d=google.com; s=arc-20160816; b=dDKkvt5N20ZqgW3lD5Tn2VMSQM5FNdmA8GnJqPS1PLuspC+WSWG0pzT+UOLhnoHqqv FXMR5i6eThI0Nsi5HDxsWG6ScEBOl6eV4VaeAxnA1EizQIKKLZ+VIM1jwj9sruijNQub aRm9sr3AMhjH+XM+n42BeLLUcE9Dgxxkp+BB7goCYZWyi5wOPbTEeWTdgLI3JTQNJgV/ Hs+d4LdbfgAdeqguGKbmxYdOW9oBhoENvaSJT4dSriA4gALZ2TeoTX9cn3MeLHPxYB/F 6LZMbjj5Qt6p5XG2JHUQ2N3Nu+4Z+MbjYthvTr5/ERq5YT8KQ8/PWa4OjQ+4TXw7fL+N AsNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vMCIwUkdjNqOPH9iNm+HoiQG9fv4x09CsbGKJkywvEA=; fh=GPlquE77/S3b4C9fO90iprJj+9gU4YTMgqpxD3SPTHY=; b=g5FAf6XD0Y2ygpWkyKMK+TSAB6K6bCQtXDYm5vePyI5n5SWNPyXfrmB0LCLfW+pVSf xMJA/IUsY5kwVzaUNPGm4TLtF0wz0KNAna+4weta76TenvDuEfuUcw6JSd2++4KWUXB0 OvzV/UWziQG/rV9jprraMbUZh9haNijwE6NvAI2s6UCVm+3DMZUyTeVY+BgDhK+DFNTu Mq3PQ6gO5ZyTaqA5TlJAA7ljYEDXWUzixX+am1YCVVD1US3TLFEhYhTOOVE3RM22tmVv EXdd2MJGpfSTuqk0NIxoDVQRY3Rt0fp/EQDUy7nz4pjJljvhx4ydvaRL+MhnWrCHLHuy 0i8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-203926-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c37bc99si878210a91.91.2024.06.06.02.33.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:33:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203926-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-203926-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 27494B236EF for ; Thu, 6 Jun 2024 09:06:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68926152DED; Thu, 6 Jun 2024 09:01:31 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D01914EC71; Thu, 6 Jun 2024 09:01:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717664490; cv=none; b=CNKAGfukCAH8Pc9ag0cpRgKuHhGisTzWhi10FUgEs5IZ0Fphgek0d8tWHMVaY4shryjYHFYOMAlcL9vKHzMR9y6wsspX6d62DFNu0ZxNO9rR3aDtADxs+rC3e9q6AGrJA0naFUf1cP2UdjS2OW5nCDGBe7GMhj+7gflgLWpm3UU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717664490; c=relaxed/simple; bh=BK15k8asB6S9tes/VSsFvDkpmsX7mPNMWzbLiswymSA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EbZi35UqR9ylr3LTW+dp2h49oWZfu9XS/Imgk5uRkOkUgIWZlCAViNX8UgA9Dd44NWMpqqlf0X3IP1cF+CUe76PO6zK84frh65HWaCQZCQEecfi9jcFEKSwBRy0XheNPBsfLDQ0Th39971ycbaP0QSv6W1nsc8M0qSlPEzInbsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7A8F9339; Thu, 6 Jun 2024 02:01:53 -0700 (PDT) Received: from e127648.arm.com (unknown [10.57.71.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ED7E63F762; Thu, 6 Jun 2024 02:01:26 -0700 (PDT) From: Christian Loehle To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org Cc: vincent.guittot@linaro.org, qyousef@layalina.io, peterz@infradead.org, daniel.lezcano@linaro.org, anna-maria@linutronix.de, kajetan.puchalski@arm.com, lukasz.luba@arm.com, dietmar.eggemann@arm.com, Christian Loehle Subject: [PATCH 4/6] cpuidle: teo: Increase minimum time to stop tick Date: Thu, 6 Jun 2024 10:00:48 +0100 Message-Id: <20240606090050.327614-5-christian.loehle@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240606090050.327614-1-christian.loehle@arm.com> References: <20240606090050.327614-1-christian.loehle@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since stopping the tick isn't free, add at least some minor constant (1ms) for the threshold to stop the tick. Signed-off-by: Christian Loehle --- drivers/cpuidle/governors/teo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index 216d34747e3b..ca9422bbd8db 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -622,10 +622,10 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, /* * Allow the tick to be stopped unless the selected state is a polling * one or the expected idle duration is shorter than the tick period - * length. + * length plus some constant (1ms) to account for stopping it. */ if ((!(drv->states[idx].flags & CPUIDLE_FLAG_POLLING) && - duration_ns >= TICK_NSEC) || tick_nohz_tick_stopped()) + duration_ns > NSEC_PER_MSEC + TICK_NSEC) || tick_nohz_tick_stopped()) return idx; out_tick_state: -- 2.34.1