linux/drivers/staging/zcache
Dan Magenheimer e8b4553457 zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.
SWIZ_BITS > 8 results in a much larger number of "tmem_obj"
allocations, likely one per page-placed-in-frontswap.  The
tmem_obj is not huge (roughly 100 bytes), but it is large
enough to add a not-insignificant memory overhead to zcache.

The SWIZ_BITS=8  will get roughly the same lock contention
without the space wastage.

The effect of SWIZ_BITS can be thought of as "2^SWIZ_BITS is
the number of unique oids that be generated" (This concept is
limited to frontswap's use of tmem).

Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:12 -08:00
..
Kconfig staging: zcache: misc build/config 2011-02-09 15:08:22 -08:00
Makefile staging: fix zcache building 2011-08-02 16:06:18 -07:00
tmem.c Staging: zcache: signedness bug in tmem_get() 2011-08-23 14:52:20 -07:00
tmem.h staging: zcache: support multiple clients, prep for KVM and RAMster 2011-07-08 14:18:53 -07:00
zcache-main.c zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention. 2012-02-08 14:14:12 -08:00