Received: by 2002:ac8:5491:0:b0:40f:fb00:664b with SMTP id h17csp621756qtq; Thu, 10 Aug 2023 10:47:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBoIDDBWaMm5xxaR2+KMtA56ZHH12arXOBYERvrQgD1pnW5riZegdmIj/CGOK0CXpM/Vt8 X-Received: by 2002:a05:6512:1109:b0:4f8:6833:b13c with SMTP id l9-20020a056512110900b004f86833b13cmr2718206lfg.14.1691689654229; Thu, 10 Aug 2023 10:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691689654; cv=none; d=google.com; s=arc-20160816; b=0Hm+XqGOE6c/GTd0u1BvOaTtK7kpKug4W3nxFpcDwFhW0+HyurMHvz2RIWgJVn+olf ICFF/bD4YdLR2gLx8gikUYv7GrmkFrDU7ESbdC0mlbJ7oWyVq8mMfEsxhanjdOo8xW5s lXvV8+tq+kTkH2UlU8QfwZkIbhNgec+HYLmfdXvvurKZf2tyi/+xNDXQDtg2z8jcz/Vw onAMmrEwEIZ8w7swQiPoqpDACaMuB08Yozca7G769xK0L7qWADWQSBkwO4SxZHGjLaPf N+Z5jthuxD/ikCaynUjN748m9DS/9TEmU/aEbaiLBIE0zxsIuzY6JDLzqU1dM8XvE8iu jgSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=ZUUKbx+VvpKwhQql99lIE4sFI+sAfgSRgzHVhhh+wAw=; fh=gxIpDQdy6dQMKdbQ3d0n5+zypqsjABMKOSG6WgDKpCQ=; b=rOSlg69A49LJ/4x3mjwPKD18eFtjhdvPof233PZqmCkuUpVu3COOgbq8dlTc8PZl62 GYgHag2RFtbDAbYeashAv8QdXKevRsoAcUZ/KqFS6rQcJZNO74Ki83C9zdCud5TZqkce UqmPSJV/eCYcLszwq4l4o4iHbB3kSSq5EN0vlqF4/muoNSYZDYzfWgZcOvm9Ks4119VW hxvvsT3JAv1V4BAMndl/oXnbIhZgBxgNItWIemicb1RFYwQTVqRC5pdHFRx/uQYnSAHK af0v5QzJ5SCBczS4qkVpGXwII5sxPm4wJfxc3JtWxk5Yu9S/+iawy+LQgIPt4Ph5fKAZ TAKw== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a1709064a8400b00988919c8a70si2071643eju.59.2023.08.10.10.47.07; Thu, 10 Aug 2023 10:47:34 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234398AbjHJRUq convert rfc822-to-8bit (ORCPT + 99 others); Thu, 10 Aug 2023 13:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235056AbjHJRUp (ORCPT ); Thu, 10 Aug 2023 13:20:45 -0400 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7B9270D; Thu, 10 Aug 2023 10:20:44 -0700 (PDT) Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-56d0deeca09so192225eaf.0; Thu, 10 Aug 2023 10:20:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691688043; x=1692292843; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EN9CM2qX1siO8TjAIXptEtELwVlMdfBhvADZW0USjiQ=; b=XJFtTVHImkVNd43//LCfurB2MOZCQwuXBx6/qlkcvBzQufxvSUEuVhuubFq7latYOm uCFvzvN9KN9zMxbBpED4A5qJVcCitbG26hVwPRJll1VClUQFn05LSL32COnSTVknBQm+ 1uqdPDjRECC26pnsksygSsaYAtUOMawIPCKYGWJx1wqkpsXOTJ5uPm09IRUfSsSWsoiQ CNwnfJeAKtJ6gLb5rAM8eYyHL4r0XpLKpNaeOexhniByIk0NJDpgKd4VOSOh2p2HXSpk s1lYnTADw9or5IBhwoPa0o8YIqdN8zb/7q0O6P0WpHL4M8ebJljW71n4UcwAoTFoGjDp u2WQ== X-Gm-Message-State: AOJu0YwC0owmI4CYuPl5VN+Mejuthv8StdRKh/ZAxRn5BjyeuRoDGc+I 7Tl/ekWvedFE1Zv7j2RU3aVWVQsul7RCME/T9HU= X-Received: by 2002:a4a:d689:0:b0:56c:484a:923d with SMTP id i9-20020a4ad689000000b0056c484a923dmr2534551oot.1.1691688043155; Thu, 10 Aug 2023 10:20:43 -0700 (PDT) MIME-Version: 1.0 References: <5708364.DvuYhMxLoT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 10 Aug 2023 19:20:32 +0200 Message-ID: Subject: Re: [RFT] [PATCH v1] cpuidle: menu: Skip tick_nohz_get_sleep_length() call in some cases To: Doug Smythies Cc: "Rafael J. Wysocki" , Linux PM , Anna-Maria Behnsen , Peter Zijlstra , LKML , Frederic Weisbecker , Kajetan Puchalski , Srinivas Pandruvada , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Doug, On Thu, Aug 10, 2023 at 6:28 PM Doug Smythies wrote: > > On Wed, Aug 9, 2023 at 11:16 AM Rafael J. Wysocki wrote: > > On Wed, Aug 9, 2023 at 4:53 PM Rafael J. Wysocki wrote: > > > > > > From: Rafael J. Wysocki > > > > > > Because the cost of calling tick_nohz_get_sleep_length() may increase > > > in the future, reorder the code in menu_select() so it first uses the > > > statistics to determine the expected idle duration. If that value is > > > higher than RESIDENCY_THRESHOLD_NS, tick_nohz_get_sleep_length() will > > > be called to obtain the time till the closest timer and refine the > > > idle duration prediction if necessary. > > > > > > This causes the governor to always take the full overhead of > > > get_typical_interval() with the assumption that the cost will be > > > amortized by skipping the tick_nohz_get_sleep_length() call in the > > > cases when the predicted idle duration is relatively very small. > > > > > > Signed-off-by: Rafael J. Wysocki > > > --- > ... deleted... > > > > This patch is now present in the git branch at > > > > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ > > pm-cpuidle-gov > > > > along with the previous teo governor changes. > > Hi Rafael, > > Thanks for the branch and adding it to the previous 6.5-rc4 code, > as now I can re-use the menu baseline tests already done. > > My test computer boots by default to use the teo idle governor. > When I change to the menu governor, my system becomes > unresponsive and I have to re-boot. > > Is anyone else having this difficulty? There is a missing check it get_typical_interval(), my bad. I'll send a v2 of the menu governor patch shortly and I'll update the pm-cpuidle-gov branch accordingly. Thanks!