lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240228192355.290114-1-axboe@kernel.dk>
Date: Wed, 28 Feb 2024 12:16:55 -0700
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: peterz@...radead.org,
	mingo@...hat.com
Subject: [PATCHSET v3 0/2] Split iowait into two states

Hi,

This is v3 of the patchset 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 int rather than
an atomic_t. Reasons given in that patch. This patch can stand alone, as
it should not have any functional changes, outside of improving the
handling of iowait a bit.

Patch 2 adds the ->in_iowait_acct stage inside the current ->in_iowait
setting.

I wasn't super happy with the need to grab the rq lock for the one case
where we still need it, and woke up with a better idea of how to do this.
It's all in patch 1. Nice part here is that we get rid of atomics for
3 out of the 4 iowait inc/dec. Patch just follows the same principle.

Comments welcome! Peter, CC'ing you since I did on the previous posting,
feel free to ignore.

Since v2:
- Drop need for rq lock for the remote case by turning both nr_iowait
  and nr_iowait_acct into the difference between a remote atomic count
  and the local non-atomic one.

-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ