mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Max Kellermann <max.kellermann@ionos.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca,
	libaokun@linux.alibaba.com, jack@suse.cz, ojaswin@linux.ibm.com,
	ritesh.list@gmail.com, yi.zhang@huawei.com,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Max Kellermann <max.kellermann@ionos.com>
Subject: [PATCH 0/3] ext4: reduce per-inode memory overhead
Date: Wed, 11 Nov 2026 13:52:39 +0100	[thread overview]
Message-ID: <20261111125242.1078620-1-max.kellermann@ionos.com> (raw)

This series reduces the size of `struct ext4_inode_info` by improving
timestamp packing and allowing fast commit and bigalloc support to be
omitted at compile time.

The incremental reductions are:

  Disable CONFIG_EXT4_FS_FAST_COMMIT              48 bytes
  Disable CONFIG_EXT4_FS_BIGALLOC                  8 bytes
  Compact creation time, with fast commit off      8 bytes
                                                 --------
  Total                                          64 bytes

On our production server with 35 million ext4 inode objects (a big
fscache partition), this saves 2.1 GB RAM.

Both new Kconfig options default to enabled.  Without fast commit
support, clean filesystems use ordinary journal commits; journals
requiring fast commit recovery are rejected.  Without bigalloc
support, bigalloc filesystems are rejected before journal recovery,
including for read-only mounts.

Max Kellermann (3):
  ext4: make fast commit support optional
  ext4: make bigalloc support optional
  ext4: store creation time in separate seconds and nanoseconds

 Documentation/filesystems/ext4/bigalloc.rst |  6 ++
 Documentation/filesystems/ext4/journal.rst  |  7 ++
 fs/ext4/Kconfig                             | 31 ++++++++
 fs/ext4/Makefile                            |  3 +-
 fs/ext4/ext4.h                              | 83 +++++++++++++++++++--
 fs/ext4/extents_status.c                    | 44 ++++++++++-
 fs/ext4/extents_status.h                    | 15 ++++
 fs/ext4/ialloc.c                            |  3 +-
 fs/ext4/inode.c                             |  8 +-
 fs/ext4/super.c                             | 40 ++++++++--
 fs/ext4/sysfs.c                             |  6 ++
 include/trace/events/ext4.h                 |  3 +
 12 files changed, 227 insertions(+), 22 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-11-11 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 12:52 Max Kellermann [this message]
2026-11-11 12:52 ` [PATCH 1/3] ext4: make fast commit support optional Max Kellermann
2026-11-11 12:52 ` [PATCH 2/3] ext4: make bigalloc " Max Kellermann
2026-11-11 12:52 ` [PATCH 3/3] ext4: store creation time in separate seconds and nanoseconds Max Kellermann

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=20261111125242.1078620-1-max.kellermann@ionos.com \
    --to=max.kellermann@ionos.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.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

all inboxes | Powered by JetHome®