From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/4] Improve compression workspaces memory management
Date: Thu, 5 May 2016 18:36:10 +0200 [thread overview]
Message-ID: <cover.1462460924.git.dsterba@suse.com> (raw)
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
next reply other threads:[~2016-05-05 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 16:36 David Sterba [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1462460924.git.dsterba@suse.com \
--to=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).