staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Tue, 2 Apr 2013 02:46:15 +0000 (10:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 19:49:51 +0000 (12:49 -0700)
commitb0749e77ae972713c1734cea069f32597ecedbd5
treeef99772356a2cae06f105456ffdb747995d71a4b
parent8762c7dde745f1de0488c6a3ed6894390303f76f
staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page

Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages,
the main point of the counters for zpages and pageframes is to be
able to calculate density == zpages/pageframes. A zero-filled page
becomes a zpage that "compresses" to zero bytes and, as a result,
requires zero pageframes for storage. So the zpages counter should
be increased but the pageframes counter should not.

[Dan Magenheimer <dan.magenheimer@oracle.com>: patch description]
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zcache/zcache-main.c