Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp223586rdb; Thu, 21 Dec 2023 07:30:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcqFsz/b0jHmSFBeqn7SZ7X3r9Bk3WaCNEJZuxNW2m2DcXiiZLEsPjgUExUjJM8lctD+DA X-Received: by 2002:a62:ee19:0:b0:6ce:7748:575d with SMTP id e25-20020a62ee19000000b006ce7748575dmr10019770pfi.61.1703172601463; Thu, 21 Dec 2023 07:30:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703172601; cv=none; d=google.com; s=arc-20160816; b=TXf8xEvhtJj4XqtcUCabiV8YYFUAYj1MlZp6Hl6KcSQoQwt5O1jQ7/FfePXVq8jgsJ /+8POWa14rg6rM40g8932YGMw4wsd9MLeM4NqBtNzJg+GDhU8SXSpgZ0zR2eTSLT8Iny vRLeibIdrHs9e9YCZpoNR/jcPVC2i2glf2DmZZVY46PGS9Pr7GsYERmnq/M2S3QqjCNi W9QIFoZIOfaNCpkvWVSwPW5gtOH3HqrIcxsFfVOcQHGz1sGQlfwC9lSKQEzcgsnjGzsG CQJRQxkjVMigd+e7btDTdIGCqLfuXL+/j5ugD+JRnAeUgrEpZ3pn/lFIbX0AkrIaNmxt THag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=oUIlB8C1n+/+S8mtRIgRlcIy2IOBZVxCbWEoIM2tHAM=; fh=cKnnuKiI26Y2XZcDrYu6F5PemUXVxu6KF717xnjNoRc=; b=Y5uIS61cfukxuzmat1BPcEkQldq4q3GQ5F0caPyKm87TalEbdGkPHvdnq51eGwHEBd O+Ck2Wy2+GmlaZ192q8CBcY5kcV4Htb9Lb/5tpyhxHEC/gb/R9z0I9Xa0Hln8D0CsL1K 2QHioQhej83/TDjH4NvK1rGZPa2sJloImHIHZzXH+AvIwN4anYD7DC6NH2RsfW7b4bS/ FlgrV5zXUGVALuNZqkTJcjG0aeewLVtlt8occDeRIozv9lvWdiqf21XtgEkBcutLhqRj /9BrcqrTtkPUOeju4EgncnpNgKDTCsfZrh4hrYZZbXVILOMZ7Yv84s/bQHuQQjYMrLxc 7RAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 11-20020a63104b000000b00565dd108fd4si1693404pgq.115.2023.12.21.07.30.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 07:30:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8644-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4117028A704 for ; Thu, 21 Dec 2023 15:23:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B374E539ED; Thu, 21 Dec 2023 15:22:55 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42F164F1E9 for ; Thu, 21 Dec 2023 15:22:52 +0000 (UTC) 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 9514B2F4; Thu, 21 Dec 2023 07:23:37 -0800 (PST) Received: from [192.168.1.25] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4ECF3F64C; Thu, 21 Dec 2023 07:22:49 -0800 (PST) Message-ID: Date: Thu, 21 Dec 2023 16:22:48 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sched/idle: Prevent stopping the tick when there is no cpuidle driver Content-Language: en-US To: Anna-Maria Behnsen , linux-kernel@vger.kernel.org Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Thomas Gleixner References: <20231215130501.24542-1-anna-maria@linutronix.de> From: Pierre Gondois In-Reply-To: <20231215130501.24542-1-anna-maria@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Anna-Maria, On 12/15/23 14:05, Anna-Maria Behnsen wrote: > When there is no cpuidle driver, the system tries to stop the tick even if > the system is fully loaded. But stopping the tick is not for free and it > decreases performance on a fully loaded system. As there is no (cpuidle) > framework which brings CPU in a power saving state when nothing needs to be > done, there is also no power saving benefit when stopping the tick. Just in case is wasn't taken into consideration: - Stopping the tick isn't free on a busy system, but it should also cost something to regularly handle ticks on each CPU of an idle system. FWIU, disabling the ticks also allows to add a CPU to the 'nohz.idle_cpus_mask' mask, which helps the idle load balancer picking an idle CPU to do load balancing for all the idle CPUs (cf. kick_ilb()). It seems better to do one periodic balancing for all the idle CPUs rather than periodically waking-up all CPUs to try to balance. - I would have assumed that if the system was fully loaded, ticks would not be stopped, or maybe I misunderstood the case. I assume the wake-up latency would be improved if the tick doesn't have to be re-setup again. Regards, Pierre > > Therefore do not stop the tick when there is no cpuidle driver. > > Signed-off-by: Anna-Maria Behnsen > --- > kernel/sched/idle.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index 565f8374ddbb..fd111686aaf3 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -165,8 +165,6 @@ static void cpuidle_idle_call(void) > */ > > if (cpuidle_not_available(drv, dev)) { > - tick_nohz_idle_stop_tick(); > - > default_idle_call(); > goto exit_idle; > }