Re: Re: [PATCH v2] io_uring: Statistics of the true utilization of sq threads.

From: Xiaobing Li
Date: Mon Nov 13 2023 - 00:57:15 EST


After careful consideration and testing, I don't think getting the
uring_lock is possible here, for the following reasons:
Due to lock competition, ctx->uring_lock and sq->lock are usually not
available here. The best proof is that the values of SqThread and
SqThreadCpu always output -1. In this case, it is impossible to obtain
the required work_time and total_time values.
In fact, it should be feasible to obtain work_time and total_time by
judging that ctx->sq_data is not NULL, because if the sq thread exits,
the action of reading data will also stop, and the possibility of a null
pointer reference is very low.