From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: changfengnan@bytedance.com, xiaobing.li@samsung.com,
lidiangang@bytedance.com
Subject: [PATCHSET 0/2] Fix crazy CPU accounting usage for SQPOLL
Date: Tue, 21 Oct 2025 11:55:53 -0600 [thread overview]
Message-ID: <20251021175840.194903-1-axboe@kernel.dk> (raw)
Hi,
Fengnan Chang reports [1] excessive CPU usage from the SQPOLL work vs
total time accounting, and that indeed does look like a problem. The
issue seems to be just eager time querying, and using essentially the
wrong interface. Patch 1 gets rid of getrusage() for this, and patch 2
attempts to be a bit smarter in how often the time needs to get
queried. Profile results in patch 2 as well.
io_uring/fdinfo.c | 9 ++++---
io_uring/sqpoll.c | 67 +++++++++++++++++++++++++++++++++--------------
io_uring/sqpoll.h | 1 +
3 files changed, 53 insertions(+), 24 deletions(-)
[1] https://lore.kernel.org/io-uring/20251020113031.2135-1-changfengnan@bytedance.com/
--
Jens Axboe
next reply other threads:[~2025-10-21 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 17:55 Jens Axboe [this message]
2025-10-21 17:55 ` [PATCH 1/2] io_uring/sqpoll: switch away from getrusage() for CPU accounting Jens Axboe
2025-10-21 23:35 ` Gabriel Krisman Bertazi
2025-10-22 16:48 ` Jens Axboe
2025-10-21 17:55 ` [PATCH 2/2] io_uring/sqpoll: be smarter on when to update the stime usage Jens Axboe
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=20251021175840.194903-1-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=changfengnan@bytedance.com \
--cc=io-uring@vger.kernel.org \
--cc=lidiangang@bytedance.com \
--cc=xiaobing.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