staging: zcache: zero-filled pages awareness
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Tue, 2 Apr 2013 02:46:14 +0000 (10:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 19:49:51 +0000 (12:49 -0700)
commit8762c7dde745f1de0488c6a3ed6894390303f76f
treea7b235f4f15f1ce40e27cf40a126c1b86888034a
parentbdcde42d74a12e170971038671a80ef00603ae4e
staging: zcache: zero-filled pages awareness

Compression of zero-filled pages can unneccessarily cause internal
fragmentation, and thus waste memory. This special case can be
optimized.

This patch captures zero-filled pages, and marks their corresponding
zcache backing page entry as zero-filled. Whenever such zero-filled
page is retrieved, we fill the page frame with zero.

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