Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22060798rwd; Fri, 30 Jun 2023 03:24:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5t7y20lmtyPFA1ZLMcnh+XFd2vaV8Meaxr1Vej7da7p6n6Id2QppWYOYnIUCLSpKYm7wD1 X-Received: by 2002:a05:6a20:9389:b0:121:637e:f0e5 with SMTP id x9-20020a056a20938900b00121637ef0e5mr8323998pzh.5.1688120667840; Fri, 30 Jun 2023 03:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688120667; cv=none; d=google.com; s=arc-20160816; b=h0J8MGvEQqx6ZNJeB07/YMrIcAyZbdlJMWcOcMNSEPW4TSmCnonID/tP80NDVKXPt5 VhVJmHmuL/RClckDhg6BY88iee8Ld1qjGYBxU1SO7B486fxl5qEA+HPSWa9fPqkRv/6t 3uilFfi54mQqqIDePFZTqinayycbSHnzaeLW5j5PGT00pOfBwczTupMJC4PNnbIhWfXh 8Wl31oayIKYFXPDA8ojgoSUnb5cA4Cnsf6mJ2Ql3DaYPIp/B+RzRuQ/H5pxWIjoGMZUs REJUedc5xF6aKi2NqaN5oIqBPdOBcVLUuyqS4UXSWt8/7e9LqKzOWuPEfTkhIJBfB2lM Z7Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4BFlfbAIfoDlnMUceOo+cEC26pgciEbyD8McQYGYoy0=; fh=B5a8J+gWfpVxDa1jG5FrOURdlksTQYYq2TlRH3YzKb4=; b=t1z+2Ei0Tf81oDsBr/0U8bIBWyDb2sQs0mrDmKsXmgsla1J7pOSGokzvE0ZzsUk+3X W6hC3INOnhqK6sNgJra9UWWSGtnSGv/4r1Z09cb80292EBVtYeSvMiAKJ+hkiUsdD0jO Bt+G28eLIIRggGl8a5MGZqOy7nl1iLHxdPYUm+q1h6f9K9hcMxNFbC5J5YvDzubAwkWQ k11u2tWZ3OT+pXy2Pwp4+xZ58nx0RsdHBcmugM1eTCRdEggIugmmIC92HbyaAQmMj9NQ ZkornrCs27FufdCrsqYV/iE8HEXO90X0//zcAZtdQwARGDM5wqN6mMMu/xfPCuwIk2yJ WfXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U3e2f+aV; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a635d47000000b005503f266742si11907067pgm.647.2023.06.30.03.24.15; Fri, 30 Jun 2023 03:24: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; dkim=pass header.i=@linaro.org header.s=google header.b=U3e2f+aV; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233054AbjF3KLd (ORCPT + 99 others); Fri, 30 Jun 2023 06:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232832AbjF3KL3 (ORCPT ); Fri, 30 Jun 2023 06:11:29 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 778E11FE7 for ; Fri, 30 Jun 2023 03:11:28 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f766777605so2694118e87.1 for ; Fri, 30 Jun 2023 03:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688119887; x=1690711887; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4BFlfbAIfoDlnMUceOo+cEC26pgciEbyD8McQYGYoy0=; b=U3e2f+aVKn74qcFA9TjZ5GPgcDNPKp04o7E2EJ/PScAt5JDpMuxteBQsSdxxPab8g1 fiBkdu3NllhwoBnxeQsCQk79/bxOzxWsamlKuCt6NEePCUmljoyAyzYjMapGCPA+Lnjo EH73XvElbVyB0iKqnj46NFFwFg1AJZyA/Ve/EONDmQnnqm4WtId7Xw0OoSnYzKbDqeCm AZ0W2tR+BFMxACXes2qJCIHIjoivKsa9HaLfcMvYTgaOj2DPoe3zISnm7MDJMMOzvozV geIc4j3TffAsF7W/7bN/fhzvZPpG2YxOXw4OJ03oGtHUSGqem9tdDF7/eoCahgQWnnO3 f+hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688119887; x=1690711887; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4BFlfbAIfoDlnMUceOo+cEC26pgciEbyD8McQYGYoy0=; b=TvWwR0q3rmYZU82+/xl8u+I8aXO7ca0LSHAWqkrQUPu8VyhWyam6YYaeiwDQR9yioO 9cwiVqIF5J07KKvu4Yt4x4iE/4ub4NlxXx1Vtmq7QTWIokjQRZ8pSaYA0gmxqmovcip/ 0eCn8XUR6WZpQi3XlpJvyBzi5CWYWjceAuVBgTd8u7NYYh6ps8UAgbz8+96BQgCPJkEb XDXummrHiieXW1s96HzHcxPOls/HFRivcLsO/aYGWKNwvNkhnqMuyUAl025zV4OuCNLK 4WGfqgkrkzitRinjyDUCF1M+ZHSKuVr769s7Oyfp+QGRF7Ot8t1ypNDGrF5Ed/tZweV5 btdw== X-Gm-Message-State: ABy/qLZDP4V2OmMGwQTVEjbY4N3z1su8ZAqCNLWkwRDkvwN5DffzjVIE tds55Onji6gS90CQhfDsWuBr+g== X-Received: by 2002:a19:910a:0:b0:4f8:7568:e953 with SMTP id t10-20020a19910a000000b004f87568e953mr1720528lfd.35.1688119886617; Fri, 30 Jun 2023 03:11:26 -0700 (PDT) Received: from [192.168.10.46] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id m8-20020adffe48000000b002c71b4d476asm18041198wrs.106.2023.06.30.03.11.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jun 2023 03:11:26 -0700 (PDT) Message-ID: <2d59de0d-5011-780a-cb6c-94e6e2b74156@linaro.org> Date: Fri, 30 Jun 2023 12:11:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/1] thermal: sysfs: avoid actual readings from sysfs Content-Language: en-US To: "Rafael J. Wysocki" , Eduardo Valentin Cc: eduval@amazon.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria , Zhang Rui References: <20230607003721.834038-1-evalenti@kernel.org> <7616fd9d-aa0d-2ecd-8751-894b1c9073c0@linaro.org> <75eba2da-593f-f3bd-4eac-5155fcf5aee8@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,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 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. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog