Files
scoutfs/kmod
Zach Brown 3f812fa9a7 More thoroughly integrate compaction
The first pass at compaction just kicked a thread any time we added a
segment that brought its level's count over the limit.  Tasks could
create dirty items and write level0 segments regardless of the progress
of compaction.

This ties the writing rate to compaction.  Writers have to wait to hold
a transaction until the dirty item count is under a segment and there's
no level0 segments.  Usualy more level0 segments are allowed but we're
aggressively pushing compaction, we'll relax this later.

This also more forcefully ensures that compaction makes forward
progress.  We kick the compaction thread if we exceed the level count,
wait for level0 to drain, or successfully complete a compaction.  We
tweak scoutfs_manifest_next_compact() to return 0 if there's no
compaction work to do so the the compaction thread can exit without
triggering another.

For clarity we also kick off a sync after compaction so that we don't
sit around with a dirty manifest until the next sync.  This may not be
wise.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 13:44:53 -07:00
..
2017-04-18 13:44:53 -07:00
2016-10-20 13:55:31 -07:00