Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6293609ioo; Thu, 2 Jun 2022 03:24:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFM8HlFLcddkI/4SmoIIOe0rvX87SW9bpiZKPta2Qvvhjaj4cteNrTTVXFlcpnj5x0cCSe X-Received: by 2002:a17:902:f70e:b0:15f:28b6:ad58 with SMTP id h14-20020a170902f70e00b0015f28b6ad58mr4291774plo.24.1654165450713; Thu, 02 Jun 2022 03:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654165450; cv=none; d=google.com; s=arc-20160816; b=hjAYoSmRndDIBRndsrzMyKY9bQG01iIyL12lNIM3yd1JgRXyev8zAtj9ZwbiK37mpW 4aMa8EJKCYdlNUOljoDpwK6GR2cwpmng0Jr1LGMU2wTC5SR2MWWSoLUwpsFoN1nKi45j GJYs4SY4MkoxdcUAdFH3JcFwDrS42upI+U5Il3l453emwRPBXtwdHhg828DVely3Eggh 5VkSUFRzIm5lWz+T2T/DHXUG9A2cdZezgEysKYzGqOHsIcmfZ09ybPfMCqF/MsUnPvmh G22PlsqmfcqyG9bLR8FC6fSbH4R4xeF3X56grcEYGZqL+hbCPK7SN4UfHOJDjcIYR8YO GeMA== 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; bh=KI1EzZMLsfI68HSVC99peWY0cIw1RpSVbe2dAGVYT5c=; b=Nt2WoDCk6vxJwYIQZSW+hKF1IYLqTug9S0xBO2vLudqqhdJaZE4oq8tv+8HU+d7rFE PsRYDvxCNF1tMeMNZQZe4ndabSrUkLGVeiIfiRBs+quMBvC5RMjPq8nVTvfCurpACRHG vB+IZKuOxWrthoSjsFZ1W0OXNzN19XVxThVczfRPRxSImKWoAcrpxs8syiZ7kGoc29vS CX0+H1K3CQv22Vht5WJqazPo1ZjF/1IfGPFHmnNsc1borKZzhRyXq/AVhveSE1jrjNJg +SN8L+sdFg6YKGdzAuKI4WiTb9fIE93o5EtY57watvj/Re+IB66wSncO5NUuhj1Cb7e2 Zo7g== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm18-20020a056a00339200b0051bc3f8dd1fsi2485923pfb.38.2022.06.02.03.23.56; Thu, 02 Jun 2022 03:24:10 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbiFBJQa (ORCPT + 99 others); Thu, 2 Jun 2022 05:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbiFBJQ3 (ORCPT ); Thu, 2 Jun 2022 05:16:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B18912612; Thu, 2 Jun 2022 02:16:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A39781063; Thu, 2 Jun 2022 02:16:27 -0700 (PDT) Received: from [10.57.38.114] (unknown [10.57.38.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 309D93F766; Thu, 2 Jun 2022 02:16:26 -0700 (PDT) Message-ID: Date: Thu, 2 Jun 2022 10:16:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 3/3] thermal/sysfs: Remove cooling device sysfs statistics Content-Language: en-US To: Daniel Lezcano Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, quic_manafm@quicinc.com, Amit Kucheria , Zhang Rui , Todd Kjos References: <20220601151441.9128-1-daniel.lezcano@linaro.org> <20220601151441.9128-3-daniel.lezcano@linaro.org> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 6/2/22 09:37, Daniel Lezcano wrote: > > Hi Lukasz, > > [Adding Todd] > > On 01/06/2022 17:33, Lukasz Luba wrote: >> Hi Daniel, >> >> >> On 6/1/22 16:14, Daniel Lezcano wrote: >>> The statistics are for debugging purpose and belong to debugfs rather >>> than sysfs. As the previous changes introduced the same statistics in >>> debugfs, those in sysfs are no longer needed and can be removed. >> >> I just want to let you know that in current Android kernels we cannot >> even compile the kernel with CONFIG_DEBUG_FS. > > Right, it makes sense. Precisely, with the sysfs stats they are always > compiled in for the Android kernel and is a problem for low memory > systems. While debugfs can fulfill its purpose in the developement and > will be removed in production systems. True. > >> I have this pain with >> Energy Model there... Some vendors might see useful info via this >> sysfs interface in bring-up of the SoC. > > Well alternatively, information can be extracted from procfs in the > device-tree description. > > What prevents to add energy information in sysfs now that the energy > model is per device ? Probably nothing, but we need strong need. I have proposed this a few times internally, but this must have a requirement. If a user-space tool would ask for it, then I could send a patch exposing the sysfs. So far we have only one user-space tool, which suffers the missing debugfs EM dir: LISA (but we are working on a workaround for it). If you have a tool or plan to have such, which uses EM, please let me know. I'm gathering the requirements. > >> I don't know if there are user-space tools tracking this >> information via sysfs. We probably should check that. >> >> I agree that these statistics look more like debug info, rather than >> something useful for control. >> >> Furthermore, we have trace events for the cooling state changes, which >> should be good enough for bring-up and experiments. >> >> I don't have strong preferences here. I tend to agree to remove this >> interface if there are no user-space tools using it. > > I agree userspace can also get information about the transition but the > goal of the debugfs is also add information about thermal internals like > average temperature at mitigation time, min and max, timings, etc ... > > 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.