Hello,
This patch reduces zlib compression memory usage by `merging' inflate
and deflate streams into a single stream.
-- v2: rebased-on linux-next rc4 20140707
Sergey Senozhatsky (1):
btrfs compression: merge inflate and deflate z_streams
fs/btrfs/zlib.c
one of size:
max(zlib_deflate_workspacesize(), zlib_inflate_workspacesize())
Reviewed-by: David Sterba
Signed-off-by: Sergey Senozhatsky
---
fs/btrfs/zlib.c | 138
1 file changed, 68 insertions(+), 70 deletions(-)
diff --git a/fs/btrfs/zlib.c b/fs/
On (07/01/14 16:44), David Sterba wrote:
> On Tue, Jul 01, 2014 at 12:32:10AM +0900, Sergey Senozhatsky wrote:
> > `struct workspace' used for zlib compression contains two zlib
> > z_stream-s: `def_strm' used in zlib_compress_pages(), and `inf_strm
one of size:
max(zlib_deflate_workspacesize(), zlib_inflate_workspacesize())
Signed-off-by: Sergey Senozhatsky
---
fs/btrfs/zlib.c | 138
1 file changed, 68 insertions(+), 70 deletions(-)
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index 4f19631..
f address translations.
p.s. This patch is theoretical, no testing has been performed in order to
support this patch.
Sergey Senozhatsky (1):
btrfs compression: reuse recently used workspace
fs/btrfs/compression.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.0.0.548.ge727dec
--
To un
Add compression `workspace' in free_workspace() to
`idle_workspace' list head, instead of tail. So we have
better chances to reuse most recently used `workspace'.
Signed-off-by: Sergey Senozhatsky
---
fs/btrfs/compression.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)