From: "Theodore Ts'o" <tytso@mit.edu>
To: zhangshida <starzhangzsd@gmail.com>
Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, zhangshida@kylinos.cn,
Andreas Dilger <adilger@dilger.ca>
Subject: Re: [PATCH] ext4: Modify the rec_len helpers to accommodate future cases
Date: Thu, 17 Aug 2023 13:31:23 -0400 [thread overview]
Message-ID: <20230817173123.GD2247938@mit.edu> (raw)
In-Reply-To: <20230807012654.55951-1-zhangshida@kylinos.cn>
On Mon, Aug 07, 2023 at 09:26:54AM +0800, zhangshida wrote:
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> Following Andreas' suggestion, it is time to adapt these helpers
> to handle larger records during runtime, especially in preparation
> for the eventual support of ext4 with a block size greater than
> PAGE_SIZE.
Is there a reason for landing this now? We don't have support for
block_size > PAGE_SIZE yet, and this patch doesn't come for free, at
least not systems with page_size < 64k. These inline functions are
*very* hot and get used in a large number of places. Have you looked
to see what it might do to text size of the ext4 code? And whether
the expansion to the icache might actually impact performance on CPU
bound workloads with very large directories?
I will note that there are some opportunities to optimize how often we
use ext4_rec_len_from_disk. For example, it gets called from
ext4_check_dir_entry(), and often the callers of that function will
need the directory record length. So having ext4_check_dir_entry()
optionally fill in the rec_len via a passed-in pointer might be
worthwhile.
Cheers,
- Ted
next prev parent reply other threads:[~2023-08-17 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 1:26 [PATCH] ext4: Modify the rec_len helpers to accommodate future cases zhangshida
2023-08-17 17:31 ` Theodore Ts'o [this message]
2023-08-19 2:38 ` Stephen Zhang
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=20230817173123.GD2247938@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=starzhangzsd@gmail.com \
--cc=zhangshida@kylinos.cn \
/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).