From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3C9EEB64DA for ; Fri, 30 Jun 2023 10:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233061AbjF3KLe (ORCPT ); Fri, 30 Jun 2023 06:11:34 -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-Google-Smtp-Source: APBJJlGnhWJ4b9VxEgxH1ES2aQkjiqmgJhB9RNzeKyXcqPp/Vv6GLW4EAwOh/lUJ173h512qaK8yiA== 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 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