mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[package] update compcache to 0.5.4 (#6018)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18512 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
39
package/compcache/patches/200-av_compress_ratio.patch
Normal file
39
package/compcache/patches/200-av_compress_ratio.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
diff -uNr compcache-0.5.4-old/ramzswap.c compcache-0.5.4/ramzswap.c
|
||||
--- compcache-0.5.4-old/ramzswap.c 2009-10-18 09:14:53.000000000 +0200
|
||||
+++ compcache-0.5.4/ramzswap.c 2009-10-18 09:12:08.000000000 +0200
|
||||
@@ -126,7 +126,9 @@
|
||||
{
|
||||
int len;
|
||||
size_t succ_writes, mem_used;
|
||||
- unsigned int good_compress_perc = 0, no_compress_perc = 0;
|
||||
+ unsigned int good_compress_perc = 0,
|
||||
+ av_compression_perc = 0,
|
||||
+ no_compress_perc = 0;
|
||||
|
||||
mem_used = xv_get_total_size_bytes(rzs.mem_pool)
|
||||
+ (stats.pages_expand << PAGE_SHIFT);
|
||||
@@ -154,6 +156,8 @@
|
||||
if (succ_writes && stats.pages_stored) {
|
||||
good_compress_perc = stats.good_compress * 100
|
||||
/ stats.pages_stored;
|
||||
+ av_compression_perc = stats.compr_size * 100
|
||||
+ / (stats.good_compress << PAGE_SHIFT);
|
||||
no_compress_perc = stats.pages_expand * 100
|
||||
/ stats.pages_stored;
|
||||
}
|
||||
@@ -168,6 +172,7 @@
|
||||
"NotifyFree: %8llu\n"
|
||||
"ZeroPages: %8u\n"
|
||||
"GoodCompress: %8u %%\n"
|
||||
+ "AvCompression: %8u %%\n"
|
||||
"NoCompress: %8u %%\n"
|
||||
"PagesStored: %8u\n"
|
||||
"PagesUsed: %8zu\n"
|
||||
@@ -182,6 +187,7 @@
|
||||
stats.notify_free,
|
||||
stats.pages_zero,
|
||||
good_compress_perc,
|
||||
+ av_compression_perc,
|
||||
no_compress_perc,
|
||||
stats.pages_stored,
|
||||
mem_used >> PAGE_SHIFT,
|
||||
Reference in New Issue
Block a user