mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Michael Byczkowski <by@by-online.de>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/3] pps: pps-gpio: split IRQ handler into hardirq and threaded parts
Date: Fri, 22 May 2026 16:25:12 +0200	[thread overview]
Message-ID: <20260522142512.aXmXwoH8@linutronix.de> (raw)
In-Reply-To: <A0383FF7-267A-4D4C-9B74-F80B99086D7F@by-online.de>

On 2026-04-25 19:19:19 [+0200], Michael Byczkowski wrote:
> On PREEMPT_RT, all IRQ handlers are force-threaded. The current
> pps_gpio_irq_handler captures the PPS timestamp via pps_get_ts()
> inside the handler, but on RT this runs in thread context — after
> a scheduling delay that adds variable latency (jitter) to the
> timestamp.
> 
> Split the handler into a hardirq primary (pps_gpio_irq_hardirq)
> that only captures the timestamp, and a threaded handler
> (pps_gpio_irq_thread) that processes the event. With
> request_threaded_irq(), the primary handler runs in hardirq context
> even on PREEMPT_RT, preserving nanosecond timestamp precision.
> 
> On non-RT kernels, request_threaded_irq with an explicit primary
> handler behaves identically to the previous request_irq call.

No sure if this is wrong wording or so. You end up with a primary
handler in hardirq context and a threaded handler. So have both with and
without PREEMPT_RT.

But the change makes sense.

> Signed-off-by: Michael Byczkowski <by@by-online.de>
> Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> Tested-by: Michael Byczkowski <by@by-online.de>
> Tested-by: Calvin Owens <calvin@wbinvd.org>

Sebastian

  reply	other threads:[~2026-05-22 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25 17:18 [PATCH v5 0/3] pps: improve PREEMPT_RT performance Michael Byczkowski
2026-04-25 17:19 ` [PATCH v5 1/3] pps: pps-gpio: split IRQ handler into hardirq and threaded parts Michael Byczkowski
2026-05-22 14:25   ` Sebastian Andrzej Siewior [this message]
2026-04-25 17:20 ` [PATCH v5 2/3] pps: convert pps_device lock to raw_spinlock for PREEMPT_RT Michael Byczkowski
2026-04-25 17:21   ` [PATCH v5 3/3] pps: convert pps_kc_hardpps_lock " Michael Byczkowski
2026-05-22 14:37     ` Sebastian Andrzej Siewior
2026-05-22 14:33   ` [PATCH v5 2/3] pps: convert pps_device lock " Sebastian Andrzej Siewior
2026-05-16 11:32 ` [PATCH v5 0/3] pps: improve PREEMPT_RT performance Michael Byczkowski
2026-05-19 16:19   ` Calvin Owens
2026-05-22 15:56     ` Michael Byczkowski
2026-05-23 17:57       ` Michael Byczkowski
2026-05-22 14:13   ` Sebastian Andrzej Siewior
2026-05-23 17:58     ` Michael Byczkowski
2026-05-26 18:34       ` Michael Byczkowski

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=20260522142512.aXmXwoH8@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=by@by-online.de \
    --cc=giometti@enneenne.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®