From: Sean Young <sean@mess.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] media: rc: refactor raw handler kthread
Date: Tue, 27 Dec 2016 11:17:30 +0000 [thread overview]
Message-ID: <20161227111729.GA3374@gofer.mess.org> (raw)
In-Reply-To: <727717c2-8529-691f-282a-cb57c997c922@gmail.com>
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@gmail.com>
>
> 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
prev parent reply other threads:[~2016-12-27 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 5:44 [PATCH] media: rc: refactor raw handler kthread Heiner Kallweit
2016-11-25 9:59 ` Sean Young
2016-12-26 13:01 ` Heiner Kallweit
2016-12-27 11:17 ` Sean Young [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161227111729.GA3374@gofer.mess.org \
--to=sean@mess.org \
--cc=hkallweit1@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).