Received: by 2002:ac8:734e:0:b0:40f:fb00:664b with SMTP id q14csp1727664qtp; Wed, 9 Aug 2023 10:05:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERaDKG1gPu5pQIOB65wIZzWV3NdicgAurBvtrbyJS6Otvvw+afMtWXfgNoN0q2g5o+6mi2 X-Received: by 2002:a05:6512:709:b0:4fb:8435:3efc with SMTP id b9-20020a056512070900b004fb84353efcmr2062379lfs.16.1691600735529; Wed, 09 Aug 2023 10:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691600735; cv=none; d=google.com; s=arc-20160816; b=MuSKW0bqx+5/UswnFfbOkieDkVtvukgQIguREDrrJWRG2Zbv/rWz3hxm6gcmge9ftn hlMDaC/sQDNnp9oaP15uVY+ALGbgNwl22k9LOgiuHca6dXPR0zmte3lV6KDZyBjPE84Z DLpsQDQycBHXl1aoBymakoRbTQ+bZ30OsC8FLUbH+Ne9LhMPTQDjfk1HJH9K5R5c4Md2 Cot2iFrnDS+91KzUEoIpERu900Hvo/ezGqI7uDDTLKAV/z/exg4EWnHhahZsLFLRSTyG nMVQ+QyaHfdnZ0pVODb1gL3XaxbYNPmAkAwD9FNDsUPSjmxwWEILqYb5Rm+x1/BTAshC QwVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-id:mime-version:references:message-id :in-reply-to:subject:cc:to:from:dkim-signature:dkim-signature:date; bh=JK89Mbjr0pt8D3aWna/X6ZHv5XeeBZsaLs0qOYl8Vhg=; fh=2Us18LqpUSImnVHSHj06Ru4yC4RUxZQRLB1vy9/GuNA=; b=tXEi0V4L6h5gxTVGX1w+0WoIAZq4w0fhU9x5DvwYFDHo+pGmlW54cURqwUyx5Z6slq b8lY09tTQKsYJkyGlSG2RNqtdFt3gIdi0gag6C0Apeq4nQRYf/ne6oPX3iS3v76WpuiD lwuKX7Kx8t6ggqclpKfgacAcEA01Cepc3Y9rF9qVHYiOlPF67VP2di3DW492gH0Nld4P 5ssMIxumcXYlIvSCXjn+EhbzWkvRRo8qyxeCRRqx9xOZ0lkqnRIW67IMorINW1aKCcOP /r3LcWO1po625ehFnIM4SVWOdfeXYamtAW9GmjNlJD7rFoOzlpqwsZK+WMrmpVikCCJY hOoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uk42bsDs; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gFM5RAFA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i27-20020a170906251b00b0099a1f78de48si8781539ejb.638.2023.08.09.10.05.10; Wed, 09 Aug 2023 10:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uk42bsDs; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gFM5RAFA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbjHIQYt (ORCPT + 99 others); Wed, 9 Aug 2023 12:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjHIQYt (ORCPT ); Wed, 9 Aug 2023 12:24:49 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA3C10F3; Wed, 9 Aug 2023 09:24:48 -0700 (PDT) Date: Wed, 9 Aug 2023 18:24:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691598286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JK89Mbjr0pt8D3aWna/X6ZHv5XeeBZsaLs0qOYl8Vhg=; b=uk42bsDspVqagb9e7Yb4qq7Eq/hobN98qDM5u0mlepqEWExSMktDUIfYJwhU6qz3AJgYLS UuFS6nrK7SPqxlKSnnkmgUpK+zgwQJ4HnyCxuII+1wUXKQmTnyLjvsa1gTBl6H70TXTsRS bYeH6q/Z2n4w5sHvWPQgmB5I76fU90hurfd1X5O7lHs10lTHBSdw+kuWZ2g7o+yBgtLVB9 PuqxqMY6PymiWKfiVdpuwqVwyDaJBkTVWsr1axaRoPOZALlMkHj/F6wVdeWpmfhOkj8vc+ B5Ps5LUL2NionKq+bWyb6Yykx9hV/EdJmGXYl0RMjUea5db1Hv3xBlb8pF22XQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691598286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JK89Mbjr0pt8D3aWna/X6ZHv5XeeBZsaLs0qOYl8Vhg=; b=gFM5RAFADaCjfttF+Xusb0j8Jyb+h6hZ8w5PEJyDVvFPmXHkq5KgfsqFqO570qovV3Wq0O FrJmUXTtZR/W3uDg== From: Anna-Maria Behnsen To: Doug Smythies cc: "Rafael J. Wysocki" , Peter Zijlstra , LKML , Frederic Weisbecker , Linux PM , Kajetan Puchalski Subject: Re: [RFT][PATCH v2 0/3] cpuidle: teo: Do not check timers unconditionally every time In-Reply-To: Message-ID: <4872c41b-c8fd-1f84-7940-d4944c667e6f@linutronix.de> References: <5712331.DvuYhMxLoT@kreacher> <002201d9ca0c$27606f70$76214e50$@telus.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-532690441-1691597088=:19513" Content-ID: <3492f271-133b-e3d8-56ac-d575304eb54@linutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-532690441-1691597088=:19513 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: Hi, On Tue, 8 Aug 2023, Doug Smythies wrote: > On Tue, Aug 8, 2023 at 9:43 AM Rafael J. Wysocki wrote: > > On Tue, Aug 8, 2023 at 5:22 PM Doug Smythies wrote: [...] > > > Conclusions: Overall, I am not seeing a compelling reason to > > > proceed with this patch set. > > > > On the other hand, if there is a separate compelling reason to do > > that, it doesn't appear to lead to a major regression. > > Agreed. > Regarding the compelling reason: On a fully loaded machine with 256 CPUs tick_nohz_next_event() is executed ~48000 times per second. With this patchset it is reduced to ~120 times per second. The factor for the difference is 400. This is already an improvement. tick_nohz_next_event() marks timer bases idle, whenever possible - even if the tick is not stopped afterwards. When a timer is enqueued remote into an idle timer base an IPI is sent. Calling tick_nohz_next_event() only when the system is not that busy, prevents those unnecessary IPIs. Beside of those facts, I'm working on the timer pull model [0]. With this, non pinned timers can also be expired by other CPUs and do not prevent CPUs from going idle. Those timers will be enqueued on the local CPU without any heuristics. This helps to improve behavior when a system is idle (regarding power). But the call of tick_nohz_next_event() will be more expensive which led to a regression during testing. This regression is gone with the new teo implementation - it seems that there is also an improvement under load. I do not have finalized numbers, as it is still WIP (I came across some other possible optimizations during analyzing the regression, which I'm evaluating at the moment). Thanks, Anna-Maria [0] https://lore.kernel.org/lkml/20230524070629.6377-1-anna-maria@linutronix.de/ --8323329-532690441-1691597088=:19513--