Page MenuHomeFreeBSD

ufs: try to elide the interlock in ufs_itimes
ClosedPublic

Authored by mjg on Sep 10 2022, 9:33 PM.
Tags
None
Referenced Files
F83178551: D36522.diff
Tue, May 7, 8:37 AM
Unknown Object (File)
Thu, May 2, 8:52 PM
Unknown Object (File)
Thu, May 2, 7:37 PM
Unknown Object (File)
Thu, May 2, 7:37 PM
Unknown Object (File)
Thu, May 2, 7:37 PM
Unknown Object (File)
Thu, May 2, 7:10 PM
Unknown Object (File)
Mar 19 2024, 8:19 AM
Unknown Object (File)
Feb 17 2024, 11:42 PM
Subscribers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mjg requested review of this revision.Sep 10 2022, 9:33 PM
mjg created this revision.

Then why checking for v_usecount > 1 at all? It can go to 1 at any time.

I'm guessing the original code was avoiding the call, expecting for it to happen in ufs_inactive later. This retains the ultimately racy nature, except avoids the interlock.

I agree, it probably was an attempt for micro-optimization, I do not see any other reason. Then, since inactivation is not guaranteed to occur now, while close is, I think the check for v_usecount should be removed.

mjg retitled this revision from ufs: do a lockless usecount check in ufs_close to ufs: try to elide the interlock in ufs_itimes.
mjg edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 13 2022, 10:17 AM

With updates, looks good.

This revision was automatically updated to reflect the committed changes.