Re: [PATCH 4/4] thermal: core: genetlink support for events/cmd/sampling

From: Daniel Lezcano
Date: Fri May 15 2020 - 11:09:36 EST


On 15/05/2020 16:43, Srinivas Pandruvada wrote:
> On Fri, 2020-05-15 at 16:10 +0200, Daniel Lezcano wrote:
>> Initially the thermal framework had a very simple notification
>> mechanism to send generic netlink messages to the userspace.
>>
>> The notification function was never called from anywhere and the
>> corresponding dead code was removed. It was probably a first attempt
>> to introduce the netlink notification.
>>
>> At LPC2018, the presentation "Linux thermal: User kernel interface",
>> proposed to create the notifications to the userspace via a kfifo.
>>
>> The advantage of the kfifo is the performance. It is usually used
>> from
>> a 1:1 communication channel where a driver captures data and send
>> them
>> as fast as possible to an userspace process.
> Shall I submit my RFC using KFifo on top of this series? Any
> objections?

ATM the notification is not plugged with any thermal core code path. It
is separated on purpose in order to let your RFC to get some comments.

If you want to base your RFC on top of it, I'm perfectly fine with that.

I'll review your RFC now, I wanted to do that before but got busy with
another stuff.

If you want to compare kfifo and netlink, the userspace test programs
are at:

https://git.linaro.org/people/daniel.lezcano/thermal-genl.git/

IMO, using the kfifo for the sampling and the notifications/the commands
via netlink would make more sense.


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