Re: [PATCH v2 02/10] ALSA: firewire: convert tasklets to use new tasklet_setup() API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 02 Sep 2020 10:44:43 +0200,
Takashi Sakamoto wrote:
> 
> To Iwai-san,
> 
> I'm review your patch in 'test/kill-tasklet' branch in sound.git[1].
> Although I agree with the direction to obsolete tasklet usage with
> workqueue, 'in_interrupt()' helper function is used in two lines in
> 'sound/firewire/amdtp-stream.c' since it's convenient to distinguish
> running context (any softirq or user task). We need enough care of
> the cases about which below two patches mention:
> 
>  * 1dba9db0eaa6 ('ALSA: firewire-lib: permit to flush queued packets
>    only in process context for better PCM period granularity')
>  * 4a9bfafc64f4 ('ALSA: firewire-lib: Fix stall of process context
>    at packet error)
> 
> As long as I know, we have no helper function to distinguish workqueue
> task from user task. The simple replacement is not good way in the case.

Thanks for pointing this out, it was indeed an overlook.

We can use current_work() to check whether the current task comes from
the dedicated work or not, e.g.

	if (current_work() == &myobject->some_work)
		its_from_my_work();


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux