Zach Brown c5ddec7058 scoutfs: more aggressively shrink items
The old item shrinking was very conservative.  It would only try and
reclaim items from the front of the range of the oldest items in the
lru.  It would stop making progress if all the items in the front of the
lru are in a range whose initial item can't be reclaimed.

With the item shrinking not making progress memory fills with items.
Eventually the system backs up behind an allocation during segment
writing blocking waiting for free pages.

We fix this by much more aggressively shrinking items.  We now look for
a region of items around the oldest items to shrink.  If those fall in
the middle of a range then we use the memory from the items to construct
a new range and split the existing range.  Now the only way we'll refuse
to shrink items is if they're dirty.   We have a reasonably small cap on
the number of dirty items so we shoudln't get stuck.

Signed-off-by: Zach Brown <zab@versity.com>
2017-09-28 13:59:49 -07:00
Description
No description provided
8 MiB
Languages
C 87%
Shell 9.3%
Roff 2.5%
TeX 0.8%
Makefile 0.4%