lkml.org 
[lkml]   [2022]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 2/7] RDMA/rxe: Convert the triple tasklets to workqueues
From

在 2022/9/11 23:08, Bart Van Assche 写道:
> On 9/11/22 00:10, Yanjun Zhu wrote:
>> I also implemented a workqueue for rxe. IMO, can we add a variable to
>> decide to use tasklet or workqueue?
>>
>> If user prefer using tasklet, he can set the variable to use
>> tasklet. And the default is tasklet. Set the variable to another
>> value to use workqueue.
>
> I'm in favor of removing all uses of the tasklet mechanism because of
> the disadvantages of that mechanism. See also:
> * "Eliminating tasklets" (https://lwn.net/Articles/239633/).
> * "Modernizing the tasklet API" (https://lwn.net/Articles/830964/).
> * Sebastian Andrzej Siewior's opinion about tasklets
> (https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/).

Thanks, Bart

https://lwn.net/Articles/239633/ is to remove tasklet. But
https://lwn.net/Articles/240323/ describes the difference between
workqueue and tasklet.

I am not sure whether the difference between tasklet and workqueue in
the link https://lwn.net/Articles/240323/ is resolved. If you know,
please also let me know.

And in the link https://lwn.net/Articles/830964/ and
https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/, tasklet can
be replaced by workqueue, timers or thread interrupts.

"

In current kernels, tasklets can be replaced by workqueues, timers, or
threaded interrupts. If threaded interrupts are used, the work may just
be executed in the interrupt handler itself. Those newer mechanisms do
not have the disadvantages of tasklets and should satisfy the same
needs, so developers do not see a reason to keep tasklets. It seems that
any migration away from tasklets will be done one driver (or subsystem)
at a time. For example, Takashi Iwai already reported having the
conversion ready for sound drivers.

"

And in the link
https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/, Sebastian
thought that threaded interrupts are a good substitute to tasklet.

To me, after I have implemented workqueue in rxe, I did not find any
benefits with workqueue. And sometime the latency is worse with workqueue.

This is why I do not send the workqueue commits to upstream maillist.

I am not sure whether it is a good idea to replace tasklet with
workqueue or not.

Let me do more readings in linux upstream maillist.

Zhu Yanjun

>
> Thanks,
>
> Bart.
>

\
 
 \ /
  Last update: 2022-09-12 10:28    [W:0.073 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site