Page MenuHomeFreeBSD

Unlocked grab for shm.

Authored by jeff on Feb 27 2020, 10:38 PM.



This makes tmpfs more scalable but I want to point out something larger.

This demonstrates a highly scalable pattern that could be applied to all memory resident I/O. It has long been my intention to relegate the buffer cache to an increasingly narrow set of uses due to the legacy design and the scalability issues with lockmgr and exclusive buf locks.

After the introduction of a stronger busy guarantee and lockfree lookup, we can permit file I/O that only contends at the page level. You could eventually even avoid the shared vnode lock when reading cached data.

Diff Detail

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

Event Timeline

jeff added reviewers: alc, dougm, kib, markj.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
219 ↗(On Diff #68923)

Nothing is preventing m from being freed once it is unbusied. The vm_page_activate() call must come first.

At the moment, vm_page_activate() only asserts that m->ref_count > 0. We could probably assert that the page is either busy or that the object is locked if ref_count == VPRC_OBJREF.

219 ↗(On Diff #68923)

Yeah that would be better. I just reshuffled it because I thought it was unnecessary but of course that makes sense.

Ok to commit after fix?

This revision is now accepted and ready to land.Feb 28 2020, 7:09 PM