Page MenuHomeFreeBSD

vfs: reimplement vlrureclaim to actually use LRU

Authored by mjg on Jan 7 2020, 5:08 PM.



Global ordering introduced in D22997 makes it possible. Since the current version of the routine discussed issues with it, I did the same with the new routine. I consider it to be enough of an improvement to go in as it is.

Tested by setting kern.maxvnodes=5000 and doing buildkernel. Results were similar to the stock kernel since vnode both vnode pressure is too much AND vlrureclaim only has one mode to go over everything (instead of only part of the list). This will be fixed later.

Test Plan

stress2 and whatnot

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 7 2020, 5:08 PM
kib accepted this revision.Jan 11 2020, 3:18 PM
This revision is now accepted and ready to land.Jan 11 2020, 3:18 PM
mjg updated this revision to Diff 66628.Jan 11 2020, 4:30 PM
mjg edited the summary of this revision. (Show Details)
  • fix an accounting bug (returned value got ignored)
  • since this code does not blindly requeue everything just walk the list till the end
  • improvement was a side effect of a bug where vnlru would just not reclaim
This revision now requires review to proceed.Jan 11 2020, 4:30 PM
mckusick accepted this revision.Jan 13 2020, 5:04 AM

This change seems like an improvement over what we have now.

This revision is now accepted and ready to land.Jan 13 2020, 5:04 AM
This revision was automatically updated to reflect the committed changes.