From: Peter Zijlstra <peterz@infradead.org>
To: Christian Loehle <christian.loehle@arm.com>
Cc: Florian Schmaus <flo@geekplace.eu>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] bcachefs: set rebalance thread to SCHED_BATCH and nice 19
Date: Tue, 14 Jan 2025 15:40:00 +0100 [thread overview]
Message-ID: <20250114144000.GU5388@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <28688fa8-718b-4ee6-8417-822efac8b603@arm.com>
On Tue, Jan 14, 2025 at 01:29:04PM +0000, Christian Loehle wrote:
> I know nothing about bcachefs internals, but could this also be a problem?
> The rebalance thread might not run for O(second) or so?
SCHED_BATCH should not behave anything like that, mostly SCHED_BATCH
tasks will not cause wakeup preemption. But otherwise they compete at
the same level as everybody else.
Notably a BATCH and NORMAL task that are each while(1) loops will get
the normal 50-50 distribution of time. It's just that when a NORMAL task
is running, the waking of a BATCH task won't ever kick the NORMAL from
the CPU, instead waiting for the tick to do so.
So a task that is IO heavy (as suggested here), that wakes a lot to
issue further IO, will not immediately interrupt whatever is on the CPU,
instead it waits until it gets selected through other means.
next prev parent reply other threads:[~2025-01-14 14:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 12:47 [RESEND] Add sched_set_batch() and run bcachefs-rebalance under SCHED_BATCH Florian Schmaus
2025-01-14 12:47 ` [PATCH 1/2] sched: provide sched_set_batch() Florian Schmaus
2025-01-14 12:47 ` [PATCH 2/2] bcachefs: set rebalance thread to SCHED_BATCH and nice 19 Florian Schmaus
2025-01-14 13:29 ` Christian Loehle
2025-01-14 14:40 ` Peter Zijlstra [this message]
2025-01-14 15:05 ` Christian Loehle
2025-01-14 15:32 ` Kent Overstreet
2025-01-14 15:19 ` Kent Overstreet
2025-01-14 16:45 ` Florian Schmaus
2025-01-14 14:32 ` Peter Zijlstra
2025-01-14 15:25 ` Kent Overstreet
2025-01-14 16:45 ` Florian Schmaus
[not found] <20241114210649.71377-1-flo@geekplace.eu>
2024-11-14 21:06 ` [PATCH 2/2] bcachefs: Set " Florian Schmaus
2024-11-15 5:43 ` Kent Overstreet
2024-11-15 8:26 ` Florian Schmaus
2024-11-15 20:42 ` Kent Overstreet
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=20250114144000.GU5388@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=christian.loehle@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=flo@geekplace.eu \
--cc=juri.lelli@redhat.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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