From: Xiaobing Li <xiaobing.li@samsung.com>
To: changfengnan@bytedance.com
Cc: asml.silence@gmail.com, axboe@kernel.dk,
io-uring@vger.kernel.org, lidiangang@bytedance.com,
kun.dou@samsung.com, peiwei.li@samsung.com, joshi.k@samsung.com
Subject: Re: [PATCH] io_uring: add IORING_SETUP_NO_SQTHREAD_STATS flag to disable sqthread stats collection.
Date: Fri, 17 Oct 2025 09:06:15 +0000 [thread overview]
Message-ID: <20251017090615.6580-1-xiaobing.li@samsung.com> (raw)
In-Reply-To: <CAPFOzZuhDU0yD=nGioR1a3u9C0ZXxOpahZxv=PsHThEJJK=A3w@mail.gmail.com>
On 10/16/25 20:09, Fengnan Chang wrote:
>On 10/16/25 20:03, Pavel Begunkov wrote:
>>
>> On 10/16/25 12:45, Fengnan Chang wrote:
>> > introduces a new flag IORING_SETUP_NO_SQTHREAD_STATS that allows
>> > user to disable the collection of statistics in the sqthread.
>> > When this flag is set, the getrusage() calls in the sqthread are
>> > skipped, which can provide a small performance improvement in high
>> > IOPS workloads.
>>
>> It was added for dynamically adjusting SQPOLL timeouts, at least that
>> what the author said, but then there is only the fdinfo to access it,
>> which is slow and unreliable, and no follow up to expose it in a
>> better way. To be honest, I have serious doubts it has ever been used,
>> and I'd be tempted to completely remove it out of the kernel. Fdinfo
>> format wasn't really stable for io_uring and we can leave it printing
>> some made up values like 100% util.
>
>Agree, IMO turning off stats by default would be a better approach, but
>I'm concerned that some people are using this in fdinfo. I'd like to hear
>the author's opinion.
We use fdinfo statistics to evaluate some of our internal test data.
Initially, I tested the performance impact of adding this feature, and the
results showed that it had little impact on performance. Therefore,
I didn't consider adding a switch to control its use. However,
adding a switch to control whether to enable utilization statistics
is a good idea.
--
Xiaobing Li
next prev parent reply other threads:[~2025-10-17 9:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 11:45 [PATCH] io_uring: add IORING_SETUP_NO_SQTHREAD_STATS flag to disable sqthread stats collection Fengnan Chang
2025-10-16 12:04 ` Pavel Begunkov
2025-10-16 12:09 ` [External] " Fengnan Chang
[not found] ` <CGME20251017091046epcas5p35dfbcf4979f79b3a80441aed2d31a906@epcas5p3.samsung.com>
2025-10-17 9:06 ` Xiaobing Li [this message]
2025-10-17 9:21 ` Fengnan Chang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251017090615.6580-1-xiaobing.li@samsung.com \
--to=xiaobing.li@samsung.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=changfengnan@bytedance.com \
--cc=io-uring@vger.kernel.org \
--cc=joshi.k@samsung.com \
--cc=kun.dou@samsung.com \
--cc=lidiangang@bytedance.com \
--cc=peiwei.li@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox