From: Jens Axboe <axboe@kernel.dk>
To: Gabriel Krisman Bertazi <krisman@suse.de>,
Breno Leitao <leitao@debian.org>
Cc: asml.silence@gmail.com, io-uring@vger.kernel.org,
linux-kernel@vger.kernel.org, gustavold@meta.com, leit@meta.com,
kasan-dev@googlegroups.com
Subject: Re: [PATCH v3 1/2] io_uring: Move from hlist to io_wq_work_node
Date: Thu, 23 Feb 2023 12:39:25 -0700 [thread overview]
Message-ID: <8404f520-2ef7-b556-08f6-5829a2225647@kernel.dk> (raw)
In-Reply-To: <87wn48ryri.fsf@suse.de>
On 2/23/23 12:02?PM, Gabriel Krisman Bertazi wrote:
> Breno Leitao <leitao@debian.org> writes:
>
>> Having cache entries linked using the hlist format brings no benefit, and
>> also requires an unnecessary extra pointer address per cache entry.
>>
>> Use the internal io_wq_work_node single-linked list for the internal
>> alloc caches (async_msghdr and async_poll)
>>
>> This is required to be able to use KASAN on cache entries, since we do
>> not need to touch unused (and poisoned) cache entries when adding more
>> entries to the list.
>>
>
> Looking at this patch, I wonder if it could go in the opposite direction
> instead, and drop io_wq_work_node entirely in favor of list_head. :)
>
> Do we gain anything other than avoiding the backpointer with a custom
> linked implementation, instead of using the interface available in
> list.h, that developers know how to use and has other features like
> poisoning and extra debug checks?
list_head is twice as big, that's the main motivation. This impacts
memory usage (obviously), but also caches when adding/removing
entries.
--
Jens Axboe
next prev parent reply other threads:[~2023-02-23 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 16:43 [PATCH v3 0/2] io_uring: Add KASAN support for alloc caches Breno Leitao
2023-02-23 16:43 ` [PATCH v3 1/2] io_uring: Move from hlist to io_wq_work_node Breno Leitao
2023-02-23 19:02 ` Gabriel Krisman Bertazi
2023-02-23 19:39 ` Jens Axboe [this message]
2023-02-24 18:32 ` Gabriel Krisman Bertazi
2023-02-24 19:41 ` Jens Axboe
2023-02-24 9:55 ` Breno Leitao
2023-02-23 16:43 ` [PATCH v3 2/2] io_uring: Add KASAN support for alloc_caches Breno Leitao
2023-02-23 19:09 ` Gabriel Krisman Bertazi
2023-03-16 19:01 ` [PATCH v3 0/2] io_uring: Add KASAN support for alloc caches 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=8404f520-2ef7-b556-08f6-5829a2225647@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=gustavold@meta.com \
--cc=io-uring@vger.kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=krisman@suse.de \
--cc=leit@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@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