sched/core: change rq->nr_iowait type to atomic_long_t
authorJens Axboe <axboe@kernel.dk>
Sun, 10 Mar 2024 20:50:06 +0000 (14:50 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Mar 2025 14:10:26 +0000 (08:10 -0600)
commit5a2631573d7616054d175b29e43293e139ed7dcb
tree9c08211e3d9ef94b32382de5fa7fe7cee33f73ab
parent8306d6c5458321395d9639b4d0828763dcd4875a
sched/core: change rq->nr_iowait type to atomic_long_t

In preparation for storing two separate iowait states in there, bump the
size from a 32-bit to a 64-bit size, for 64-bit kernels. On 32-bit
archs, the type remains a 32-bit size.

Note that on 32-bit, the number of tasks are limited to 0x8000, which
fits just fine in even half of the existing 32-bit atomic_t. For 64-bit,
no such limit exists, hence play it safe and make it a 64-bit atomic.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
kernel/sched/core.c
kernel/sched/sched.h