staging: zcache: support multiple clients, prep for KVM and RAMster
commit966b9016a175f0c2a555e937fb918fd845e4b2cc
authorDan Magenheimer <dan.magenheimer@oracle.com>
Thu, 7 Jul 2011 14:37:19 +0000 (7 07:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Jul 2011 21:18:53 +0000 (8 14:18 -0700)
treece8f7df6269bc77a894c095eb8f9d168d99dcd87
parent94c97e8e0692ee3a58868a013b973fcf7fed348c
staging: zcache: support multiple clients, prep for KVM and RAMster

This is version 3 of an update to zcache, incorporating feedback from the list.
This patch adds support to the in-kernel transcendent memory ("tmem") code
and the zcache driver for multiple clients, which will be needed for both
RAMster and KVM support.  It also adds additional tmem callbacks to support
RAMster and corresponding no-op stubs in the zcache driver.  In v2, I've
also taken the liberty of adding some additional sysfs variables to
both surface information and allow policy control.  Those experimenting
with zcache should find them useful.  V3 clarifies some code walking
and declaring arrays.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
[v3: error27@gmail.com: fix array bounds/walking]
[v2: konrad.wilk@oracle.com: fix bools, add check for NULL, fix a comment]
[v2: sjenning@linux.vnet.ibm.com: add info/tunables for poor compression]
[v2: marcusklemm@googlemail.com: add tunable for max persistent pages]
Acked-by: Dan Carpenter <error27@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: linux-mm@kvack.org
Cc: kvm@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zcache/tmem.c
drivers/staging/zcache/tmem.h
drivers/staging/zcache/zcache.c