io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH 3/5] io_uring: don't put a poll req under spinlock
Date: Tue, 13 Oct 2020 08:54:10 -0600	[thread overview]
Message-ID: <04f2d94c-0e75-b251-e244-b7ac95863862@kernel.dk> (raw)
In-Reply-To: <a723ec3fb07e906f28631d3a67b4d125b513b9ee.1602577875.git.asml.silence@gmail.com>

On 10/13/20 2:43 AM, Pavel Begunkov wrote:
> Move io_put_req() in io_poll_task_handler() from under spinlock. That's
> a good rule to minimise time within spinlock sections, and
> performance-wise it should affect only rare cases/slow-path.

It's actually more important not to bounce on the lock, especially
when the extra path isn't that long. You'll end up with the same hold
time, just split, but the downside is that you'll dirty that lock twice
instead of one.

So while I think the patch is fine as it avoids REQ_F_COMP_LOCKED,
I don't think the commit message really reflects reality. I'll
adjust it a bit.

-- 
Jens Axboe


  reply	other threads:[~2020-10-13 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13  8:43 [PATCH 0/5] fixes for REQ_F_COMP_LOCKED Pavel Begunkov
2020-10-13  8:43 ` [PATCH 1/5] io_uring: don't set COMP_LOCKED if won't put Pavel Begunkov
2020-10-13  8:43 ` [PATCH 2/5] io_uring: don't unnecessarily clear F_LINK_TIMEOUT Pavel Begunkov
2020-10-13  8:43 ` [PATCH 3/5] io_uring: don't put a poll req under spinlock Pavel Begunkov
2020-10-13 14:54   ` Jens Axboe [this message]
2020-10-13  8:43 ` [PATCH 4/5] io_uring: dig out COMP_LOCK from deep call chain Pavel Begunkov
2020-10-13  8:44 ` [PATCH 5/5] io_uring: fix REQ_F_COMP_LOCKED by killing it Pavel Begunkov
2020-10-13  9:46 ` [PATCH 0/5] fixes for REQ_F_COMP_LOCKED Pavel Begunkov
2020-10-13 14:57   ` Jens Axboe
2020-10-13 17:02     ` Pavel Begunkov
2020-10-13 15:14 ` 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=04f2d94c-0e75-b251-e244-b7ac95863862@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /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 NNTP newsgroup(s).