linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Xander Huff <xander.huff@ni.com>,
	jic23@kernel.org, bigeasy@linutronix.de
Cc: knaack.h@gmx.de, pmeerw@pmeerw.net, michal.simek@xilinx.com,
	soren.brinkmann@xilinx.com, linux-iio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	joe.hershberger@ni.com, joshc@ni.com, nathan.sullivan@ni.com,
	jaeden.amero@ni.com
Subject: Re: [PATCH v4] iio: adc: xilinx-xadc: Push interrupts into hardirq context
Date: Wed, 12 Aug 2015 17:17:37 +0200	[thread overview]
Message-ID: <55CB6391.7060502@metafoo.de> (raw)
In-Reply-To: <1439334049-28671-1-git-send-email-xander.huff@ni.com>

On 08/12/2015 01:00 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.
> 
> 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 threaded handler and pushes all interrupt handling into the
> hardirq context, and uses request_irq().
> 
> To validate that this change has no impact on RT performance, here are
> cyclictest values with no processes running:
> 
> $ sudo cyclictest -S -m -p 98
> # /dev/cpu_dma_latency set to 0us
> policy: fifo: loadavg: 0.00 0.01 0.05 1/174 2539
> T: 0 ( 1405) P:98 I:1000 C:167010520 Min: 9 Act: 12 Avg: 12 Max: 75
> T: 1 ( 1862) P:98 I:1500 C:111340339 Min: 9 Act: 12 Avg: 12 Max: 73
> 
> Then, all xadc raw handles were accessed in a continuous loop via
> /sys/bus/iio/devices/iio:device0:
> 
> $ sudo cyclictest -S -m -p 98
> # /dev/cpu_dma_latency set to 0us
> policy: fifo: loadavg: 7.84 7.70 7.63 3/182 4260
> T: 0 ( 2559) P:98 I:1000 C:241557018 Min: 11 Act: 18 Avg: 21 Max: 74
> T: 1 ( 2560) P:98 I:1500 C:161038006 Min: 10 Act: 21 Avg: 20 Max: 73
> 
> Signed-off-by: Xander Huff <xander.huff@ni.com>

Looks good, thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

  reply	other threads:[~2015-08-12 15:17 UTC|newest]

Thread overview: 23+ 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
2015-05-14 17:10 ` Sebastian Andrzej Siewior
2015-05-14 22:45   ` Xander Huff
2015-05-18 21:17     ` Sebastian Andrzej Siewior
2015-05-23 11:36       ` Jonathan Cameron
2015-06-07 15:29       ` Jonathan Cameron
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-09  5:03           ` Shubhrajyoti Datta
2015-07-15 15:57             ` Xander Huff
2015-07-20 23:14             ` [PATCH v3] " Xander Huff
2015-07-24 12:38               ` Lars-Peter Clausen
2015-08-03 20:18                 ` Xander Huff
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
2015-08-12 15:17                       ` Lars-Peter Clausen [this message]
2015-08-12 16:33                         ` Sebastian Andrzej Siewior
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
2015-08-04  8:05                   ` Lars-Peter Clausen
2015-08-07  3:55                     ` Shubhrajyoti Datta
2015-07-14 14:28           ` [PATCH v2] " Sebastian Andrzej Siewior
2015-07-15 15:59             ` Xander Huff

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=55CB6391.7060502@metafoo.de \
    --to=lars@metafoo.de \
    --cc=bigeasy@linutronix.de \
    --cc=jaeden.amero@ni.com \
    --cc=jic23@kernel.org \
    --cc=joe.hershberger@ni.com \
    --cc=joshc@ni.com \
    --cc=knaack.h@gmx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=nathan.sullivan@ni.com \
    --cc=pmeerw@pmeerw.net \
    --cc=soren.brinkmann@xilinx.com \
    --cc=xander.huff@ni.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).