[package] update compcache to 0.5.4 (#6018)
[openwrt.git] / package / compcache / patches / 200-av_compress_ratio.patch
1 diff -uNr compcache-0.5.4-old/ramzswap.c compcache-0.5.4/ramzswap.c
2 --- compcache-0.5.4-old/ramzswap.c 2009-10-18 09:14:53.000000000 +0200
3 +++ compcache-0.5.4/ramzswap.c 2009-10-18 09:12:08.000000000 +0200
4 @@ -126,7 +126,9 @@
5 {
6 int len;
7 size_t succ_writes, mem_used;
8 - unsigned int good_compress_perc = 0, no_compress_perc = 0;
9 + unsigned int good_compress_perc = 0,
10 + av_compression_perc = 0,
11 + no_compress_perc = 0;
12
13 mem_used = xv_get_total_size_bytes(rzs.mem_pool)
14 + (stats.pages_expand << PAGE_SHIFT);
15 @@ -154,6 +156,8 @@
16 if (succ_writes && stats.pages_stored) {
17 good_compress_perc = stats.good_compress * 100
18 / stats.pages_stored;
19 + av_compression_perc = stats.compr_size * 100
20 + / (stats.good_compress << PAGE_SHIFT);
21 no_compress_perc = stats.pages_expand * 100
22 / stats.pages_stored;
23 }
24 @@ -168,6 +172,7 @@
25 "NotifyFree: %8llu\n"
26 "ZeroPages: %8u\n"
27 "GoodCompress: %8u %%\n"
28 + "AvCompression: %8u %%\n"
29 "NoCompress: %8u %%\n"
30 "PagesStored: %8u\n"
31 "PagesUsed: %8zu\n"
32 @@ -182,6 +187,7 @@
33 stats.notify_free,
34 stats.pages_zero,
35 good_compress_perc,
36 + av_compression_perc,
37 no_compress_perc,
38 stats.pages_stored,
39 mem_used >> PAGE_SHIFT,
This page took 0.03973 seconds and 5 git commands to generate.