Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp738081pxb; Thu, 21 Oct 2021 08:33:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxijfhNqpoVjyOYqskapcwJLkNQp0M4TCZWgNjCE7ah5rXT4KpDEk8qM7TzuJAKjJWrhlCx X-Received: by 2002:a17:903:3092:b0:13f:663d:f008 with SMTP id u18-20020a170903309200b0013f663df008mr5876021plc.13.1634830421728; Thu, 21 Oct 2021 08:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634830421; cv=none; d=google.com; s=arc-20160816; b=lqpX9qhMCfpoktxi+oDVU3EdM22A70eDsQKZHqF20sl+GntqxdVaZCtlmkNO4hfS0n 9cJtb0DQfvQtBg2zt65m+51oHKi+EnXKJ1EzrsCC5ZefFItjyEW4drbOMzQqip8uInTm eSHQ777e5uKInsjl+LqZH4cnJjmu67u2wZWeOxS/O5qGAPy7IDWiKe6nhxprGgiqubuu B1zkqIozqIkn4b+qnmpD8yQr0ss8ujHd5BUUgUWGWp+d7BEhVFeCp+BXrig9yvlA4TsZ 5F/aegz+t56mciEuQSBhs00Q5J+rzDAH8axVTxP6yiWdtsAofY7G7rYXxLga1PH5qhSe RqKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=JdqKvzdcRSSC835ihu6sIUCxjSeeF0hs3Y8UBi5uwmc=; b=p+dg8A76yUZTHMUudwFid9CjcXPwZ9mP45A8am0btJ+F+gW0HX78bAud9Ak+389Uh5 NvfAZdvR5D8/H/PSVfVyc5fXGhGfJAHtS27+MPYBIuwMietvBcvoJr2xMZi7SvoEuEvl 6+dILQ1L44pzVVwDKAa5b+6RWM4+2UNfGDnlrkUhQcckHEUfTEXBsrhCj7x9YKleKWdg 2PqNdFndavYOIu8gRUy2rcaoXywGNKSzLp70pPu2Xg6LKi8GebK42ZfE+lcEcwf3WTkn f0lsqN47CSwFCo+tPiJVMKJd6Rh1rIqYOPzobiRT68DvfG0PksSakkKeL4/JrJMXI+dF a4Dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si7286018pgj.194.2021.10.21.08.33.28; Thu, 21 Oct 2021 08:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231865AbhJUPcu (ORCPT + 99 others); Thu, 21 Oct 2021 11:32:50 -0400 Received: from foss.arm.com ([217.140.110.172]:44314 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbhJUPcs (ORCPT ); Thu, 21 Oct 2021 11:32:48 -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 58B57D6E; Thu, 21 Oct 2021 08:30:32 -0700 (PDT) Received: from [10.57.21.86] (unknown [10.57.21.86]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 21CC43F694; Thu, 21 Oct 2021 08:30:30 -0700 (PDT) Subject: Re: [PATCH v3 1/2] thermal/core: Make the userspace governor deprecated To: Daniel Lezcano Cc: rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Zhang Rui , Amit Kucheria References: <20211019163506.2831454-1-daniel.lezcano@linaro.org> <6372f16d-7d2d-cb1e-be86-23b21b41816b@linaro.org> From: Lukasz Luba Message-ID: <942b9998-9858-7776-97b7-b5ac1c637a2e@arm.com> Date: Thu, 21 Oct 2021 16:30:28 +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: <6372f16d-7d2d-cb1e-be86-23b21b41816b@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 Hi Daniel, On 10/20/21 11:47 AM, Daniel Lezcano wrote: > > Hi Lukasz, > > Do you agree with these changes ? Yes, I agree with these changes. > > On 19/10/2021 18:35, Daniel Lezcano wrote: >> The userspace governor is sending temperature when polling is active >> and trip point crossed events. Nothing else. >> >> AFAICT, this governor is used with custom kernels making the userspace >> governor co-existing with another governor on the same thermal zone >> because there was no notification mechanism, implying a hack in the >> framework to support this configuration. >> >> The new netlink thermal notification is able to provide more >> information than the userspace governor and give the opportunity to >> the users of this governor to replace it by a dedicated notification >> framework. >> >> The userspace governor will be removed as its usage is no longer >> needed. >> >> Add a warning message to tell the userspace governor is deprecated. >> >> Signed-off-by: Daniel Lezcano >> Acked-by: Rafael J. Wysocki >> --- >> drivers/thermal/gov_user_space.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/drivers/thermal/gov_user_space.c b/drivers/thermal/gov_user_space.c >> index 82a7198bbe71..f4fe050e1cbc 100644 >> --- a/drivers/thermal/gov_user_space.c >> +++ b/drivers/thermal/gov_user_space.c >> @@ -15,6 +15,14 @@ >> >> #include "thermal_core.h" >> >> +static int user_space_bind(struct thermal_zone_device *tz) >> +{ >> + pr_warn("Userspace governor deprecated: use thermal netlink " \ >> + "notification instead\n"); >> + >> + return 0; >> +} >> + >> /** >> * notify_user_space - Notifies user space about thermal events >> * @tz: thermal_zone_device >> @@ -43,5 +51,6 @@ static int notify_user_space(struct thermal_zone_device *tz, int trip) >> static struct thermal_governor thermal_gov_user_space = { >> .name = "user_space", >> .throttle = notify_user_space, >> + .bind_to_tz = user_space_bind, >> }; >> THERMAL_GOVERNOR_DECLARE(thermal_gov_user_space); >> > > You can add: Reviewed-by: Lukasz Luba Regards, Lukasz