All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Olivier Langlois <olivier@trillion01.com>,
	Pavel Begunkov <asml.silence@gmail.com>
Cc: Hao Xu <haoxu@linux.alibaba.com>,
	io-uring <io-uring@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 1/2] io_uring: minor io_cqring_wait() optimization
Date: Wed, 9 Mar 2022 16:43:15 -0700	[thread overview]
Message-ID: <dc8bfa6b-5e3b-e2a9-b7b5-da5bbc70d3bc@kernel.dk> (raw)
In-Reply-To: <36cd0f716bda419f477c3256769f382a31461481.camel@trillion01.com>

On 3/8/22 10:36 PM, Olivier Langlois wrote:
> On Tue, 2022-03-08 at 17:54 -0700, Jens Axboe wrote:
>> On 3/8/22 3:17 PM, Olivier Langlois wrote:
>>> Move up the block manipulating the sig variable to execute code
>>> that may encounter an error and exit first before continuing
>>> executing the rest of the function and avoid useless computations
>>
>> I don't think this is worthwhile doing. If you're hitting an error
>> in any of them, it's by definition not the fast path.
>>
> Well, by itself it is not a big improvement but it is still an
> improvement.
> 
> but most importantly, it has to be considered in the context of the
> current patchset because in patch #2, the following step is to
> 
> 1. acquire the napi spin lock
> 2. splice the context napi list into a local one.
> 3. release the lock
> 
> If this patch is not in place before patch #2, you would need undo all
> that before returning from the sig block which would make the function
> bigger when all that is completely avoidable by accepting this patch...
> 
> Both patches were together in v1 but I decided to break them apart
> thinking that this was the right thing to do...

Yeah ok, it does make sense in the context of patch 2. Thanks!

-- 
Jens Axboe


  reply	other threads:[~2022-03-09 23:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 22:17 [PATCH v5 0/2] io_uring: Add support for napi_busy_poll Olivier Langlois
2022-03-08 22:17 ` [PATCH v5 1/2] io_uring: minor io_cqring_wait() optimization Olivier Langlois
2022-03-09  0:54   ` Jens Axboe
2022-03-09  5:36     ` Olivier Langlois
2022-03-09 23:43       ` Jens Axboe [this message]
2022-03-08 22:17 ` [PATCH v5 2/2] io_uring: Add support for napi_busy_poll Olivier Langlois
2022-03-09  0:54 ` [PATCH v5 0/2] " Jens Axboe
2022-03-09  5:47   ` Olivier Langlois
2022-03-09 23:44     ` Jens Axboe
2022-03-10 13:36 ` 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=dc8bfa6b-5e3b-e2a9-b7b5-da5bbc70d3bc@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=haoxu@linux.alibaba.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivier@trillion01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.