[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36cd0f716bda419f477c3256769f382a31461481.camel@trillion01.com>
Date: Wed, 09 Mar 2022 00:36:47 -0500
From: Olivier Langlois <olivier@...llion01.com>
To: Jens Axboe <axboe@...nel.dk>,
Pavel Begunkov <asml.silence@...il.com>
Cc: Hao Xu <haoxu@...ux.alibaba.com>,
io-uring <io-uring@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 1/2] io_uring: minor io_cqring_wait() optimization
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...
Powered by blists - more mailing lists