Page MenuHomeFreeBSD

MFV r323535: 8585 improve batching done in zil_commit()
ClosedPublic

Authored by avg on Sep 13 2017, 11:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 20 2024, 11:02 PM
Unknown Object (File)
Jan 13 2024, 12:42 PM
Unknown Object (File)
Jan 13 2024, 2:56 AM
Unknown Object (File)
Jan 6 2024, 6:02 AM
Unknown Object (File)
Dec 23 2023, 12:33 AM
Unknown Object (File)
Oct 25 2023, 1:04 AM
Unknown Object (File)
Sep 19 2023, 10:32 PM
Unknown Object (File)
Aug 27 2023, 8:42 PM

Details

Summary

https://github.com/illumos/illumos-gate/commit/1271e4b10dfaaed576c08a812f466f6e81370e5e
https://www.illumos.org/issues/8585
https://github.com/openzfs/openzfs/pull/447

This review request is to invite reviewers and testers for this rather complex change.

Also, please note that this MFV reverts FreeBSD commit rS314549 to make the merge easier.
Another note is that at present our emulation of cv_timedwait_hires is rather poor, so I elected to use cv_timedwait_sbt directly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg added a reviewer: allanjude.

I red it quite briefly, but I suspect that use of cv_timedwait_sbt() together gethrtime() may not work right due to rounding issues. As is was already mentioned by others, in most cases use of SBT_1NS is a direct request for troubles. My fault.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
2335 ↗(On Diff #33012)

I have doubt this will work correctly. SBT_1NS is too approximate, especially for use with long periods of time such as uptime.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
2335 ↗(On Diff #33012)

gibbs recently committed code that fixes this issue...

avg added inline comments.
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
2335 ↗(On Diff #33012)

nstosbt in sys/sys/time.h?
Seems like it was added by @ian in rS321686.
Thank you for the hint! I also fell into the honeypot that the commit warns about.

2335 ↗(On Diff #33012)

Another alternative would be to use sbintime_t for sleep and wakeup variables and minimize conversions.

a better solution to sbintime_t vs hrtime_t

@avg Please see also D11779 which has another nstosbt() change in it that I didn't want to commit without review because I don't know if there's anything special about committing into the sys/cddl hierarchy.

This revision was automatically updated to reflect the committed changes.