From: Jens Axboe <[email protected]>
To: Xiaoguang Wang <[email protected]>,
[email protected]
Cc: [email protected]
Subject: Re: [PATCH v2] io_uring: only wake up sq thread while current task is in io worker context
Date: Thu, 12 Nov 2020 09:48:14 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 11/12/20 9:44 AM, Xiaoguang Wang wrote:
> If IORING_SETUP_SQPOLL is enabled, sqes are either handled in sq thread
> task context or in io worker task context. If current task context is sq
> thread, we don't need to check whether should wake up sq thread.
>
> io_iopoll_req_issued() calls wq_has_sleeper(), which has smp_mb() memory
> barrier, before this patch, perf shows obvious overhead:
> Samples: 481K of event 'cycles', Event count (approx.): 299807382878
> Overhead Comma Shared Object Symbol
> 3.69% :9630 [kernel.vmlinux] [k] io_issue_sqe
>
> With this patch, perf shows:
> Samples: 482K of event 'cycles', Event count (approx.): 299929547283
> Overhead Comma Shared Object Symbol
> 0.70% :4015 [kernel.vmlinux] [k] io_issue_sqe
>
> It shows some obvious improvements.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-11-12 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 16:44 [PATCH v2] io_uring: only wake up sq thread while current task is in io worker context Xiaoguang Wang
2020-11-12 16:48 ` 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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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