From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, dlemoal@kernel.org
Subject: Re: [PATCH 6/6] block: convert struct blk_plug callback list to hlists
Date: Wed, 24 Jan 2024 01:30:26 -0800 [thread overview]
Message-ID: <ZbDYssPlyoPUGvqI@infradead.org> (raw)
In-Reply-To: <20240123173310.1966157-7-axboe@kernel.dk>
On Tue, Jan 23, 2024 at 10:30:38AM -0700, Jens Axboe wrote:
> We currently use a doubly linked list, which means the head takes up
> 16 bytes. As any iteration goes over the full list by first splicing it
> to an on-stack copy, we never need to remove members from the middle of
> the list.
>
> Convert it to an hlist instead, saving 8 bytes in the blk_plug structure.
> This also helps save 40 bytes of text in the core block code, tested on
> arm64.
>
> This does mean that flush callbacks will be run in reverse. While this
> should not pose a problem, we can always change the list splicing to
> just iteration-and-add instead, preservering ordering. These lists are
> generally just a single entry (or a few entries), either way this should
> be fine.
That would complete mess up I/O order for anyone using flush callbacks,
I don't think that's great.
next prev parent reply other threads:[~2024-01-24 9:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 17:30 [PATCHSET v4 0/6] Cache issue side time querying Jens Axboe
2024-01-23 17:30 ` [PATCH 1/6] block: move cgroup time handling code into blkdev.h Jens Axboe
2024-01-23 17:30 ` [PATCH 2/6] block: add blk_time_get_ns() and blk_time_get() helpers Jens Axboe
2024-01-24 9:28 ` Christoph Hellwig
2024-01-24 15:04 ` Jens Axboe
2024-01-23 17:30 ` [PATCH 3/6] block: cache current nsec time in struct blk_plug Jens Axboe
2024-01-23 17:30 ` [PATCH 4/6] block: update cached timestamp post schedule/preemption Jens Axboe
2024-01-23 17:55 ` Keith Busch
2024-01-23 19:15 ` Jens Axboe
2024-01-23 17:30 ` [PATCH 5/6] block: shrink plug->{nr_ios, rq_count} to unsigned char Jens Axboe
2024-01-24 9:29 ` Christoph Hellwig
2024-01-24 15:04 ` Jens Axboe
2024-01-23 17:30 ` [PATCH 6/6] block: convert struct blk_plug callback list to hlists Jens Axboe
2024-01-24 9:30 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-18 19:20 [PATCHSET RFC v3 0/6] Cache issue side time querying Jens Axboe
2024-01-18 19:20 ` [PATCH 6/6] block: convert struct blk_plug callback list to hlists 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=ZbDYssPlyoPUGvqI@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=linux-block@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).