Re: [GIT PULL] RESEND: thermal for v5.9-rc1

From: Daniel Lezcano
Date: Fri Aug 07 2020 - 05:40:10 EST



Hi Linus,


On 07/08/2020 04:43, Linus Torvalds wrote:
> On Thu, Aug 6, 2020 at 1:19 PM Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> wrote:
>>
>>
>> - Add generic netlink support for userspace notifications: events,
>> temperature
>> and discovery commands (Daniel Lezcano)
>
> This is "default y".
>
> Why?
>
> The help text doesn't explain either.
>
> Please explain, or remove the default y. We don't add new features and
> then try to force people to use them by enabling them by default.
>
> "default y" is mainly for when something unconditional gets split up
> and becomes conditional (so now "default y" means that you don't break
> peoples setups when they don't even know what it is).
>
> Alternatively, "default y" is for things that are make peoples lives
> immeasurably better somehow, and it would be a crime to not enable it
> because it's _so_ wonderful.

Well, I won't argue the netlink notification is so that fantastic but it
is a feature that was needed since a long time. A previous partial
implementation was directly compiled-in and then removed [1] because
there were no user as it is and we wanted to introduce a clean new
notification framework based in our previous discussion at Linux
Plumbers Conference [2] but that needed some cleanups of the thermal
core code before.

This netlink framework fulfills the needs of the thermal daemons for
Intel, Android HAL and SoC vendors which are hacking the thermal
framework or constantly polling the temperature.

Because the compilation failed if CONFIG_NET=n, the Kconfig option was
introduced afterwards [3]. It could have been directly handled in the
code with a 'ifdef' directive without option but it sounded more
convenient to at least give the opportunity to opt-out the notification.

It defaults to 'y' because the previous (but unused) implementation was
unconditionally compiled-in and because of the thermal users needs.

Is default=y wrong given this history?

-- Daniel


[1] https://patchwork.kernel.org/patch/11202093/
[2]
https://www.linuxplumbersconf.org/event/2/contributions/185/attachments/39/46/LPC_2018_Thermal-Srinivas-Rui.pdf
[3]
https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=thermal/next&id=5b8583d3bd7fc10cea07e4a5bfa59465758a39dc


> So far, I'm not convinced we've ever hit that second case.
>
> Convince me that the thermal layer is so magical that it really
> warrants it. Tell me why and how my life is improved by enabling it.
>
> Linus
>


--
<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