Add suppport for toggling iowait

Add io_uring_set_iowait(ring, enable_iowait) which can be used to turn
on or off setting/utilization of iowait on kernels that support it. Will
return -EOPNOTSUPP if the kernel doesn't support it, or 0 in case of
success. As iowait accounting and CPU frequency boost while waiting are
currently tied together in the kernel, this helper turns both of these
on and off collectively.

Also adds a basic test case that will test for iowait stats for both
types of waits.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
8 files changed