From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Shubhrajyoti Datta
<shubhrajyoti.datta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Xander Huff" <xander.huff-acOepvfBmUk@public.gmane.org>,
jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
knaack.h-Mmb7MZpHnFY@public.gmane.org,
"Peter Meerwald" <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
"Michal Simek"
<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
"Sören Brinkmann"
<soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-rt-users-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
joe.hershberger-acOepvfBmUk@public.gmane.org,
joshc-acOepvfBmUk@public.gmane.org,
nathan.sullivan-acOepvfBmUk@public.gmane.org,
jaeden.amero-acOepvfBmUk@public.gmane.org
Subject: Re: [PATCH v3] iio: adc: xilinx-xadc: Push interrupts into threaded context
Date: Tue, 04 Aug 2015 10:05:00 +0200 [thread overview]
Message-ID: <55C0722C.7080904@metafoo.de> (raw)
In-Reply-To: <CAKfKVtGegy2P_YWQAtKEzByN-+q+bq=uus4zNvO4sghXRjpGPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 08/04/2015 07:34 AM, Shubhrajyoti Datta wrote:
> On Fri, Jul 24, 2015 at 6:08 PM, Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org> wrote:
>> Hi,
>>
>> Sorry, but I don't think this patch has been sufficiently tested against a
>> mainline kernel. The driver wont even probe the way it is right now.
>>
>> On 07/21/2015 01:14 AM, Xander Huff wrote:
>>>
>>> The driver currently registers a pair of irq handlers using
>>> request_threaded_irq(), however the synchronization mechanism between the
>>> hardirq and the threadedirq handler is a regular spinlock.
>>
>>
>> If everything runs in threaded context we don't really need the spinlock
>> anymore and can use the mutex throughout.
>
> that should be better from the performance point of view.
>
>>
>>>
>>> Unfortunately, this breaks PREEMPT_RT builds, where a spinlock can sleep,
>>> and is thus not able to be acquired from a hardirq handler. This patch
>>> gets
>>> rid of the hardirq handler and pushes all interrupt handling into the
>>> threaded context.
>>
>>
>> We actually might as well run everything in the hardirq handler (which will
>> be threaded in PREEMPT_RT). The reason why we have the threaded handler is
>> because xadc_handle_event() used to sleep, but it doesn't do this anymore.
>
> The point is why have the hard irq. If we use hardirq then not mutex
> can be used and spinlock will
> be busy.
Well there is no need to use a threaded IRQ. The interrupt handler is quite
small and doesn't take too much time and doesn't have any delays or sleeps
in it either.
next prev parent reply other threads:[~2015-08-04 8:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 15:38 [PATCH] iio: adc: xilinx-xadc: Convert to raw spinlock Xander Huff
[not found] ` <1431013090-18996-1-git-send-email-xander.huff-acOepvfBmUk@public.gmane.org>
2015-05-14 17:10 ` Sebastian Andrzej Siewior
[not found] ` <20150514171038.GG13442-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2015-05-14 22:45 ` Xander Huff
[not found] ` <55552570.5050407-acOepvfBmUk@public.gmane.org>
2015-05-18 21:17 ` Sebastian Andrzej Siewior
2015-05-23 11:36 ` Jonathan Cameron
[not found] ` <20150518211728.GC4275-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2015-06-07 15:29 ` Jonathan Cameron
[not found] ` <5574633F.7090004-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-08 14:44 ` Xander Huff
2015-07-08 21:38 ` [PATCH v2] iio: adc: xilinx-xadc: Push interrupts into threaded context Xander Huff
2015-07-14 14:28 ` Sebastian Andrzej Siewior
2015-07-15 15:59 ` Xander Huff
[not found] ` <CAKfKVtGTO81wLWk50M303t2WjcBEMEt_LUnsJ3_WmvR_3izUjg@mail.gmail.com>
[not found] ` <CAKfKVtGTO81wLWk50M303t2WjcBEMEt_LUnsJ3_WmvR_3izUjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-15 15:57 ` Xander Huff
2015-07-20 23:14 ` [PATCH v3] " Xander Huff
[not found] ` <1437434050-32907-1-git-send-email-xander.huff-acOepvfBmUk@public.gmane.org>
2015-07-24 12:38 ` Lars-Peter Clausen
[not found] ` <55B231DE.4080308-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-08-03 20:18 ` Xander Huff
[not found] ` <55BFCC9C.5040305-acOepvfBmUk@public.gmane.org>
2015-08-04 8:01 ` Lars-Peter Clausen
2015-08-11 23:00 ` [PATCH v4] iio: adc: xilinx-xadc: Push interrupts into hardirq context Xander Huff
[not found] ` <1439334049-28671-1-git-send-email-xander.huff-acOepvfBmUk@public.gmane.org>
2015-08-12 15:17 ` Lars-Peter Clausen
[not found] ` <55CB6391.7060502-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-08-12 16:33 ` Sebastian Andrzej Siewior
[not found] ` <55CB7558.3090608-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2015-08-15 19:55 ` Jonathan Cameron
2015-08-04 5:34 ` [PATCH v3] iio: adc: xilinx-xadc: Push interrupts into threaded context Shubhrajyoti Datta
[not found] ` <CAKfKVtGegy2P_YWQAtKEzByN-+q+bq=uus4zNvO4sghXRjpGPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-04 8:05 ` Lars-Peter Clausen [this message]
[not found] ` <55C0722C.7080904-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-08-07 3:55 ` Shubhrajyoti Datta
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=55C0722C.7080904@metafoo.de \
--to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=jaeden.amero-acOepvfBmUk@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=joe.hershberger-acOepvfBmUk@public.gmane.org \
--cc=joshc-acOepvfBmUk@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rt-users-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=nathan.sullivan-acOepvfBmUk@public.gmane.org \
--cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=shubhrajyoti.datta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=xander.huff-acOepvfBmUk@public.gmane.org \
/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).