]> Gentwo Git Trees - linux/.git/commit
io_uring/sqpoll: switch away from getrusage() for CPU accounting
authorJens Axboe <axboe@kernel.dk>
Tue, 21 Oct 2025 13:16:08 +0000 (07:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Oct 2025 16:51:20 +0000 (10:51 -0600)
commit8ac9b0d33e5c0a995338ee5f25fe1b6ff7d97f65
tree5313eb47ba5848ad203ad59307c05a499d075a7f
parent4ec703ec0c384a2199808c4eb2e9037236285a8d
io_uring/sqpoll: switch away from getrusage() for CPU accounting

getrusage() does a lot more than what the SQPOLL accounting needs, the
latter only cares about (and uses) the stime. Rather than do a full
RUSAGE_SELF summation, just query the used stime instead.

Cc: stable@vger.kernel.org
Fixes: 3fcb9d17206e ("io_uring/sqpoll: statistics of the true utilization of sq threads")
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/fdinfo.c
io_uring/sqpoll.c
io_uring/sqpoll.h