[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3995796-8aab-45e1-ad59-d970373a4fab@kernel.dk>
Date: Mon, 18 Dec 2023 08:53:24 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Xiaobing Li <xiaobing.li@...sung.com>, asml.silence@...il.com
Cc: linux-kernel@...r.kernel.org, io-uring@...r.kernel.org,
kun.dou@...sung.com, peiwei.li@...sung.com, joshi.k@...sung.com,
kundan.kumar@...sung.com, wenwen.chen@...sung.com, ruyi.zhang@...sung.com,
cliang01.li@...sung.com, xue01.he@...sung.com
Subject: Re: [PATCH v5] io_uring: Statistics of the true utilization of sq
threads.
On 12/18/23 1:51 AM, Xiaobing Li wrote:
> The running time of the sq thread and the actual IO processing time are
> counted, and the proportion of time actually used to process IO is
> output as a percentage.
>
> Variable description:
> "work_time" in the code represents the sum of the jiffies of the sq
> thread actually processing IO, that is, how many milliseconds it
> actually takes to process IO. "total_time" represents the total time
> that the sq thread has elapsed from the beginning of the loop to the
> current time point, that is, how many milliseconds it has spent in
> total.
> The output "SqBusy" represents the percentage of time utilization that
> the sq thread actually uses to process IO.>
> The test results are as follows:
> Every 0.5s: cat /proc/23112/fdinfo/6 | grep Sq
> SqMask: 0x3
> SqHead: 1168417
> SqTail: 1168418
> CachedSqHead: 1168418
> SqThread: 23112
> SqThreadCpu: 55
> SqBusy: 97%
I think I'm convinced that the effectiveness of the chosen SQPOLL
settings being exposed is useful, I'm just not sure fdinfo is the right
place to do it. Is it going to be a problem that these are just
perpetual stats, with no way to reset them? This means there's no way to
monitor it for a period of time and get effectiveness for something
specific, it'll always just count from when the ring was created.
We could of course have the act of reading the stat also reset it, but
maybe that'd be a bit odd?
Alternatively, it could be exported differently, eg as a register opcode
perhaps.
Open to suggestions...
--
Jens Axboe
Powered by blists - more mailing lists