diff options
author | Seth Jennings <sjenning@linux.vnet.ibm.com> | 2011-10-04 08:21:32 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-12 09:29:03 -0600 |
commit | 3d65c85f9187d311dbf1bf9e7fc2f5091a770853 (patch) | |
tree | 37d2971a3f6f49693ae706d74e60c010b6ee45c4 /tools/perf/scripts/python/check-perf-trace.py | |
parent | fc2d6e573be68ac7b5a0730981fe9444ea2e2eaf (diff) |
staging: zcache: reduce tmem bucket lock contention
tmem uses hash buckets each with their own rbtree and lock to
quickly lookup tmem objects. tmem has TMEM_HASH_BUCKETS (256)
buckets per pool. However, because of the way the tmem_oid is
generated for frontswap pages, only 16 unique tmem_oids are being
generated, resulting in only 16 of the 256 buckets being used.
This cause high lock contention for the per bucket locks.
This patch changes SWIZ_BITS to include more bits of the offset.
The result is that all 256 hash buckets are potentially used resulting in a
95% drop in hash bucket lock contention.
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions