summaryrefslogtreecommitdiff
path: root/include/net/mac802154.h
diff options
context:
space:
mode:
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>2014-07-07 18:38:29 +0400
committerChris Mason <clm@fb.com>2014-09-18 00:37:33 +0400
commit7880991344f73647fa2222b198cf5cfc10805ac2 (patch)
tree6a4da88ef232059ba8de77f7715dd274b972e825 /include/net/mac802154.h
parent555e12864063762964433139dee651c5b859a047 (diff)
downloadlinux-7880991344f73647fa2222b198cf5cfc10805ac2.tar.xz
btrfs compression: merge inflate and deflate z_streams
`struct workspace' used for zlib compression contains two zlib z_stream-s: `def_strm' used in zlib_compress_pages(), and `inf_strm' used in zlib_decompress/zlib_decompress_biovec(). None of these functions use `inf_strm' and `def_strm' simultaniously, meaning that for every compress/decompress operation we need only one z_stream (out of two available). `inf_strm' and `def_strm' are different in size of ->workspace. For inflate stream we vmalloc() zlib_inflate_workspacesize() bytes, for deflate stream - zlib_deflate_workspacesize() bytes. On my system zlib returns the following workspace sizes, correspondingly: 42312 and 268104 (+ guard pages). Keep only one `z_stream' in `struct workspace' and use it for both compression and decompression. Hence, instead of vmalloc() of two z_stream->worskpace-s, allocate only one of size: max(zlib_deflate_workspacesize(), zlib_inflate_workspacesize()) Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'include/net/mac802154.h')
0 files changed, 0 insertions, 0 deletions