lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b4a58cf5-3bc6-4279-8a33-d7209a60164f@kernel.dk>
Date:   Wed, 15 Nov 2023 06:51:16 -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 v3] io_uring: Statistics of the true utilization of sq
 threads.

On 11/15/23 5:18 AM, Xiaobing Li wrote:
> v3:
> 1.Since the sq thread has a while(1) structure, during this process,
>   there may be a lot of time that is not processing IO but does not
> exceed the timeout period, therefore, the sqpoll thread will keep
> running and will keep occupying the CPU. Obviously, the CPU is wasted at
> this time;Our goal is to count the part of the time that the sqpoll
> thread actually processes IO, so as to reflect the part of the CPU it
> uses to process IO, which can be used to help improve the actual
> utilization of the CPU in the future.
> 
> 2."work_time" in the code represents the sum of the jiffies count 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.
> 
> 3.The task_pid value in the io_sq_data structure should be assigned
>   after the sq thread is created, otherwise the pid of its parent
> process will be recorded.
> 
> 4.After many tests, we do not need to obtain ctx->uring_lock in advance
>   when obtaining ctx->sq_data. We can avoid null pointer references by
> judging that ctx is not null.

This is mixed in with my patch, please just base it on top of the v4
I'll send out now rather than integrate it. And then you'd need that rcu
free patch as well on top of that, then your changes as a separate
patch.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ