Re: [PATCH] media: rc: refactor raw handler kthread

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

 



On Mon, Dec 26, 2016 at 02:01:31PM +0100, Heiner Kallweit wrote:
> Am 02.08.2016 um 07:44 schrieb Heiner Kallweit:
> > I think we can get rid of the spinlock protecting the kthread from being
> > interrupted by a wakeup in certain parts.
> > Even with the current implementation of the kthread the only lost wakeup
> > scenario could happen if the wakeup occurs between the kfifo_len check
> > and setting the state to TASK_INTERRUPTIBLE.
> > 
> > In the changed version we could lose a wakeup if it occurs between
> > processing the fifo content and setting the state to TASK_INTERRUPTIBLE.
> > This scenario is covered by an additional check for available events in
> > the fifo and setting the state to TASK_RUNNING in this case.
> > 
> > In addition the changed version flushes the kfifo before ending
> > when the kthread is stopped.
> > 
> > With this patch we gain:
> > - Get rid of the spinlock
> > - Simplify code
> > - Don't grep / release the mutex for each individual event but just once
> >   for the complete fifo content. This reduces overhead if a driver e.g.
> >   triggers processing after writing the content of a hw fifo to the kfifo.
> > 
> > Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> 
> Sean added a review comment and his "Tested-by" a month ago.
> Anything else missing before it can be applied?

I have it applied here:

https://git.linuxtv.org/syoung/media_tree.git/log/?h=for-v4.11a

I'll ask Mauro to pull that tree soon, now that 4.10-rc1 has been
merged. I need to do some testing.


Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux