From: Jens Axboe <axboe@kernel.dk>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@redhat.com
Subject: [PATCHSET v2 0/2] Split iowait into two states
Date: Tue, 27 Feb 2024 14:06:01 -0700 [thread overview]
Message-ID: <20240227211152.1099534-1-axboe@kernel.dk> (raw)
Hi,
This is v2 of the patch posted yesterday, where the current in_iowait
state is split into two parts:
1) The "task is sleeping waiting on IO", and would like cpufreq goodness
in terms of sleep and wakeup latencies.
2) The above, and also accounted as such in the iowait stats.
The current ->in_iowait covers both, with this series we have ->in_iowait
for step 1 above, and ->in_iowait_acct for step 2. You cannot be
->in_iowait_acct without also having ->in_iowait set.
Patch 1 is a prep patch, that turns rq->nr_iowait into an unsigned int
rather than an atomic_t. Reasons given in that patch.
Patch 2 adds the ->in_iowait_acct stage inside the current ->in_iowait
setting.
I haven't been able to properly benchmark patch 1, as the atomics are
noise in any workloads that approximate normality. I can certainly
concoct a synthetic test case if folks are interested. My gut says that
we're trading 3 fast path atomics for none, and with the 4th case
_probably_ being way less likely. There we grab the rq lock.
Comments welcome! Peter, CC'ing you since I did in the previous, feel
free to ignore.
Since v1:
- Add prep patch 1, switching nr_iowait to an unsigned int
- Modify patch 2 to not use atomic_t as well, no changes otherwise
arch/s390/appldata/appldata_base.c | 2 +-
arch/s390/appldata/appldata_os.c | 2 +-
fs/proc/stat.c | 2 +-
include/linux/sched.h | 6 ++++
include/linux/sched/stat.h | 10 ++++--
kernel/sched/core.c | 55 +++++++++++++++++++++++-------
kernel/sched/cputime.c | 2 +-
kernel/sched/sched.h | 3 +-
kernel/time/tick-sched.c | 6 ++--
9 files changed, 66 insertions(+), 22 deletions(-)
--
Jens Axboe
next reply other threads:[~2024-02-27 21:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 21:06 Jens Axboe [this message]
2024-02-27 21:06 ` [PATCH 1/2] sched/core: switch struct rq->nr_iowait to an unsigned int Jens Axboe
2024-02-27 23:05 ` David Wei
2024-02-27 23:17 ` Jens Axboe
2024-02-27 21:06 ` [PATCH 2/2] sched/core: split iowait state into two states Jens Axboe
2024-02-28 2:21 ` [PATCHSET v2 0/2] Split iowait " Jens Axboe
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=20240227211152.1099534-1-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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