Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22090966rwd; Fri, 30 Jun 2023 03:53:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6YPf2o0lDrmQs2qbJFmgCjpFKS7wO/8oYFULXbAPRmjL++nxPAEDxgprvHjyNUFGA8V/DO X-Received: by 2002:a05:6871:4597:b0:1a9:f6ba:137f with SMTP id nl23-20020a056871459700b001a9f6ba137fmr3117641oab.2.1688122407282; Fri, 30 Jun 2023 03:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688122407; cv=none; d=google.com; s=arc-20160816; b=FyWilCDgH6M48n9cNdvdMADwR3CjnRkAti+tvRpAbWksxyy2HOlgkv3KkF0aczWxO7 QiOIt4KX3qhZ/qQzdRn0n2Ih1jcpN2FmCNYBPiWn/nI0kV8U7R2IsXTAQGtrP44boXwb UpgHezkSJypPWO8ErIaitDSrVFAYvKIkUT4jWlWYWn/P70fmplSrjRQQpPpxVyCqHrok DoRPiRZMCnFXOqXIG6Z44gSq+SEPLU47HBa/3Szjj8AfKdJap20CGh5QDSHN7pxe8R8M 7pLilXkjb1KLWCgy6IuYkfSWghzw5H+eTHc49y+JIX3nnDiHftKb7w3GpaQJKyfjvvyh 6COQ== 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=algT1eKyV02KTqvo/68M3KNsIHpX2KMJbiQLDn4i4nQ=; fh=NjjqT99uEtlyV2u0XnI2mgdRZyEPdtaHRv+lFE241iQ=; b=TR5UuiXI96ZD4WdNJ/lCIw/Eay3M3Znj8WlQfj9JXu8/ASlO2Qg4OoQL08/6jGA4DC kQNqqhMlkHKFsr11Ytt1WqpNxYQYn8vHNgwxwblcCBpfJLJO3kT/iKb2XgIErN9IXX3z V7DkkNKO+LJV+izghf7BR65SrLqsXJQUVTeL4v1BxS2V7/wkLb+o+6TzXToRwHaoQo3X VY5iGCj9ff8HtobsjPQ+Pd/fK0dZ0dGPMuLw9AIzeqAhPuDKD7bcRcbyAtr56j7eujwq 4GlOsoy9vtd88plLvIO2Jr8OzWkRzI9sNLdrzlqqvOluJeatePuq3v+UU0cV9NBz9gZ7 aPvw== 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 y22-20020a17090aa41600b00262e1adb2c7si10837014pjp.51.2023.06.30.03.53.15; Fri, 30 Jun 2023 03:53:27 -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 S232260AbjF3Kqk convert rfc822-to-8bit (ORCPT + 99 others); Fri, 30 Jun 2023 06:46:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjF3Kqi (ORCPT ); Fri, 30 Jun 2023 06:46:38 -0400 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D96DEF0; Fri, 30 Jun 2023 03:46:37 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-98502b12fd4so45256766b.1; Fri, 30 Jun 2023 03:46:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688121996; x=1690713996; 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=c/UBV7P1ulz8YvA35BhCt72l7KfIOxYTNUGMNlMCewg=; b=CfdwF6kGwnTz+N01bo4RiU6731eJOd4t7eumO2s9F9czzzs0hGTrdLddF0nSE9EHEm b/Eo5ZuLVI5hWttQgwALUii+30EHC97JHqnJJB3oIUX5EtjFtHk95MISnXHi9jc2XNa4 syE61espwdTE0OA3WOW0OCZdPsF4ZxruTYLxePVmUOcWwqsBuJpofit97cVpxuuFRpxm JB/CXTssmXrDxbOnOTDpbx8YwmRoMq01QObcp9bzdH+NN7/s/BWpcatUIV8tgEKq0jPe gNWV7AR/db5vAiD8J65q8y/mHgn7gmsKY13hlfiv/698grDge/6Vvi3/kTDytw2Jo18g DMsQ== X-Gm-Message-State: ABy/qLYFa0CvbtbNFMaB1EJ7NQ7vxb63i+nJW2isTp5h8ESOQr3OpIm2 3HBoAfz7yK9u/UZmnvVTFJWQ9XUpHIAvoxXdx08= X-Received: by 2002:a17:906:1109:b0:988:f9ba:e18d with SMTP id h9-20020a170906110900b00988f9bae18dmr1539376eja.6.1688121996174; Fri, 30 Jun 2023 03:46:36 -0700 (PDT) MIME-Version: 1.0 References: <20230607003721.834038-1-evalenti@kernel.org> <7616fd9d-aa0d-2ecd-8751-894b1c9073c0@linaro.org> <75eba2da-593f-f3bd-4eac-5155fcf5aee8@linaro.org> <2d59de0d-5011-780a-cb6c-94e6e2b74156@linaro.org> In-Reply-To: <2d59de0d-5011-780a-cb6c-94e6e2b74156@linaro.org> From: "Rafael J. Wysocki" Date: Fri, 30 Jun 2023 12:46:24 +0200 Message-ID: Subject: Re: [PATCH 1/1] thermal: sysfs: avoid actual readings from sysfs To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Eduardo Valentin , eduval@amazon.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria , Zhang Rui 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_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Daniel, On Fri, Jun 30, 2023 at 12:11 PM Daniel Lezcano wrote: > > > Hi Rafael, > > On 30/06/2023 10:16, Rafael J. Wysocki wrote: > > On Wed, Jun 28, 2023 at 11:10 PM Eduardo Valentin wrote: > > [ ... ] > > > So what about adding a new zone attribute that can be used to specify > > the preferred caching time for the temperature? > > > > That is, if the time interval between two consecutive updates of the > > cached temperature value is less than the value of the new attribute, > > the cached temperature value will be returned by "temp". Otherwise, > > it will cause the sensor to be read and the value obtained from it > > will be returned to user space and cached. > > > > If the value of the new attribute is 0, everything will work as it > > does now (which will also need to be the default behavior). > > I'm still not convinced about the feature. > > Eduardo provided some numbers but they seem based on the characteristics > of the I2C, not to a real use case. Eduardo? > > Before adding more complexity in the thermal framework and yet another > sysfs entry, it would be interesting to have an experiment and show the > impact of both configurations, not from a timing point of view but with > a temperature mitigation accuracy. > > Without a real use case, this feature does make really sense IMO. I'm kind of unsure why you think that it is not a good idea in general to have a way to limit the rate of accessing a temperature sensor, for energy-efficiency reasons if nothing more.