From: Tejun Heo <tj@kernel.org>
To: David Vernet <void@manifault.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v2 sched_ext/for-6.12] sched_ext: Synchronize bypass state changes with rq lock
Date: Tue, 10 Sep 2024 10:44:12 -1000 [thread overview]
Message-ID: <ZuCvnJWtu0EI6DKe@slm.duckdns.org> (raw)
In-Reply-To: <Zt-E5mwbfoJgcBtX@slm.duckdns.org>
On Mon, Sep 09, 2024 at 01:29:42PM -1000, Tejun Heo wrote:
> While the BPF scheduler is being unloaded, the following warning messages
> trigger sometimes:
>
> NOHZ tick-stop error: local softirq work is pending, handler #80!!!
>
> This is caused by the CPU entering idle while there are pending softirqs.
> The main culprit is the bypassing state assertion not being synchronized
> with rq operations. As the BPF scheduler cannot be trusted in the disable
> path, the first step is entering the bypass mode where the BPF scheduler is
> ignored and scheduling becomes global FIFO.
>
> This is implemented by turning scx_ops_bypassing() true. However, the
> transition isn't synchronized against anything and it's possible for enqueue
> and dispatch paths to have different ideas on whether bypass mode is on.
>
> Make each rq track its own bypass state with SCX_RQ_BYPASSING which is
> modified while rq is locked.
>
> This removes most of the NOHZ tick-stop messages but not completely. I
> believe the stragglers are from the sched core bug where pick_task_scx() can
> be called without preceding balance_scx(). Once that bug is fixed, we should
> verify that all occurrences of this error message are gone too.
>
> v2: scx_enabled() test moved inside the for_each_possible_cpu() loop so that
> the per-cpu states are always synchronized with the global state.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: David Vernet <void@manifault.com>
Applied to sched_ext/for-6.12.
Thanks.
--
tejun
prev parent reply other threads:[~2024-09-10 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 21:31 [PATCH " Tejun Heo
2024-09-09 23:29 ` [PATCH v2 " Tejun Heo
2024-09-10 20:44 ` Tejun Heo [this message]
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=ZuCvnJWtu0EI6DKe@slm.duckdns.org \
--to=tj@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=void@manifault.com \
/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®