Skip to content

ext4: reduce per-inode memory overhead

Max Kellermann linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ext4: make fast commit support optionalDocumentation/filesystems/ext4/journal.rst fs/ext4/Kconfig fs/ext4/Makefile +5 more+121 -111 reply
2/3ext4: make bigalloc support optionalDocumentation/filesystems/ext4/bigalloc.rst fs/ext4/Kconfig fs/ext4/ext4.h +3 more+89 -30 replies
3/3ext4: store creation time in separate seconds and nanosecondsfs/ext4/ext4.h fs/ext4/ialloc.c fs/ext4/inode.c+17 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ext4: reduce per-inode memory overhead

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(-)
Signature · 1 line
2.53.0