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)
Sep 28 2024, 1:31 PM
Unknown Object (File)
Sep 26 2024, 9:28 AM
Unknown Object (File)
Sep 24 2024, 9:33 AM
Unknown Object (File)
Sep 22 2024, 11:15 PM
Unknown Object (File)
Sep 19 2024, 9:57 PM
Unknown Object (File)
Sep 18 2024, 11:34 PM
Unknown Object (File)
Sep 9 2024, 2:17 AM
Unknown Object (File)
Sep 8 2024, 6:11 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.