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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1CBAC433EF for ; Fri, 1 Oct 2021 11:11:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D33136136A for ; Fri, 1 Oct 2021 11:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353787AbhJALNi (ORCPT ); Fri, 1 Oct 2021 07:13:38 -0400 Received: from foss.arm.com ([217.140.110.172]:40486 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352896AbhJALNh (ORCPT ); Fri, 1 Oct 2021 07:13:37 -0400 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 0F548106F; Fri, 1 Oct 2021 04:11:53 -0700 (PDT) Received: from [10.57.23.247] (unknown [10.57.23.247]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 034B43F70D; Fri, 1 Oct 2021 04:11:51 -0700 (PDT) Subject: Re: [RFD] Remove the userspace governor and the cooling device set state sysfs entry To: Daniel Lezcano Cc: Zhang Rui , "Rafael J. Wysocki" , Linux Kernel Mailing List , Linux PM mailing list References: <39728f24-7781-543c-ad28-fd1c7552d96a@arm.com> <2b8300b2-4678-3e3c-71e3-6d276b99eb07@linaro.org> From: Lukasz Luba Message-ID: Date: Fri, 1 Oct 2021 12:11:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <2b8300b2-4678-3e3c-71e3-6d276b99eb07@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/1/21 11:30 AM, Daniel Lezcano wrote: > > Hi Lukasz, > > On 30/09/2021 12:10, Lukasz Luba wrote: >> Hi Daniel, >> >> On 9/22/21 10:59 AM, Daniel Lezcano wrote: >>> >>> Hi, >>> >>> the userspace governor is sending temperature when polling is active and >>> trip point crossed events. Nothing else. >>> >>> In the other side, the cooling device have their cooling device >>> set_cur_state read-writable all the time. >>> >>> The thermal framework is wrongly used by userspace as a power capping >>> framework by acting on the cooling device opaque state. This one then >>> competes with the in-kernel governor decision. >>> >>> As the new netlink thermal notification is able to provide the same >>> information than the userspace governor. >>> >>> I propose to remove the userspace governor and the cur_state entry in >>> the sysfs exported file. >>> >>> The DTPM framework is the right framework to do power capping and >>> moreover it deals with the aggregation via the dev pm qos. >>> >>> Does it make sense ? >> >> It sounds that we should be OK with the information from netlink. >> I don't see objections. We can also extend the netlink packet when >> needed. I'm fine with removing the user-space governor. > > thank you for your answer. I'll propose a patch with a warn when the > userspace governor is registered in order to let know people the > governor is deprecated. > > Probably, it would make sense to emit a warning also when the cooling > device state is set from userspace. > > For the next release, we should be able to drop the userspace governor > and make the cooling device state read-only. > > Does it make sense ? > > Yes, it makes sense.