Page MenuHomeFreeBSD

(lookup 2) vfs: add the infrastructure for lockless lookup
ClosedPublic

Authored by mjg on Jul 6 2020, 7:29 PM.
Tags
None
Referenced Files
F81620455: D25577.id74908.diff
Fri, Apr 19, 2:32 AM
Unknown Object (File)
Wed, Apr 17, 2:15 PM
Unknown Object (File)
Jan 28 2024, 2:47 PM
Unknown Object (File)
Jan 28 2024, 2:47 PM
Unknown Object (File)
Jan 28 2024, 2:47 PM
Unknown Object (File)
Jan 28 2024, 2:47 PM
Unknown Object (File)
Jan 28 2024, 2:45 PM
Unknown Object (File)
Jan 28 2024, 2:45 PM
Subscribers

Details

Summary

Assorted changes split out from the complete diff. Some have value on their own, but for the most part are only there for the new lookup.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 32163

Event Timeline

mjg requested review of this revision.Jul 6 2020, 7:29 PM
sys/kern/kern_descrip.c
3354

I am still surprised with such loops. Don't you need yield sometimes ?

sys/kern/vfs_subr.c
3082

Why not extract this block from there and vget_finish() into a common function ?

sys/kern/kern_descrip.c
3354

If worrying about excessive looping, I think the right solution is to do the above once and in case of failure take the lock.

sys/kern/vfs_subr.c
3082

ok, will update later

sys/kern/kern_descrip.c
3354

My concern that if we are on UP and mutator is preempted by this loop at the unlucky moment, system can be livelocked.

  • rebase

does not address vref_smr yet

sys/kern/vfs_subr.c
3082

So I don't know how to name this. In the patchset I introduce vget_finish_ref later to facilitate WANTPARENT/!LOCKLEAF lookups, but I'm not going to call something like that from vref.

sys/kern/vfs_subr.c
3082

I would call it vref_hold() or vget_ref_hold(). This name describes the action of the code.

  • add vfs_smr_entered_load
  • vget_finish_ref
sys/kern/vfs_subr.c
3082

I reworked the only consumer of vref_smr to use vget direclty instead, thus getting rid of the problem for the time being.

This revision is now accepted and ready to land.Jul 13 2020, 6:24 PM
This revision was automatically updated to reflect the committed changes.