From: Benjamin LaHaise <bcrl@kvack.org>
To: Hamza Mahfooz <someguy@effective-light.com>
Cc: linux-kernel@vger.kernel.org,
kernel test robot <yujie.liu@intel.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-aio@kvack.org
Subject: Re: [PATCH v2] aio: convert active_reqs into a hashtable
Date: Sun, 19 Sep 2021 10:56:45 -0400 [thread overview]
Message-ID: <20210919145645.GE16005@kvack.org> (raw)
In-Reply-To: <20210919144146.19531-1-someguy@effective-light.com>
On Sun, Sep 19, 2021 at 10:41:46AM -0400, Hamza Mahfooz wrote:
> Commit 833f4154ed56 ("aio: fold lookup_kiocb() into its sole caller")
> suggests that, the fact that active_reqs is a linked-list means aio_kiocb
> lookups in io_cancel() are inefficient. So, to get faster lookups (on
> average) while maintaining similar insertion and deletion characteristics,
> turn active_reqs into a hashtable.
You're doing this wrong. If you want faster cancellations, stash an index
into iocb->aio_key to index into an array with all requests rather than
using a hash table.
-ben
--
"Thought is the essence of where you are now."
next prev parent reply other threads:[~2021-09-19 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-19 14:41 [PATCH v2] aio: convert active_reqs into a hashtable Hamza Mahfooz
2021-09-19 14:56 ` Benjamin LaHaise [this message]
2021-09-23 13:00 ` Hamza Mahfooz
2021-09-23 16:37 ` Benjamin LaHaise
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=20210919145645.GE16005@kvack.org \
--to=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=someguy@effective-light.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yujie.liu@intel.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 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).