diff options
author | Nitin Gupta <ngupta@vflare.org> | 2010-01-28 21:13:37 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:53 -0800 |
commit | 6a90772886d5d6812f9b2775d3caa0dc002754e0 (patch) | |
tree | 0615a702afe3b1f58161a756ea6eb928d859bf11 /drivers/staging/ramzswap/ramzswap_ioctl.h | |
parent | 1994130e4f881696aad562429fbbafeb73418e5a (diff) | |
download | op-kernel-dev-6a90772886d5d6812f9b2775d3caa0dc002754e0.zip op-kernel-dev-6a90772886d5d6812f9b2775d3caa0dc002754e0.tar.gz |
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>
Diffstat (limited to 'drivers/staging/ramzswap/ramzswap_ioctl.h')
-rw-r--r-- | drivers/staging/ramzswap/ramzswap_ioctl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/ramzswap/ramzswap_ioctl.h b/drivers/staging/ramzswap/ramzswap_ioctl.h index 1bc54e2..1edaeba 100644 --- a/drivers/staging/ramzswap/ramzswap_ioctl.h +++ b/drivers/staging/ramzswap/ramzswap_ioctl.h @@ -27,6 +27,7 @@ struct ramzswap_ioctl_stats { u64 failed_reads; /* should NEVER! happen */ u64 failed_writes; /* can happen when memory is too low */ u64 invalid_io; /* non-swap I/O requests */ + u64 notify_free; /* no. of swap slot free notifications */ u32 pages_zero; /* no. of zero filled pages */ u32 good_compress_pct; /* no. of pages with compression ratio<=50% */ u32 pages_expand_pct; /* no. of incompressible pages */ |