Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp95828iog; Thu, 23 Jun 2022 23:27:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1teZ+K7MduVkQGNGuhN8TFWTIZMf6X1xZ0FlI8xj8DyI1FbSiOqaEwLPTl2Pks8m6I5n6Mm X-Received: by 2002:a17:906:1018:b0:718:dd3f:f28c with SMTP id 24-20020a170906101800b00718dd3ff28cmr12013764ejm.55.1656052043680; Thu, 23 Jun 2022 23:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656052043; cv=none; d=google.com; s=arc-20160816; b=ySimrLryWbTbQgHdIKPnRACIc6CLGq9tM8K3RXpqWb9jofn1JhRON7jHBgQnTfL3PS BI99O7oW591VMquwWbZIoBlDazged/0F9inxSJ8NHsGMX5JR8rfBS1Jrq121xwlphIjw tfYJgrp2gs80EsfE0WrbNK8G/1GfYSLSJda3y39RSpu2+j/qtHdMMsWjgX2UAuB75dAj /Lzs9oXOu3Clfwgegvp952/koAnB2Z//UxzuMItzTlJwGli6ZlFHmyw0rY5POtXyUCdE ELS7Xx+bRyQcBDP4rWfq+hitPpLe0utuHWpykSjqBtYrYmUWfDsLzr80vhLDpw6+Pyys 4nRA== 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 :dkim-signature; bh=+LB609c/jYmQtqojEPch2ria3pGib1paFUkDRzDn6ac=; b=e88+XnF9kfDfF1JB0ejo5WTx6z59ICDbwDZgr0IhA+ID6uq1x2iZWsyfdoMzYf22j+ KXIDSNAnfBigeHcd4/JUtO6U6ict0h5ovcPhDTGjt+3YY35waHMmWhFMQu7IewtjU9TS dz+Rbhk1V8YNqLOnHGTgyPi97O23Mp0OVfq4bbbu+YUJgjLNJKjVBFP4LwHp5S6nH0O8 td0JO1p2pEkUkOTyyHQJpG8a/wwwxJGNMxXCaaFZQlQLztPYKlkb6VWaqz7DeJ+vokNt Pr5qStxBG/ntnVj87seeMmoD6cYRzaaJj+LfxdxAgRmNJs28ESZHSZX+vrElcEAQgTwB u2ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=I3bfm4XD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga4-20020a1709070c0400b0070f1226eabbsi1587823ejc.681.2022.06.23.23.26.58; Thu, 23 Jun 2022 23:27:23 -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=@google.com header.s=20210112 header.b=I3bfm4XD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230203AbiFXGCw (ORCPT + 99 others); Fri, 24 Jun 2022 02:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbiFXGCv (ORCPT ); Fri, 24 Jun 2022 02:02:51 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E83769270 for ; Thu, 23 Jun 2022 23:02:50 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id e2so1982993edv.3 for ; Thu, 23 Jun 2022 23:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+LB609c/jYmQtqojEPch2ria3pGib1paFUkDRzDn6ac=; b=I3bfm4XDkKJiTYM8lT+COphHeM4VHVojYTWh5p+4beMt3kfoXt+YHBeZJQeNt80HF5 8Xk/cS1yGnBWeaf81Cc6elRO1ziuf7/GHURaz5se1841pydRMxIXtSQEqPJUPPWF4S5B 3I4imrdorm/sWyCfPOtU8RPRYlvn94balDGiZYFuOqHXOHzeJ/HzfGPo5XgTb/2X2aD2 nkHKe3Q5e0djZyqTmIj4k5qwIaHBMb1TyVmHHzWTxEsVtr2VCSPlgJWAlJ+DRVBgprDe KyIMi57snvs6H7uvYQCkLTF4+WGlzWEXu3APE57wqEfZ/dzaZ9VQQx/d9smbGiftYdm8 KXuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+LB609c/jYmQtqojEPch2ria3pGib1paFUkDRzDn6ac=; b=OqMyLSQF0Pj/Lb58s17cnE9gNR5QdkFu9cYD1ecjznlYKgt4M6S04dWwi/+S248fWH o9ua7Ieo41a9Zek8mZnRQO0upc3NMTo55Z/R6XshqwOFkSuqHjGAYcaAHLYYUmcWx0K7 1fJAvwNPzvE48TCTaY61I6+qwHT/euP3EKYt0mJIPUn6D43urfq54GGem0VHZZHEbggu n5HFS5l6GFSE7+bmbfydamMpzT09uB00FBnUI9oAlQyV0BODt88u7HVBQzguRUnAlgGV RItvfwoT9JK9CWgmN5aPJdcGfrAO/S5xepypSrpspfiYZSB+sBjbu2Du0bqVqfjEY9L3 MfMQ== X-Gm-Message-State: AJIora8aGrFi7S3biELiI/f35lf5cT8Bg8aoEZc+yUDc5ESj4A3iPjpw NuMJ7SN//JqPcMB5o+P/Ly8oyc9IjJsC+/csW31MJYjwT7o= X-Received: by 2002:a05:6402:354d:b0:435:93f9:fc0b with SMTP id f13-20020a056402354d00b0043593f9fc0bmr15474165edd.288.1656050568672; Thu, 23 Jun 2022 23:02:48 -0700 (PDT) MIME-Version: 1.0 References: <20220601151441.9128-1-daniel.lezcano@linaro.org> <20220601151441.9128-3-daniel.lezcano@linaro.org> <0ca654c0-d7b4-b955-7e9b-542452659694@linaro.org> In-Reply-To: <0ca654c0-d7b4-b955-7e9b-542452659694@linaro.org> From: Wei Wang Date: Thu, 23 Jun 2022 23:02:37 -0700 Message-ID: Subject: Re: [PATCH 3/3] thermal/sysfs: Remove cooling device sysfs statistics To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Fri, Jun 3, 2022 at 4:04 AM Daniel Lezcano w= rote: > > > Hi Todd, > > [adding Wei] > > On 02/06/2022 21:02, Todd Kjos wrote: > > On Thu, Jun 2, 2022 at 2:16 AM Lukasz Luba wrote: > > [ ... ] > > >> I see, it makes sense. Let's see if Todd and Android folks don't > >> use this thermal sysfs stats, so we could remove them. > > > > Android HALs do use the thermal sysfs stats. debugfs isn't a viable > > replacement since debugfs must not be mounted during normal operation. > > Thanks for your answer. > > I'm curious, what is the purpose of getting the statistics, especially > the transitions stats from normal operation? > > There were some complains about systems having a high number of cooling > devices with a lot of states. The state transitions are represented as a > matrix and result in up to hundred of megabytes of memory wasted. > > Moreover, sysfs being limited a page size, the output is often truncated. > > As it is automatically enabled for GKI, this waste of memory which is > not negligible for system with low memory can not be avoided. > > I went through the thermal HAL but did not find an usage of these > statistics, do you have a pointer to the code using them ? > > Thanks > > -- Daniel > > Sorry for the late reply, trying to catch up on emails after sick recovery. We use it for stats collection to understand thermal residency, and it is not in the HAL code, we don't use the transition table heavily though. Are some of the devices having too many cooling devices? Can we have a config to enable stats for a given cooling device? Thanks! -Wei > > -- > Linaro.org =E2=94=82 Open source software for AR= M SoCs > > Follow Linaro: Facebook | > Twitter | > Blog