From: Peter Zijlstra <peterz@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
rafael@kernel.org, daniel.lezcano@linaro.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCHSET v6 0/4] Split iowait into two states
Date: Thu, 5 Sep 2024 11:51:34 +0200 [thread overview]
Message-ID: <20240905095134.GC15400@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <30eeae06-0d8a-4968-ba57-d723162a0782@kernel.dk>
On Wed, Sep 04, 2024 at 08:41:23AM -0600, Jens Axboe wrote:
> > Yeah, but *WHY* !?!? I have some vague memories from last time around,
> > but patches should really keep this information.
>
> To decouple the frequency boost on short waits from the accounting side,
> as lots of tooling equates iowait time with busy time and reports it as
> such. Yeah that's garbage and a reporting issue, but decades of
> education hasn't really improved on that. We should've dumped iowait
> once we moved away from 1-2 processor system or had preemptible kernels,
> but alas we did not and here we are in 2024.
There's 'WAIT' in the name, what broken piece of garbage reports it as
busy time? That has *NEVER* been right. Even on UP systems where IO-wait
is actually a sensible number, it is explicitly the time it *could* have
been busy, if only the IO were faster.
And are we really going to make the whole kernel situation worse just
because there's a bunch of broken userspace?
> >> Patches 1..3 are prep patches, changing the type of
> >> task_struct->nr_iowait and adding helpers to manipulate the iowait counts.
> >>
> >> Patch 4 does the actual splitting.
> >>
> >> This has been sitting for a while, would be nice to get this queued up
> >> for 6.12. Comments welcome!
> >
> > Ufff, and all this because menu-governor does something insane :-(
> >
> > Rafael, why can't we simply remove this from menu? All the nr_iowait*()
> > users are basically broken and I would much rather fix broken rather
> > than work around broken like this.
> >
> > That is, from where I'm sitting this all makes the io-wait situation far
> > worse instead of better.
>
> IMHO what we need is a way to propagate expected wait times for a
> sleeper. Right now iowait serves this purpose in a very crude way, in
> that it doesn't really tell you the expected wait, just that it's a
> short one.
Expected wait time is one thing, but you then *still* have no clue what
CPU it will get back on. Very typically it will be another CPU in the
same cache cluster. One that had no consideration of it when it went to
sleep.
A sleeping task is not associated with a CPU. There is a fundamental
mismatch there.
Using io-wait for idle state selection is very tricky because of this.
> If we simply remove iowait frequency boosting, then we'll have big
> regressions particularly for low/sync storage IO.
The frequency boosting thing I don't object to. That happend on wakeup
after we know that and where a task is going to run.
next prev parent reply other threads:[~2024-09-05 9:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 15:39 [PATCHSET v6 0/4] Split iowait into two states Jens Axboe
2024-08-19 15:39 ` [PATCH 1/4] sched/core: add helpers for iowait handling Jens Axboe
2024-08-19 15:39 ` [PATCH 2/4] sched/core: change rq->nr_iowait type to atomic_long_t Jens Axboe
2024-08-20 2:14 ` Zhang Qiao
2024-08-19 15:39 ` [PATCH 3/4] sched/core: have io_schedule_prepare() return a long Jens Axboe
2024-09-05 9:57 ` Peter Zijlstra
2024-08-19 15:39 ` [PATCH 4/4] sched/core: split iowait state into two states Jens Axboe
2024-09-05 10:55 ` Peter Zijlstra
2024-08-21 14:54 ` [PATCHSET v6 0/4] Split iowait " Christian Loehle
2024-08-21 15:04 ` Jens Axboe
2024-08-21 15:57 ` Christian Loehle
2024-08-24 15:34 ` Jens Axboe
2024-09-04 14:28 ` Peter Zijlstra
2024-09-04 14:41 ` Jens Axboe
2024-09-04 14:49 ` Jens Axboe
2024-09-05 9:51 ` Peter Zijlstra [this message]
2024-09-04 14:42 ` Rafael J. Wysocki
2024-09-04 15:18 ` Rafael J. Wysocki
2024-09-05 9:29 ` Christian Loehle
2024-09-05 10:40 ` Rafael J. Wysocki
2024-09-05 9:36 ` Peter Zijlstra
2024-09-05 10:31 ` Christian Loehle
2024-09-05 11:00 ` Peter Zijlstra
2024-09-05 11:09 ` Christian Loehle
2025-03-31 9:02 ` Pavel Begunkov
2025-03-31 10:33 ` Christian Loehle
2025-04-01 8:21 ` Pavel Begunkov
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=20240905095134.GC15400@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=axboe@kernel.dk \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.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