linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Martin.Wirth@dlr.de
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Long latencies during disk-io
Date: Thu, 5 Sep 2019 17:41:15 +0200	[thread overview]
Message-ID: <20190905154115.mnid6rue65x6vvt6@linutronix.de> (raw)
In-Reply-To: <1A2AF5F768264E479963C4D8C015EB696C50C6BB@DLDEFFMIMP02EXC.intra.dlr.de>

On 2019-09-03 07:23:35 [+0000], Martin.Wirth@dlr.de wrote:
> Hi,
Hi,

…
>  /proc/irq interface the latencies are gone. The real-time priority of the digitizer IRQ handler
>  is set to 53 and that of the corresponding user space thread to 51. The ahci interrupt
>  thread is at the standard value of 50.     
> 
> Although I now have the solution to put the ahci-handler on a different processor, I would
> like to know if it is expected behavior that the ahci interrupt handler blocks other interrupt 
> threads of higher priority for more than one millisecond?

Based on the CPU split via proc/irq you describe here I assume that
both devices (ahci and the digitizer cards) do not share an interrupt
line.
In that case both handlers are independent and should not affect each
other. Running on the same CPU, the AHCI handler can be interrupt by
another thread (with a higher priority) if that interrupt line was
raised while the AHCI handler was active.

So based on that, the "digitizer IRQ handler" should run first, followed
by the user space thread, followed by the AHCI interrupt.

> Another observation which I cannot understand though, is that a concurrent 
> cyclictest -m -Sp98 -i200 -h400 -n
> run does not show the latencies...

you have here "-p98" while the other two threads have priority 53 and
51. So that is a difference unless there is nothing between 53 and 51.
But if you disable the "digitizer card(s)" then with -p51 you should be
close to that setup with cyclictest.

If there are no spikes in cyclictest then there must be something
after the threaded handler runs that delays the user space task. Some
tracing should help to figure out what happens between the hardware
interrupt and the context switch to the user task.

> Cheers,
> 
> Martin

Sebastian

  reply	other threads:[~2019-09-05 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  7:23 Long latencies during disk-io Martin.Wirth
2019-09-05 15:41 ` Sebastian Andrzej Siewior [this message]
2019-09-06 13:23   ` AW: " Martin.Wirth
2019-09-06 22:06     ` Austin Schuh
2019-09-10 12:04       ` AW: " Martin.Wirth
2019-09-13 13:36         ` Sebastian Andrzej Siewior
2019-09-13 14:09           ` AW: " Martin.Wirth
2019-09-13 15:06             ` Sebastian Andrzej Siewior
2019-09-16 11:30               ` AW: " Martin.Wirth
2019-09-17 10:52                 ` Sebastian Andrzej Siewior
2019-09-17 11:09                   ` AW: " Martin.Wirth
2019-09-17 11:20                     ` Sebastian Andrzej Siewior

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=20190905154115.mnid6rue65x6vvt6@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=Martin.Wirth@dlr.de \
    --cc=linux-rt-users@vger.kernel.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).