Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbeAPKAv (ORCPT + 1 other); Tue, 16 Jan 2018 05:00:51 -0500 Received: from mail-pg0-f50.google.com ([74.125.83.50]:42614 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751691AbeAPKAq (ORCPT ); Tue, 16 Jan 2018 05:00:46 -0500 X-Google-Smtp-Source: ACJfBot0o7M3Ja/hYTIPrKWABaWHPsbxtDaYMJI+Ocy+NyQrVjO3LN1tvyqiThlelEsH/OlUnarYng== Date: Tue, 16 Jan 2018 15:30:42 +0530 From: Viresh Kumar To: Eduardo Valentin Cc: Zhang Rui , Vincent Guittot , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] thermal: Add cooling device's statistics in sysfs Message-ID: <20180116100042.GJ22978@vireshk-i7> References: <087186fecdfd85bead58e110cf8bf7ccdfab517b.1515663078.git.viresh.kumar@linaro.org> <20180112174606.GA11076@localhost.localdomain> <20180115044616.GC22978@vireshk-i7> <20180115163221.GA3756@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180115163221.GA3756@localhost.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 15-01-18, 08:32, Eduardo Valentin wrote: > Same set you added for cooling devices should also be reflected on > thermal zones, but instead of cooling state, you want to do the account > on trips, at least for the context of this patch set. I never dived deep into the thermal core earlier and never had to implement any SoC side of it as well, so consider me a newbie here :) I tried to look into the core on what I can do to get some stats out for the zones, but I am a bit confused. handle_thermal_trip() looked to be the function where I could update stats but then I realized that this is artificially called for every possible trip in most of the cases from thermal_zone_device_update() and so this can't be the real place. Does it mean that this needs to be updated somehow from the thermal governor's, ->throttle() callback? I am not sure if doing it from every governor code is what we want to do. And then the trip point of cooling devices can be different within the same thermal zone. And so I posted the first patch again without thermal zone stuff in it as that would take more time. -- viresh