Staging: ramzswap: Use lock for 64-bit stats
authorNitin Gupta <ngupta@vflare.org>
Thu, 28 Jan 2010 15:43:37 +0000 (21:13 +0530)
committerMatt Sealey <matt@genesi-usa.com>
Fri, 10 Sep 2010 16:01:21 +0000 (11:01 -0500)
commit459f19ae4fe8c3c6cc050ac7ef2d34ab7e23038f
treebdf9d845062b1805ee3feb947985db5e38055eae
parentab65acee3ce7c61a19c416c2f5193a6bfa27a555
Staging: ramzswap: Use lock for 64-bit stats

64-bit stats corruption was observed when ramzswap was
used on SMP systems. To prevent this, use separate spinlock
to protect these stats.

Also, replace stat_*() with rzs_stat*() to avoid possible
conflict with core kernel code.

Eventually, these will be converted to per-cpu counters
if this driver finds use on large scale systems and this
locking is found to affect scalability.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ramzswap/ramzswap_drv.c
drivers/staging/ramzswap/ramzswap_drv.h
drivers/staging/ramzswap/ramzswap_ioctl.h