Skip to content

metaslab: expose zfs_metaslab_condense_pct and zfs_metaslab_sm_blksz_* on Linux#18594

Open
chrislongros wants to merge 1 commit into
openzfs:masterfrom
chrislongros:feature/expose-zfs-condense-pct-on-linux
Open

metaslab: expose zfs_metaslab_condense_pct and zfs_metaslab_sm_blksz_* on Linux#18594
chrislongros wants to merge 1 commit into
openzfs:masterfrom
chrislongros:feature/expose-zfs-condense-pct-on-linux

Conversation

@chrislongros
Copy link
Copy Markdown
Contributor

@chrislongros chrislongros commented May 27, 2026

Motivation and Context

zfs_condense_pct controls how aggressively per-metaslab on-disk space maps are rewritten in compact form.
zfs_metaslab_sm_blksz_with_log controls Block size for space map in pools with log space map enabled.
They are already tunables on FreeBSD but had no Linux equivalents.

Description

  • Register zfs_condense_pct and zfs_metaslab_sm_blksz_* with ZFS_MODULE_PARAM in module/zfs/metaslab.c, alongside the existing metaslab tunables.
  • Add a matching entry in man/man4/zfs.4.

How Has This Been Tested?

Tested on an Arch Linux VM with the patched module.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label May 27, 2026
Copy link
Copy Markdown
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. But I see there also zfs_metaslab_sm_blksz_*, which are also not OS-specific. And may be while at it zfs_condense_pct could be renamed to not collide with zpool condense in #16747.

@chrislongros
Copy link
Copy Markdown
Contributor Author

chrislongros commented May 28, 2026

Good catch. But I see there also zfs_metaslab_sm_blksz_*, which are also not OS-specific. And may be while at it zfs_condense_pct could be renamed to not collide with zpool condense in #16747.

What about zfs_spacemap_condense_pct as a new alternative name?

@amotin
Copy link
Copy Markdown
Member

amotin commented May 28, 2026

What about zfs_spacemap_condense_pct as a new alternative name?

I'd think all 3 should go same way for uniformity. We don't have "spacemap" node, but we do have "metaslab" node, where the other two are living now.

@behlendorf behlendorf added Status: Code Review Needed Ready for review and testing Status: Revision Needed Changes are required for the PR to be accepted and removed Status: Accepted Ready to integrate (reviewed, tested) Status: Code Review Needed Ready for review and testing labels May 28, 2026
…* on Linux

expose tunables on linux

Signed-off-by: Christos Longros <chris.longros@gmail.com>
@chrislongros chrislongros force-pushed the feature/expose-zfs-condense-pct-on-linux branch from 5ecf8ec to 459cb7f Compare May 30, 2026 17:16
@github-actions github-actions Bot removed the Status: Revision Needed Changes are required for the PR to be accepted label May 30, 2026
@chrislongros chrislongros changed the title metaslab: expose zfs_condense_pct on Linux metaslab: expose zfs_metaslab_condense_pct and zfs_metaslab_sm_blksz_* on Linux May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants