Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp873592rdg; Fri, 11 Aug 2023 02:37:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkdJTCYnCG7AZqYRAC4poyaJSrJwQNKv4BM5M3pcFqSoeTBKaeGE0D1Y0dyShoFYvP/W6U X-Received: by 2002:a05:6a20:1052:b0:12f:dc31:a71e with SMTP id gt18-20020a056a20105200b0012fdc31a71emr1495864pzc.56.1691746669633; Fri, 11 Aug 2023 02:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691746669; cv=none; d=google.com; s=arc-20160816; b=CC27s3DIqYJ4GZ/DtkoqzjhLmp9NCmfwZNLQ6DUBBEldKD6byaLEiEkk4qgEXXAx6v 1/Zfrpkg6ROGFz2mHV66r+JR+H5c2GPVFO03zMJZHsw2SLF3J3z4v7lFAo4dKsw2kUzc efSWQ1lfvolgtjWE+xTqxbcLfw9VxVmdMI9r5X3uaUPm6O+5gQyOsa1/0W0ub4s4sKpz lnaQnr2/AWOtpYsSX7VLZ/5P0WHemAAb78bV91ZypYxh0lt6AfAJRfPYhyqdT76n4Z6H pBjyLjklhXQVaRg8q1DTbKJ55UEbrYWQixiuy9gs1oBvVg5NkulsGtdyy4QtSi0X9+cP tgHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=YBpK1gVUIGuSu6Q8X/sPY0RHI56c2CcVVsMSn3o9lA8=; fh=+mB2WfQck9M2pPoCagAIxQjJ5CiyWauGXhmyM5Bifqs=; b=UITQWeO/plPZlzpVm+ESxGr7B/H8LwUkEP2z0nseKvJU9iBBUjsw014spkc1W9SzZW uelCBla99FevJXCv5tNJuxXF6hkyjvpG7Jyka1ze/tajjONv4aSs8vwUMVqG6sV0X4WN DIk8CSLB2rLNiDfYCWK+Wrjwkuyj5AEMCinHi9r8hsZMOkM5+W/5Z4ZrBdKznSLgU0a0 SnfRT+JJIlZ7V9Ai4EE56ZyIPk/Xl6581iVhbVyMxjZWvXktt9HFzZSyJtAEdCgrqYno UAz4TUZLXZrsFlS4VGWTJO5jYRvhoFliMN9gK/M8NRe5uDOFPPxAJuVLnlGdweDkC6D3 F+7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YWmCxuqa; dkim=neutral (no key) header.i=@linutronix.de; 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 r81-20020a632b54000000b0056572b7e0dcsi1303443pgr.664.2023.08.11.02.37.37; Fri, 11 Aug 2023 02:37:49 -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=YWmCxuqa; dkim=neutral (no key) header.i=@linutronix.de; 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 S234529AbjHKIwM (ORCPT + 99 others); Fri, 11 Aug 2023 04:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjHKIwK (ORCPT ); Fri, 11 Aug 2023 04:52:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1846D2712; Fri, 11 Aug 2023 01:52:09 -0700 (PDT) Date: Fri, 11 Aug 2023 10:52:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691743927; 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=YBpK1gVUIGuSu6Q8X/sPY0RHI56c2CcVVsMSn3o9lA8=; b=YWmCxuqaPyFXZYtbg8XLRgNpfoYLNLJSKGUCKhFKvFLrGDHXLM26uabgv6jy09o5+6jy6V /XfjpmaKFXkr4697KMW704FdOvM7oBEqhFJHylsdmdbHnnYzKWydAFNUqz2SAO/lXbkfkm mdkDGIHnTraqPNIabhn1EdjR2jSMexVyg3wPbczML3trXbrRRr+9oSxOKLVy4pwvlpJ0m5 0b80LkbA39SwoIbKY30NemxDCVnPQIcmCXwQ1BuEJfTyWcKiN+1P2bLGKBlZrZiqueM6vt cblFnORjWeCqNXslsiEcxVbA/IIDQ47rq8O4Po0PXL2OAInFxo8j2+o/3+sNAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691743927; 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=YBpK1gVUIGuSu6Q8X/sPY0RHI56c2CcVVsMSn3o9lA8=; b=pxCiC7Jt0Obuam3FqrqxN5tnlucxLXzuCNe3hwJsD/PbnJCni+ZThWUIpdjinNsBfH2OwF xF+xChq9KIe+ZbAQ== From: Anna-Maria Behnsen To: "Rafael J. Wysocki" cc: Linux PM , Peter Zijlstra , LKML , Frederic Weisbecker , Kajetan Puchalski Subject: Re: [RFT][PATCH v2 2/3] cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases In-Reply-To: <2167194.irdbgypaU6@kreacher> Message-ID: <28e2d9ce-89db-807a-9d39-f2fcccfb2ad4@linutronix.de> References: <5712331.DvuYhMxLoT@kreacher> <2167194.irdbgypaU6@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Hi Rafael, On Thu, 3 Aug 2023, Rafael J. Wysocki wrote: > Index: linux-pm/drivers/cpuidle/governors/teo.c > =================================================================== > --- linux-pm.orig/drivers/cpuidle/governors/teo.c > +++ linux-pm/drivers/cpuidle/governors/teo.c > @@ -166,6 +166,12 @@ > */ > #define NR_RECENT 9 > > +/* > + * Idle state target residency threshold used for deciding whether or not to > + * check the time till the closest expected timer event. > + */ > +#define RESIDENCY_THRESHOLD_NS (15 * NSEC_PER_USEC) > + I would like to understand why this residency threshold is a fixed value and not related to TICK_NSEC. I'm sure there is a reason for it - but for me it is not obvious. Can you please explain it to me? Thanks, Anna-Maria