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>
Mon, 19 Aug 2024 14:29:41 +0000 (08:29 -0600)
commit31dabaa37e1ce5c98ef2417f9ed802ddef9e1b02
tree7fc6b1f846d472c98cfc89f4145e1f39853f285d
parent9dfc2f8956a947e1664e86f27ecd3c1ff799ca1c
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