io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/4] io_uring: Always REQ_F_FREE_SQE for allocated sqe
Date: Wed, 20 Nov 2019 12:03:30 +0300	[thread overview]
Message-ID: <4eea8a32-68dc-4d34-f69d-5a2281594844@gmail.com> (raw)
In-Reply-To: <0655d5c5-e241-034c-6ec2-ad97012fd2f1@kernel.dk>

On 11/20/2019 1:10 AM, Jens Axboe wrote:
> and it is tempting as a cleanup, but it
> also moves it into the fastpath instead of keeping it in the slow
> link fail path. Any allocated sqe is normally freed when the work
> is processed, which is generally also a better path to do it in as
> we know we're not under locks/irq disabled.

Good point with locks/irq, but io_put_req() is usually called out of
locking. Isn't it? E.g. @completion_lock is taken mainly by *add_cq_event().

SQE needs to be freed in any case, and there is only one extra "if",
what we really should not worry about. There are much heavier parts.
e.g. excessive atomics/locking, I'll send an RFC for that, if needed.

I find the complexity of much more concern here.

-- 
Pavel Begunkov

  reply	other threads:[~2019-11-20  9:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 20:32 [PATCHSET 0/4][io_uring-post] cleanup after linked timeouts Pavel Begunkov
2019-11-19 20:32 ` [PATCH 1/4] io_uring: Always REQ_F_FREE_SQE for allocated sqe Pavel Begunkov
2019-11-19 22:10   ` Jens Axboe
2019-11-20  9:03     ` Pavel Begunkov [this message]
2019-11-20 14:25       ` Jens Axboe
2019-11-19 20:32 ` [PATCH 2/4] io_uring: break links for failed defer Pavel Begunkov
2019-11-19 20:32 ` [PATCH 3/4] io_uring: remove redundant check Pavel Begunkov
2019-11-19 20:32 ` [PATCH 4/4] io_uring: Fix leaking linked timeouts Pavel Begunkov
2019-11-19 22:10 ` [PATCHSET 0/4][io_uring-post] cleanup after " 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=4eea8a32-68dc-4d34-f69d-5a2281594844@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --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).