Skip to content

btrfs: reclaim compression cache in shrinker-sized batches#10

Draft
eeea2222 wants to merge 1 commit into
CachyOS:7.0/cachyfrom
eeea2222:codex/btrfs-compression-shrinker-batch
Draft

btrfs: reclaim compression cache in shrinker-sized batches#10
eeea2222 wants to merge 1 commit into
CachyOS:7.0/cachyfrom
eeea2222:codex/btrfs-compression-shrinker-batch

Conversation

@eeea2222

Copy link
Copy Markdown

Summary

Make the Btrfs compression page-pool shrinker reclaim only the requested shrinker batch under memory pressure instead of draining the whole cached page list.

Teardown behavior is preserved: calls without a shrink control still drain the full cache.

Why

The previous scan path drained the entire compression page cache once reclaim asked for objects. That can discard more cached pages than requested and cause avoidable reallocation churn in compressed Btrfs workloads.

Compatibility

No userspace ABI, module contract, exported symbol, Kconfig, or dependency changes. This is an internal shrinker behavior refinement.

Validation

  • Passed targeted ARCH=um object build for fs/btrfs/compression.o.
  • x86 object validation was attempted locally but blocked before compiling this object because the host environment lacked gelf.h, required by objtool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant