Skip to content

Use reduced precision for scan times - #18061

Merged
behlendorf merged 1 commit into
openzfs:masterfrom
amotin:scan_time
Dec 18, 2025
Merged

behlendorf merged 1 commit into
openzfs:masterfrom
amotin:scan_time

Conversation

@amotin

@amotin amotin commented Dec 17, 2025 •

Copy link
Copy Markdown
Member

Scan time limits do not need precision beyond 1ms. Switching scn_sync_start_time and spa_sync_starttime from gethrtime() to getlrtime() saves ~3% of CPU time during resilver scan stage.

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:

@amotin amotin added the Status: Code Review Needed Ready for review and testing label Dec 17, 2025
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Signed-off-by: Alexander Motin 
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 18, 2025
@behlendorf
behlendorf merged commit 962e688 into openzfs:master Dec 18, 2025
41 of 42 checks passed
amotin added a commit to amotin/zfs that referenced this pull request Jan 29, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
mcmilk pushed a commit to mcmilk/zfs that referenced this pull request Jan 31, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
amotin added a commit to amotin/zfs that referenced this pull request Feb 3, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Feb 5, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
tonyhutter pushed a commit that referenced this pull request Feb 5, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes #18061
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf 
Signed-off-by: Alexander Motin 
Closes openzfs#18061
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.

2 participants