From: Tejun Heo <tj@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Clark Williams <clrkwllms@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3 1/3] workqueue: Provide a handshake for canceling BH workers
Date: Thu, 4 Sep 2025 07:28:54 -1000 [thread overview]
Message-ID: <aLnMVqcHFQPnKHyi@slm.duckdns.org> (raw)
In-Reply-To: <20250904142526.1845999-2-bigeasy@linutronix.de>
On Thu, Sep 04, 2025 at 04:25:23PM +0200, Sebastian Andrzej Siewior wrote:
> While a BH work item is canceled, the core code spins until it
> determines that the item completed. On PREEMPT_RT the spinning relies on
> a lock in local_bh_disable() to avoid a live lock if the canceling
> thread has higher priority than the BH-worker and preempts it. This lock
> ensures that the BH-worker makes progress by PI-boosting it.
>
> This lock in local_bh_disable() is a central per-CPU BKL and about to be
> removed.
>
> To provide the required synchronisation add a per pool lock. The lock is
> acquired by the bh_worker at the begin while the individual callbacks
> are invoked. To enforce progress in case of interruption, __flush_work()
> needs to acquire the lock.
> This will flush all BH-work items assigned to that pool.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Applied to wq/for-6.18.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-09-04 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 14:25 [PATCH v3 0/3] Allow to drop the softirq-BKL lock on PREEMPT_RT Sebastian Andrzej Siewior
2025-09-04 14:25 ` [PATCH v3 1/3] workqueue: Provide a handshake for canceling BH workers Sebastian Andrzej Siewior
2025-09-04 17:28 ` Tejun Heo [this message]
2025-09-04 14:25 ` [PATCH v3 2/3] softirq: Provide a handshake for canceling tasklets via polling Sebastian Andrzej Siewior
2025-09-05 10:15 ` Hillf Danton
2025-09-15 7:39 ` Sebastian Andrzej Siewior
2025-09-18 13:47 ` Hillf Danton
2025-09-18 15:49 ` Sebastian Andrzej Siewior
2025-09-20 1:29 ` Hillf Danton
2025-09-17 14:44 ` [tip: irq/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-09-04 14:25 ` [PATCH v3 3/3] softirq: Allow to drop the softirq-BKL lock on PREEMPT_RT Sebastian Andrzej Siewior
2025-09-17 14:44 ` [tip: irq/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-09-15 7:42 ` [PATCH v3 0/3] " 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=aLnMVqcHFQPnKHyi@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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®