Page MenuHomeFreeBSD

Provide a generalized way to retry IPIs with allowing CPUs to mark completion
ClosedPublic

Authored by mjg on Feb 8 2020, 3:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 20, 8:02 PM
Unknown Object (File)
May 29 2024, 10:13 AM
Unknown Object (File)
May 22 2024, 10:31 PM
Unknown Object (File)
Apr 24 2024, 8:39 PM
Unknown Object (File)
Apr 24 2024, 10:51 AM
Unknown Object (File)
Feb 29 2024, 12:53 AM
Unknown Object (File)
Feb 24 2024, 3:23 AM
Unknown Object (File)
Feb 3 2024, 7:50 PM
Subscribers

Details

Summary

This is moved away from sleepable rm locks.

vfs patch is here as a demo, will be committed separately. This eliminates an atomic from vfs busy/unbusy and vfs_cache_root. This is not ported over to rms locks instead because of granularity -- right now it's all or nothing, but for example suspending writes should not prevent root vnode lookup from working (and later on it wont).

Diff Detail

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

Event Timeline

sys/kern/kern_rmlock.c
1031 ↗(On Diff #67980)

Why did this barrier go?

sys/kern/kern_rmlock.c
1031 ↗(On Diff #67980)

It is spurious in that smp_rendezvous_cpus issues it internally, but I can add it back if only for clarity.

sys/kern/kern_rmlock.c
1031 ↗(On Diff #67980)

To that point, note all smp_rendezvous_cpus consumers depend on said barrier being there.

sys/kern/kern_rmlock.c
1031 ↗(On Diff #67980)

I would just not delete the whole comment block. I wouldn't add fences that are not necessary.

sys/kern/kern_rmlock.c
1031 ↗(On Diff #67980)

If a comment should exist, it should be placed above smp_rendezvous_cpus and state that it provides appropriate fencing.

  1. release fence on the calling CPU before issuing any IPIs
  2. acquire fence on targeted CPUs so that they see the update
  3. release fence after all work is complete so that targeted CPUs publish everything
  4. acquire fence on the calling CPU so that it sees said updates

Note the routine has comments to that effect internally.

  • add a comment about dependence on smp_rendezvous fences
  • drop a spurious acq

I don't object but I haven't entirely understood it.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 12 2020, 11:17 AM
Closed by commit rS357808: Add smp_rendezvous_cpus_retry (authored by mjg). · Explain Why
This revision was automatically updated to reflect the committed changes.