mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 20:41:53 +02:00
[package] update compcache to 0.6.2 (#6884)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20303 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
aca2129d2d
commit
393b91d29a
@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=compcache
|
PKG_NAME:=compcache
|
||||||
PKG_VERSION:=0.5.4
|
PKG_VERSION:=0.6.2
|
||||||
PKG_RELEASE:=$(PKG_VERSION)-1
|
PKG_RELEASE:=$(PKG_VERSION)-1
|
||||||
PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
|
PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
|
||||||
PKG_MD5SUM:=e83535925a014ac34e1eaeb4f7a2f49a
|
PKG_MD5SUM:=27aec78dc50e34fb800c74e879057743
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
||||||
@ -25,22 +25,25 @@ define KernelPackage/compcache
|
|||||||
TITLE:=Driver for compressed ram swap device
|
TITLE:=Driver for compressed ram swap device
|
||||||
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE)
|
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE)
|
||||||
FILES:=$(PKG_BUILD_DIR)/ramzswap.$(LINUX_KMOD_SUFFIX) \
|
FILES:=$(PKG_BUILD_DIR)/ramzswap.$(LINUX_KMOD_SUFFIX) \
|
||||||
$(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.$(LINUX_KMOD_SUFFIX) \
|
$(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.$(LINUX_KMOD_SUFFIX)
|
||||||
$(PKG_BUILD_DIR)/sub-projects/allocators/xvmalloc-kmod/xvmalloc.$(LINUX_KMOD_SUFFIX)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||||
|
|
||||||
XVM = sub-projects/allocators/xvmalloc-kmod
|
|
||||||
LZO = sub-projects/compression/lzo-kmod
|
LZO = sub-projects/compression/lzo-kmod
|
||||||
|
RZSC = sub-projects/rzscontrol
|
||||||
|
|
||||||
BUILDFLAGS:=-DCONFIG_BLK_DEV_RAMZSWAP_STATS \
|
BUILDFLAGS:=-DCONFIG_RAMZSWAP_STATS \
|
||||||
-I$(PKG_BUILD_DIR)/$(XVM) \
|
|
||||||
-I$(PKG_BUILD_DIR)/$(LZO) \
|
-I$(PKG_BUILD_DIR)/$(LZO) \
|
||||||
-g -Wall
|
-Wall
|
||||||
|
|
||||||
|
RZSCFLAGS:=-I$(PKG_BUILD_DIR)/$(RZSC)/../include \
|
||||||
|
-I$(PKG_BUILD_DIR)/$(RZSC)/../..
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) $(KERNEL_MAKEOPTS) EXTRA_CFLAGS="$(BUILDFLAGS)" M="$(PKG_BUILD_DIR)" modules
|
$(MAKE) $(KERNEL_MAKEOPTS) EXTRA_CFLAGS="$(BUILDFLAGS)" M="$(PKG_BUILD_DIR)" modules
|
||||||
|
$(TARGET_CC) $(TARGET_CFLAGS) $(RZSCFLAGS) $(PKG_BUILD_DIR)/$(RZSC)/rzscontrol.c -o $(PKG_BUILD_DIR)/rzscontrol
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/compcache/install
|
define KernelPackage/compcache/install
|
||||||
@ -52,6 +55,8 @@ define KernelPackage/compcache/install
|
|||||||
$(1)/etc/config/compcache
|
$(1)/etc/config/compcache
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/compcache.init $(1)/etc/init.d/compcache
|
$(INSTALL_BIN) ./files/compcache.init $(1)/etc/init.d/compcache
|
||||||
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rzscontrol $(1)/sbin/rzscontrol
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/compcache/config
|
define KernelPackage/compcache/config
|
||||||
|
@ -18,7 +18,6 @@ load_modules() {
|
|||||||
params_set="disksize_kb=$size_kbytes"
|
params_set="disksize_kb=$size_kbytes"
|
||||||
fi
|
fi
|
||||||
if [ "`lsmod | grep 'ramzswap'`" == "" ]; then
|
if [ "`lsmod | grep 'ramzswap'`" == "" ]; then
|
||||||
insmod xvmalloc
|
|
||||||
insmod lzo1x
|
insmod lzo1x
|
||||||
insmod ramzswap $params_set
|
insmod ramzswap $params_set
|
||||||
swapon /dev/ramzswap0
|
swapon /dev/ramzswap0
|
||||||
@ -34,7 +33,6 @@ remove_modules() {
|
|||||||
[ "`cat /proc/swaps | grep 'ramzswap0'`" != "" ] && swapoff /dev/ramzswap0
|
[ "`cat /proc/swaps | grep 'ramzswap0'`" != "" ] && swapoff /dev/ramzswap0
|
||||||
[ "`lsmod | grep 'ramzswap'`" != "" ] && rmmod ramzswap &> /dev/null
|
[ "`lsmod | grep 'ramzswap'`" != "" ] && rmmod ramzswap &> /dev/null
|
||||||
[ "`lsmod | grep 'lzo1x'`" != "" ] && rmmod lzo1x &> /dev/null
|
[ "`lsmod | grep 'lzo1x'`" != "" ] && rmmod lzo1x &> /dev/null
|
||||||
[ "`lsmod | grep 'xvmalloc'`" != "" ] && rmmod xvmalloc &> /dev/null
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,60 +1,53 @@
|
|||||||
diff -uNr compcache-0.5.4-old/Makefile compcache-0.5.4/Makefile
|
diff -uNr compcache-org/Makefile compcache-0.6.2/Makefile
|
||||||
--- compcache-0.5.4-old/Makefile 2009-10-17 08:49:42.000000000 +0200
|
--- compcache-org/Makefile 2010-01-24 17:46:50.000000000 +0100
|
||||||
+++ compcache-0.5.4/Makefile 2009-10-17 09:39:34.000000000 +0200
|
+++ compcache-0.6.2/Makefile 2010-03-18 16:00:41.000000000 +0100
|
||||||
@@ -1,19 +1,26 @@
|
@@ -1,14 +1,17 @@
|
||||||
KERNEL_BUILD_PATH ?= "/lib/modules/$(shell uname -r)/build"
|
KERNEL_BUILD_PATH ?= "/lib/modules/$(shell uname -r)/build"
|
||||||
|
|
||||||
XVM = sub-projects/allocators/xvmalloc-kmod
|
XVM = sub-projects/allocators/xvmalloc-kmod
|
||||||
-EXTRA_CFLAGS := -DCONFIG_BLK_DEV_RAMZSWAP_STATS \
|
|
||||||
- -I$(PWD)/$(XVM) \
|
|
||||||
+LZO = sub-projects/compression/lzo-kmod
|
+LZO = sub-projects/compression/lzo-kmod
|
||||||
+
|
EXTRA_CFLAGS := -DCONFIG_RAMZSWAP_STATS \
|
||||||
+EXTRA_CFLAGS += -DCONFIG_BLK_DEV_RAMZSWAP_STATS \
|
-Wall
|
||||||
+ -I$(PWD)/$(XVM) \
|
|
||||||
+ -I$(PWD)/$(LZO) \
|
|
||||||
-g -Wall
|
|
||||||
|
|
||||||
obj-m += $(XVM)/xvmalloc.o \
|
-obj-m += ramzswap.o
|
||||||
+ $(LZO)/lzo1x.o \
|
+obj-m += ramzswap.o $(LZO)/lzo1x.o
|
||||||
ramzswap.o
|
ramzswap-objs := ramzswap_drv.o $(XVM)/xvmalloc.o
|
||||||
|
+
|
||||||
|
|
||||||
all:
|
all:
|
||||||
make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(XVM) modules
|
|
||||||
+ make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(LZO) modules
|
|
||||||
make -C $(KERNEL_BUILD_PATH) M=$(PWD) modules
|
make -C $(KERNEL_BUILD_PATH) M=$(PWD) modules
|
||||||
@ln -sf $(XVM)/xvmalloc.ko
|
+ make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(LZO) modules
|
||||||
+ @ln -sf $(LZO)/xvmalloc.ko
|
make -C sub-projects/rzscontrol
|
||||||
|
|
||||||
|
doc:
|
||||||
|
@@ -16,5 +19,6 @@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
make -C $(KERNEL_BUILD_PATH) M=$(PWD) clean
|
make -C $(KERNEL_BUILD_PATH) M=$(PWD) clean
|
||||||
make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(XVM) clean
|
|
||||||
+ make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(LZO) clean
|
+ make -C $(KERNEL_BUILD_PATH) M=$(PWD)/$(LZO) clean
|
||||||
|
make -C sub-projects/rzscontrol clean
|
||||||
@rm -rf *.ko
|
@rm -rf *.ko
|
||||||
diff -uNr compcache-0.5.4-old/ramzswap.c compcache-0.5.4/ramzswap.c
|
diff -uNr compcache-org/ramzswap_drv.c compcache-0.6.2/ramzswap_drv.c
|
||||||
--- compcache-0.5.4-old/ramzswap.c 2009-10-17 08:50:06.000000000 +0200
|
--- compcache-org/ramzswap_drv.c 2010-01-24 17:52:19.000000000 +0100
|
||||||
+++ compcache-0.5.4/ramzswap.c 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache-0.6.2/ramzswap_drv.c 2010-03-18 16:03:23.000000000 +0100
|
||||||
@@ -20,7 +20,6 @@
|
@@ -23,13 +23,13 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/genhd.h>
|
#include <linux/genhd.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
-#include <linux/lzo.h>
|
-#include <linux/lzo.h>
|
||||||
#include <linux/mutex.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
diff -uNr compcache-0.5.4-old/ramzswap.h compcache-0.5.4/ramzswap.h
|
#include <linux/swap.h>
|
||||||
--- compcache-0.5.4-old/ramzswap.h 2009-10-17 08:50:06.000000000 +0200
|
#include <linux/swapops.h>
|
||||||
+++ compcache-0.5.4/ramzswap.h 2009-10-17 09:40:45.000000000 +0200
|
#include <linux/vmalloc.h>
|
||||||
@@ -16,6 +16,7 @@
|
#include <linux/version.h>
|
||||||
#define _RAMZSWAP_H_
|
|
||||||
|
|
||||||
#include "xvmalloc.h"
|
|
||||||
+#include "lzo.h"
|
+#include "lzo.h"
|
||||||
|
#include "compat.h"
|
||||||
|
#include "ramzswap_drv.h"
|
||||||
|
|
||||||
/*
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/lzo1x.c compcache/sub-projects/compression/lzo-kmod/lzo1x.c
|
||||||
* Stored at beginning of each compressed object.
|
--- compcache-old/sub-projects/compression/lzo-kmod/lzo1x.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x.c compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x.c
|
+++ compcache/sub-projects/compression/lzo-kmod/lzo1x.c 2009-10-17 09:35:59.000000000 +0200
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x.c 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x.c 2009-10-17 09:35:59.000000000 +0200
|
|
||||||
@@ -0,0 +1,7 @@
|
@@ -0,0 +1,7 @@
|
||||||
+#include <linux/module.h>
|
+#include <linux/module.h>
|
||||||
+
|
+
|
||||||
@ -63,9 +56,9 @@ diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x.c compcach
|
|||||||
+
|
+
|
||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
+MODULE_DESCRIPTION("LZO1X Lib");
|
+MODULE_DESCRIPTION("LZO1X Lib");
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_compress.c compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x_compress.c
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/lzo1x_compress.c compcache/sub-projects/compression/lzo-kmod/lzo1x_compress.c
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_compress.c 1970-01-01 01:00:00.000000000 +0100
|
--- compcache-old/sub-projects/compression/lzo-kmod/lzo1x_compress.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2009-10-17 09:35:59.000000000 +0200
|
||||||
@@ -0,0 +1,227 @@
|
@@ -0,0 +1,227 @@
|
||||||
+/*
|
+/*
|
||||||
+ * LZO1X Compressor from MiniLZO
|
+ * LZO1X Compressor from MiniLZO
|
||||||
@ -294,9 +287,9 @@ diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_compress.c
|
|||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
+MODULE_DESCRIPTION("LZO1X-1 Compressor");
|
+MODULE_DESCRIPTION("LZO1X-1 Compressor");
|
||||||
+
|
+
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_decompress.c compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/lzo1x_decompress.c compcache/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 1970-01-01 01:00:00.000000000 +0100
|
--- compcache-old/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2009-10-17 09:35:59.000000000 +0200
|
||||||
@@ -0,0 +1,255 @@
|
@@ -0,0 +1,255 @@
|
||||||
+/*
|
+/*
|
||||||
+ * LZO1X Decompressor from MiniLZO
|
+ * LZO1X Decompressor from MiniLZO
|
||||||
@ -553,9 +546,9 @@ diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo1x_decompress
|
|||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
+MODULE_DESCRIPTION("LZO1X Decompressor");
|
+MODULE_DESCRIPTION("LZO1X Decompressor");
|
||||||
+
|
+
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzodefs.h compcache-0.5.4/sub-projects/compression/lzo-kmod/lzodefs.h
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/lzodefs.h compcache/sub-projects/compression/lzo-kmod/lzodefs.h
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzodefs.h 1970-01-01 01:00:00.000000000 +0100
|
--- compcache-old/sub-projects/compression/lzo-kmod/lzodefs.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/lzodefs.h 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache/sub-projects/compression/lzo-kmod/lzodefs.h 2009-10-17 09:35:59.000000000 +0200
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,43 @@
|
||||||
+/*
|
+/*
|
||||||
+ * lzodefs.h -- architecture, OS and compiler specific defines
|
+ * lzodefs.h -- architecture, OS and compiler specific defines
|
||||||
@ -600,9 +593,9 @@ diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzodefs.h compca
|
|||||||
+#define DX2(p, s1, s2) (((((size_t)((p)[2]) << (s2)) ^ (p)[1]) \
|
+#define DX2(p, s1, s2) (((((size_t)((p)[2]) << (s2)) ^ (p)[1]) \
|
||||||
+ << (s1)) ^ (p)[0])
|
+ << (s1)) ^ (p)[0])
|
||||||
+#define DX3(p, s1, s2, s3) ((DX2((p)+1, s2, s3) << (s1)) ^ (p)[0])
|
+#define DX3(p, s1, s2, s3) ((DX2((p)+1, s2, s3) << (s1)) ^ (p)[0])
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo.h compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo.h
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/lzo.h compcache/sub-projects/compression/lzo-kmod/lzo.h
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo.h 1970-01-01 01:00:00.000000000 +0100
|
--- compcache-old/sub-projects/compression/lzo-kmod/lzo.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/lzo.h 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache/sub-projects/compression/lzo-kmod/lzo.h 2009-10-17 09:35:59.000000000 +0200
|
||||||
@@ -0,0 +1,44 @@
|
@@ -0,0 +1,44 @@
|
||||||
+#ifndef __LZO_H__
|
+#ifndef __LZO_H__
|
||||||
+#define __LZO_H__
|
+#define __LZO_H__
|
||||||
@ -648,9 +641,9 @@ diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/lzo.h compcache-
|
|||||||
+#define LZO_E_NOT_YET_IMPLEMENTED (-9)
|
+#define LZO_E_NOT_YET_IMPLEMENTED (-9)
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff -uNr compcache-0.5.4-old/sub-projects/compression/lzo-kmod/Makefile compcache-0.5.4/sub-projects/compression/lzo-kmod/Makefile
|
diff -uNr compcache-old/sub-projects/compression/lzo-kmod/Makefile compcache/sub-projects/compression/lzo-kmod/Makefile
|
||||||
--- compcache-0.5.4-old/sub-projects/compression/lzo-kmod/Makefile 1970-01-01 01:00:00.000000000 +0100
|
--- compcache-old/sub-projects/compression/lzo-kmod/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ compcache-0.5.4/sub-projects/compression/lzo-kmod/Makefile 2009-10-17 09:35:59.000000000 +0200
|
+++ compcache/sub-projects/compression/lzo-kmod/Makefile 2009-10-17 09:35:59.000000000 +0200
|
||||||
@@ -0,0 +1,8 @@
|
@@ -0,0 +1,8 @@
|
||||||
+obj-m += lzo1x_compress.o lzo1x_decompress.o
|
+obj-m += lzo1x_compress.o lzo1x_decompress.o
|
||||||
+
|
+
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
diff -uNr compcache-0.5.2/compcache.c compcache/compcache.c
|
|
||||||
--- compcache-0.5.2/compcache.c 2009-03-10 13:03:56.000000000 +0100
|
|
||||||
+++ compcache/ramzswap.c 2009-04-01 17:38:20.000000000 +0200
|
|
||||||
@@ -68,15 +68,15 @@
|
|
||||||
static int page_zero_filled(void *ptr)
|
|
||||||
{
|
|
||||||
u32 pos;
|
|
||||||
- u64 *page;
|
|
||||||
-
|
|
||||||
- page = (u64 *)ptr;
|
|
||||||
-
|
|
||||||
+#if defined(CONFIG_64BIT)
|
|
||||||
+ u64 *page = (u64 *)ptr;
|
|
||||||
+#else
|
|
||||||
+ u32 *page = (u32 *)ptr;
|
|
||||||
+#endif
|
|
||||||
for (pos = 0; pos != PAGE_SIZE / sizeof(*page); pos++) {
|
|
||||||
if (page[pos])
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
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,
|
|
Loading…
Reference in New Issue
Block a user