Skip to content

Conversation

tsoome
Copy link
Contributor

@tsoome tsoome commented Jan 3, 2025

Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT, use save_tunable and restore_tunable to restore the pre-test state.

Motivation and Context

Description

Once tests are done, we want to restore system state to the pre-tests state, which may be different from currently hardwired value.

How Has This Been Tested?

Types of changes

  • [ x] 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)
  • 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:

  • [x ] My code follows the OpenZFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • [x ] All commit messages are properly formatted and contain Signed-off-by.

Copy link
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.

Thanks. Just a nit that all existing restore_tunable uses do it under log_must. Would be good to add it here too.

@amotin amotin added the Status: Code Review Needed Ready for review and testing label Jan 3, 2025
Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT,
use save_tunable and restore_tunable to restore the pre-test state.

Signed-off-by: Toomas Soome <[email protected]>
@tsoome
Copy link
Contributor Author

tsoome commented Jan 3, 2025

Thanks. Just a nit that all existing restore_tunable uses do it under log_must. Would be good to add it here too.

done.

@amotin amotin added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 3, 2025
@behlendorf behlendorf merged commit ee3bde9 into openzfs:master Jan 3, 2025
22 of 24 checks passed
@tsoome tsoome deleted the pool_checkpoint branch January 3, 2025 22:51
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jan 3, 2025
Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT,
use save_tunable and restore_tunable to restore the pre-test state.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Toomas Soome <[email protected]>
Closes openzfs#16919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants