Skip to content

tunables: remove legacy FreeBSD aliases #17375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robn
Copy link
Member

@robn robn commented May 24, 2025

Motivation and Context

These are old pre-OpenZFS tunable names that have long been available via either conventional ZFS_MODULE_PARAM tunables or through kstats. It seems there's no point doubling up on them after so many years, and it's time for them to go.

I'd love an old FreeBSD hand or two to look over them though. FreeBSD generally doesn't churn much, so it wouldn't surprise me if there is critical code and documentation that relies on these to remain. I'm in no hurry to nuke anything in use; on the contrary, I'd like to find out and make sure it's properly documented and tested on our side. So please review this!

Description

Here's the list of names removed, with their "new" names on the right:

old tunable name (removed) available as
vfs.zfs.arc_max vfs.zfs.arc.max
vfs.zfs.arc_min vfs.zfs.arc.min
vfs.zfs.arc_free_target vfs.zfs.arc.free_target
vfs.zfs.arc_no_grow_shift vfs.zfs.arc.no_grow_shift
vfs.zfs.l2arc_write_max vfs.zfs.l2arc.write_max
vfs.zfs.l2arc_write_boost vfs.zfs.l2arc.write_boost
vfs.zfs.l2arc_headroom vfs.zfs.l2arc.headroom
vfs.zfs.l2arc_headroom_boost vfs.zfs.l2arc.headroom_boost
vfs.zfs.l2arc_feed_secs vfs.zfs.l2arc.feed_secs
vfs.zfs.l2arc_feed_min_ms vfs.zfs.l2arc.feed_min_ms
vfs.zfs.l2arc_noprefetch vfs.zfs.l2arc.noprefetch
vfs.zfs.l2arc_feed_again vfs.zfs.l2arc.feed_again
vfs.zfs.l2arc_norw vfs.zfs.l2arc.norw
vfs.zfs.zfetch.max_distance vfs.zfs.prefetch.max_distance
vfs.zfs.zfetch.max_idistance vfs.zfs.prefetch.max_idistance
vfs.zfs.remove_max_segment vfs.zfs.vdev.remove_max_segment
vfs.zfs.removal_suspend_progress vfs.zfs.vdev.removal_suspend_progress
vfs.zfs.min_auto_ashift vfs.zfs.vdev.min_auto_ashift
vfs.zfs.max_auto_ashift vfs.zfs.vdev.max_auto_ashift
vfs.zfs.validate_skip vfs.zfs.vdev.validate_skip
vfs.zfs.top_maxinflight vfs.zfs.vdev.max_active
old stat name (removed) available as
vfs.zfs.anon_size kstat.zfs.misc.arcstats.anon_size
vfs.zfs.anon_metadata_esize kstat.zfs.misc.arcstats.anon_evictable_metadata
vfs.zfs.anon_data_esize kstat.zfs.misc.arcstats.anon_evictable_data
vfs.zfs.mru_size kstat.zfs.misc.arcstats.mru_size
vfs.zfs.mru_metadata_esize kstat.zfs.misc.arcstats.mru_evictable_metadata
vfs.zfs.mru_data_esize kstat.zfs.misc.arcstats.mru_evictable_data
vfs.zfs.mru_ghost_size kstat.zfs.misc.arcstats.mru_ghost_size
vfs.zfs.mru_ghost_metadata_esize kstat.zfs.misc.arcstats.mru_ghost_evictable_metadata
vfs.zfs.mru_ghost_data_esize kstat.zfs.misc.arcstats.mru_ghost_evictable_data
vfs.zfs.mfu_size kstat.zfs.misc.arcstats.mfu_size
vfs.zfs.mfu_metadata_esize kstat.zfs.misc.arcstats.mfu_evictable_metadata
vfs.zfs.mfu_data_esize kstat.zfs.misc.arcstats.mfu_evictable_data
vfs.zfs.mfu_ghost_size kstat.zfs.misc.arcstats.mfu_ghost_size
vfs.zfs.mfu_ghost_metadata_esize kstat.zfs.misc.arcstats.mfu_ghost_evictable_metadata
vfs.zfs.mfu_ghost_data_esize kstat.zfs.misc.arcstats.mfu_ghost_evictable_data
vfs.zfs.uncached_size kstat.zfs.misc.arcstats.uncached_size
vfs.zfs.uncached_metadata_esize kstat.zfs.misc.arcstats.uncached_evictable_metadata
vfs.zfs.uncached_data_esize kstat.zfs.misc.arcstats.uncached_evictable_data
vfs.zfs.l2c_only_size kstat.zfs.misc.arcstats.l2_size

Note that there's still a handful of tunables in module/os/freebsd/zfs/sysctl_os.c that don't have "core" counterparts; those remain for the moment. I also haven't touched vfs.zfs.debugflags even though vfs.zfs.flags exists, because I think the former is a little smarter. I'll sort all these out another time.

How Has This Been Tested?

ZTS run in progress on FreeBSD 14.2-p1.

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:

@robn robn mentioned this pull request May 24, 2025
14 tasks
@amotin
Copy link
Member

amotin commented May 25, 2025

Appears even CI itself uses some. We need to update tunables.cfg.

@amotin amotin added the Status: Revision Needed Changes are required for the PR to be accepted label May 25, 2025
@robn
Copy link
Member Author

robn commented May 25, 2025

Huh, thanks. I need to fix my test rig some then, because it didn't throw those up (I mean yeah, the CI did, but I hadn't got into that yet). Cheers :)

These are old pre-OpenZFS tunable names that have long been
available via either conventional ZFS_MODULE_PARAM tunables or through
kstats. There's no point doubling up anymore, so delete them.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <[email protected]>
@robn robn force-pushed the tunables-cleanup-freebsd branch from 41852c3 to 911a0cb Compare May 25, 2025 02:41
@github-actions github-actions bot removed the Status: Revision Needed Changes are required for the PR to be accepted label May 25, 2025
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.

2 participants