From: Calvin Owens <calvin@wbinvd.org>
To: Michael Byczkowski <by@by-online.de>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
bigeasy@linutronix.de
Subject: Re: [PATCH v5 0/3] pps: improve PREEMPT_RT performance
Date: Tue, 19 May 2026 09:19:03 -0700 [thread overview]
Message-ID: <agyNd1SsQlmaL3mh@mozart.vkv.me> (raw)
In-Reply-To: <5FDC46CF-4F8F-4E85-9E59-B796C5BF1194@by-online.de>
On Saturday 05/16 at 13:32 +0200, Michael Byczkowski wrote:
> > On 25. Apr 2026, at 19:18, Michael Byczkowski <by@by-online.de> wrote:
> >
> > I found three issues in the PPS subsystem that cause unnecessary jitter
> > under PREEMPT_RT, while being fully backward-compatible with non-RT
> > kernels:
> >
> > 1. pps-gpio: The IRQ handler is force-threaded on PREEMPT_RT, so the
> > PPS timestamp is captured after scheduling delay rather than at
> > interrupt entry. Fix: split into a hardirq primary handler (captures
> > timestamp only) and a threaded handler (processes the event).
> >
> > 2. pps_device.lock: spinlock_t becomes a sleeping mutex on PREEMPT_RT,
> > allowing pps_event() to be preempted mid-update. Fix: convert to
> > raw_spinlock_t and move sleeping calls out of the critical section.
> >
> > 3. pps_kc_hardpps_lock: Same issue as (2), in the kernel consumer path
> > that calls hardpps(). Fix: convert to DEFINE_RAW_SPINLOCK.
> >
> > All three patches are tested on a Raspberry Pi 5 running a 7.0.0-rc6
> > PREEMPT_RT kernel. On non-RT kernels there is zero behavioral change.
> >
> > Signed-off-by: Michael Byczkowski <by@by-online.de>
> > Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> > Tested-by: Michael Byczkowski <by@by-online.de>
> >
> > by (3):
> > pps: pps-gpio: split IRQ handler into hardirq and threaded parts
> > pps: convert pps_device lock to raw_spinlock for PREEMPT_RT
> > pps: convert pps_kc_hardpps_lock to raw_spinlock for PREEMPT_RT
> >
> > drivers/pps/clients/pps-gpio.c | 37 +++++++++++++++++++++++-----------
> > drivers/pps/kapi.c | 18 ++++++++++-------
> > drivers/pps/kc.c | 22 ++++++++++----------
> > drivers/pps/pps.c | 16 +++++++--------
> > include/linux/pps_kernel.h | 2 +-
> > 5 files changed, 56 insertions(+), 39 deletions(-)
> >
> > --
> > 2.47.3
>
> Gentle ping on this series. v4 patches 1/3 and 3/3 carried Rodolfo's
> Acked-by; v5 addressed the remaining feedback on 2/3. Happy to rework
> anything or split the series if that helps it move forward.
Unfortunately apple mail is corrupting your patches :/
Greg KH usually applies patches for drivers/pps/, but I didn't add him
here yet because the patches don't apply.
If you can point me at a git branch for v5, I'd be happy to re-send the
patches myself with your authorship. This is all useful for me and I'd
like to help :)
If you do it yourself, just make sure to add Greg to the Cc: list.
Cheers,
Calvin
> Adding linux-rt-users@ and Sebastian on Cc in case there's interest from the
> PREEMPT_RT side.
next prev parent reply other threads:[~2026-05-19 16:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 17:18 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
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 [this message]
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=agyNd1SsQlmaL3mh@mozart.vkv.me \
--to=calvin@wbinvd.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=by@by-online.de \
--cc=giometti@enneenne.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®