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 3/3] pps: convert pps_kc_hardpps_lock to raw_spinlock for PREEMPT_RT
Date: Fri, 22 May 2026 16:37:29 +0200 [thread overview]
Message-ID: <20260522143729.5nICtzAv@linutronix.de> (raw)
In-Reply-To: <4271939B-F5ED-4746-8C94-CD96F85285B3@by-online.de>
On 2026-04-25 19:21:14 [+0200], Michael Byczkowski wrote:
> Convert pps_kc_hardpps_lock from spinlock_t to raw_spinlock_t. This
> lock is held in pps_kc_event() which calls hardpps(). hardpps() takes
> tk_core.lock which is already a raw_spinlock — nesting a sleeping lock
> (PREEMPT_RT spinlock_t) over a raw_spinlock is invalid.
>
> The locked section only checks a pointer comparison and calls
> hardpps(), both of which are non-sleeping.
>
> On non-RT kernels, raw_spinlock_t compiles to identical code as
> spinlock_t — no behavioral change.
This looks okay. You need to swap patch #2 and #3 - this needs to come
first.
The bracket placement is terrible in pps_kc_bind(). Maybe if you swap to
guard() it becomes readable as a side effect.
> 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
next prev parent reply other threads:[~2026-05-22 14:37 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
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 [this message]
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=20260522143729.5nICtzAv@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®