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)
Fri, Oct 18, 10:20 AM
Unknown Object (File)
Fri, Oct 18, 5:35 AM
Unknown Object (File)
Fri, Oct 18, 3:16 AM
Unknown Object (File)
Thu, Oct 17, 10:12 PM
Unknown Object (File)
Oct 13 2024, 5:48 PM
Unknown Object (File)
Oct 2 2024, 1:11 PM
Unknown Object (File)
Oct 2 2024, 8:51 AM
Unknown Object (File)
Oct 2 2024, 7:03 AM

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.