Page MenuHomeFreeBSD

vfs: refactor vnode allocation

Authored by mjg on Jan 13 2020, 8:44 PM.



Semantics are preserved. One benefit is that there are fewer accesses to both numvnodes and freevnodes.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mjg created this revision.Jan 13 2020, 8:44 PM
jeff accepted this revision.Jan 15 2020, 11:45 PM

I do not object to this patch but I would be more comfortable with kib reviewing.

This revision is now accepted and ready to land.Jan 15 2020, 11:45 PM
kib accepted this revision.Jan 16 2020, 2:01 PM
kib added inline comments.
1508 ↗(On Diff #66700)

Small change is that cyclecount was zeroed before when numvnodes < desiredvnodes.

1537 ↗(On Diff #66700)

Style recommends putting binary op on the previous line.

1545 ↗(On Diff #66700)

You can unlock vnode_list_mtx before wakeup.

This revision was automatically updated to reflect the committed changes.