[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <71c94b53-5945-bc91-18ce-b5ef7ba9ec3c@linaro.org>
Date: Fri, 16 Feb 2018 18:39:35 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: edubezval@...il.com, kevin.wangtao@...aro.org, leo.yan@...aro.org,
vincent.guittot@...aro.org, amit.kachhap@...il.com,
linux-kernel@...r.kernel.org, Zhang Rui <rui.zhang@...el.com>,
Javi Merino <javi.merino@...nel.org>,
"open list:THERMAL" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 5/8] thermal/drivers/cpu_cooling: Introduce the cpu idle
cooling driver
Hi Viresh,
sorry for the late reply.
On 09/02/2018 10:41, Viresh Kumar wrote:
> On 07-02-18, 11:34, Daniel Lezcano wrote:
>> On 07/02/2018 10:12, Viresh Kumar wrote:
>>> What about cpuidle_cooling_unregister() ?
>>
>> The unregister function is not needed because cpuidle can't be unloaded.
>> The cpuidle cooling device is registered after the cpuidle successfully
>> initialized itself, there is no error path.
>
> Okay, then there are two more things here.
>
> First, you don't need a kref in your patch and simple counter should
> be used instead, as kref is obviously more heavy to be used for the
> single error path here.
I prefer to keep the kref for its API.
And I disagree about the heavy aspect :)
struct kref {
refcount_t refcount;
};
> Secondly, what about CPU hotplug ? For example, the cpu-freq cooling
> device gets removed currently if all CPUs of a cluster are
> hotplugged-out. But with your code, even if the CPUs are gone, their
> cpu-idle cooling device will stay.
Yes and it will continue to compute the state, so if new CPUs are
inserted the cooling device automatically uses the cooling state.
I don't see a problem with that.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists