diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-06-22 17:47:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-22 18:05:58 -0400 |
commit | 4f3865fb57a04db7cca068fed1c15badc064a302 (patch) | |
tree | 4c923c72b6ac9b633c87cc73b55a75c7cfd0f044 /include/linux/zconf.h | |
parent | 4f1bcaf094ccc512c23e10104c05a6f8e5b7a9e4 (diff) |
[PATCH] zlib_inflate: Upgrade library code to a recent version
Upgrade the zlib_inflate implementation in the kernel from a patched
version 1.1.3/4 to a patched 1.2.3.
The code in the kernel is about seven years old and I noticed that the
external zlib library's inflate performance was significantly faster (~50%)
than the code in the kernel on ARM (and faster again on x86_32).
For comparison the newer deflate code is 20% slower on ARM and 50% slower
on x86_32 but gives an approx 1% compression ratio improvement. I don't
consider this to be an improvement for kernel use so have no plans to
change the zlib_deflate code.
Various changes have been made to the zlib code in the kernel, the most
significant being the extra functions/flush option used by ppp_deflate.
This update reimplements the features PPP needs to ensure it continues to
work.
This code has been tested on ARM under both JFFS2 (with zlib compression
enabled) and ppp_deflate and on x86_32. JFFS2 sees an approx. 10% real
world file read speed improvement.
This patch also removes ZLIB_VERSION as it no longer has a correct value.
We don't need version checks anyway as the kernel's module handling will
take care of that for us. This removal is also more in keeping with the
zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24) and I've
added something to the zlib.h header to note its a modified version.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Joern Engel <joern@wh.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/zconf.h')
-rw-r--r-- | include/linux/zconf.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/zconf.h b/include/linux/zconf.h index f1cfd66b9554..0beb75e38caa 100644 --- a/include/linux/zconf.h +++ b/include/linux/zconf.h | |||
@@ -35,6 +35,18 @@ | |||
35 | # define MAX_WBITS 15 /* 32K LZ77 window */ | 35 | # define MAX_WBITS 15 /* 32K LZ77 window */ |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* default windowBits for decompression. MAX_WBITS is for compression only */ | ||
39 | #ifndef DEF_WBITS | ||
40 | # define DEF_WBITS MAX_WBITS | ||
41 | #endif | ||
42 | |||
43 | /* default memLevel */ | ||
44 | #if MAX_MEM_LEVEL >= 8 | ||
45 | # define DEF_MEM_LEVEL 8 | ||
46 | #else | ||
47 | # define DEF_MEM_LEVEL MAX_MEM_LEVEL | ||
48 | #endif | ||
49 | |||
38 | /* Type declarations */ | 50 | /* Type declarations */ |
39 | 51 | ||
40 | typedef unsigned char Byte; /* 8 bits */ | 52 | typedef unsigned char Byte; /* 8 bits */ |