linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Improve compression workspaces memory management
@ 2016-05-05 16:36 David Sterba
  2016-05-05 16:36 ` [PATCH 1/4] btrfs: rename and document compression workspace members David Sterba
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Sterba @ 2016-05-05 16:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

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(-)

-- 
2.7.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-05 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 16:36 [PATCH 0/4] Improve compression workspaces memory management David Sterba
2016-05-05 16:36 ` [PATCH 1/4] btrfs: rename and document compression workspace members David Sterba
2016-05-05 16:36 ` [PATCH 2/4] btrfs: preallocate compression workspaces David Sterba
2016-05-05 16:36 ` [PATCH 3/4] btrfs: make find_workspace always succeed David Sterba
2016-05-05 16:36 ` [PATCH 4/4] btrfs: make find_workspace warn if there are no workspaces David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).