From: Philippe Gerum <rpm@xenomai.org>
To: Florian Bezdeka <florian.bezdeka@siemens.com>
Cc: xenomai@lists.linux.dev, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH RFC Dovetail 6.16 2/2] genirq: irq_pipeline: Migrate mask_lock to a hybrid spinlock
Date: Fri, 26 Sep 2025 09:23:49 +0200 [thread overview]
Message-ID: <875xd5ismy.fsf@xenomai.org> (raw)
In-Reply-To: <20250924-wip-flo-fix-lockdep-warning-for-6-16-v1-2-8a8475e2cdc0@siemens.com> (Florian Bezdeka's message of "Wed, 24 Sep 2025 23:23:15 +0200")
Florian Bezdeka <florian.bezdeka@siemens.com> writes:
> The reason for the migration is the lockdep report below.
>
> The irq_desc_lock_class is the dovetail specific hybrid spinlock.
> pci_config_lock and mask_lock are both raw spinlocks.
>
> The behaviour of the pci_config_lock is different on kernels with
> IRQ pipelining enabled. While on plain Linux the critical section
> is entered with hard IRQs disabled, the inband stage is stalled with
> hard IRQs enabled on CONFIG_IRQ_PIPELINE. This is the reason why the
> pipeline entry code may still run on the same CPU and grab a
> (hybrid) IRQ descriptor lock.
>
> The critical section protected by the mask_lock was always entered
> with hard IRQs on.
>
> To break the cycle we migrate the mask_lock to a hybrid spinlock.
> This lock is only grabbed for IRQ setup. It's expected to have the
> lowest RT impact.
>
> irq_setup_affinity() is expected to be called from the inband stage
> only, so we will now enter the critical section with hard IRQs
> disabled. With that the pipeline entry code is locked out, breaking
> the cyclic lock dependency.
>
LGTM.
--
Philippe.
next prev parent reply other threads:[~2025-09-26 7:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 21:23 [PATCH RFC Dovetail 6.16 0/2] Dovetail: Fix lockdep warning observed on 6.16 Florian Bezdeka
2025-09-24 21:23 ` [PATCH RFC Dovetail 6.16 1/2] locking: irq_pipeline: Rename MUTABLE_SPINLOCK to HYBRID_SPINLOCK Florian Bezdeka
2025-09-24 21:23 ` [PATCH RFC Dovetail 6.16 2/2] genirq: irq_pipeline: Migrate mask_lock to a hybrid spinlock Florian Bezdeka
2025-09-26 7:23 ` Philippe Gerum [this message]
2025-09-28 12:24 ` [PATCH RFC Dovetail 6.16 0/2] Dovetail: Fix lockdep warning observed on 6.16 Philippe Gerum
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=875xd5ismy.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=florian.bezdeka@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=xenomai@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.