]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5075589b4490ac7b46cb8f4caf5b6816da83bc74
treea7b235f4f15f1ce40e27cf40a126c1b86888034a
parent0f4e9baa3575e277f2af373c4c19268cc3fc8ad6
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