IO-Uring Archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: io-uring@vger.kernel.org, xiaobing.li@samsung.com
Subject: Re: [PATCH for-next] io_uring: Fix sqpoll utilization check racing with dying sqpoll
Date: Sat, 09 Mar 2024 07:27:22 -0700	[thread overview]
Message-ID: <170999444297.1023382.3779633523793018161.b4-ty@kernel.dk> (raw)
In-Reply-To: <20240309003256.358-1-krisman@suse.de>


On Fri, 08 Mar 2024 19:32:56 -0500, Gabriel Krisman Bertazi wrote:
> Commit 3fcb9d17206e ("io_uring/sqpoll: statistics of the true
> utilization of sq threads"), currently in Jens for-next branch, peeks at
> io_sq_data->thread to report utilization statistics. But, If
> io_uring_show_fdinfo races with sqpoll terminating, even though we hold
> the ctx lock, sqd->thread might be NULL and we hit the Oops below.
> 
> Note that we could technically just protect the getrusage() call and the
> sq total/work time calculations.  But showing some sq
> information (pid/cpu) and not other information (utilization) is more
> confusing than not reporting anything, IMO.  So let's hide it all if we
> happen to race with a dying sqpoll.
> 
> [...]

Applied, thanks!

[1/1] io_uring: Fix sqpoll utilization check racing with dying sqpoll
      commit: 606559dc4fa36a954a51fbf1c6c0cc320f551fe0

Best regards,
-- 
Jens Axboe




      reply	other threads:[~2024-03-09 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09  0:32 [PATCH for-next] io_uring: Fix sqpoll utilization check racing with dying sqpoll Gabriel Krisman Bertazi
2024-03-09 14:27 ` Jens Axboe [this message]

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=170999444297.1023382.3779633523793018161.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=krisman@suse.de \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).