Improve compression workspaces memory management
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | btrfs: rename and document compression workspace membersfs/ | +19 | 0 replies | |
| 2/4 | btrfs: preallocate compression workspacesfs/ | +16 | 0 replies | |
| 3/4 | btrfs: make find_workspace always succeedfs/ | +12 | 0 replies | |
| 4/4 | btrfs: make find_workspace warn if there are no workspacesfs/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Improve compression workspaces memory management
Hi,
the compression workspaces are allocated as needed an this could fail if there's no free memory. Moreover, as we might be flushing data from the restricted contexts we should try our best not to fail.
This patchset preallocates one workspace for each compression type at module load time (and tries to get one if that fails later). If any further request for new workspace fails, there's still that one to make progress. IOW workspace allocation will not fail at writeback time.
I have tested this by instrumenting the code to limit the number of workspaces to one and did some stress tests.
David Sterba (4):
btrfs: rename and document compression workspace members
btrfs: preallocate compression workspaces
btrfs: make find_workspace always succeed
btrfs: make find_workspace warn if there are no workspaces
fs/btrfs/compression.c | 85 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 24 deletions(-)
Signature · 1 line
2.7.1