On 2/23/24 10:07 PM, David Wei wrote: > Currently we unconditionally account time spent waiting for events in CQ > ring as iowait time. > > Some userspace tools consider iowait time to be CPU util/load which can > be misleading as the process is sleeping. High iowait time might be > indicative of issues for storage IO, but for network IO e.g. socket > recv() we do not control when the completions happen so its value > misleads userspace tooling. > > This patch gates the previously unconditional iowait accounting behind a > new IORING_REGISTER opcode. By default time is not accounted as iowait, > unless this is explicitly enabled for a ring. Thus userspace can decide, > depending on the type of work it expects to do, whether it wants to > consider cqring wait time as iowait or not. Looks good, thanks! -- Jens Axboe