From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>, gregkh@suse.de
Cc: cascardo@holoscopio.com, rdunlap@xenotime.net,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH] staging: zcache: reduce tmem bucket lock contention
Date: Mon, 3 Oct 2011 11:51:53 -0700 (PDT) [thread overview]
Message-ID: <a4291ee6-2352-45af-acd9-4a87d1b897bd@default> (raw)
In-Reply-To: <1317306746-27072-1-git-send-email-sjenning@linux.vnet.ibm.com>
> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
> Sent: Thursday, September 29, 2011 8:32 AM
> To: gregkh@suse.de
> Cc: cascardo@holoscopio.com; Dan Magenheimer; rdunlap@xenotime.net; devel@driverdev.osuosl.org; linux-
> kernel@vger.kernel.org; Seth Jennings
> Subject: [PATCH] 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.
>
> Based on v3.1-rc7
>
> Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Good catch Seth!
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
next prev parent reply other threads:[~2011-10-03 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 14:32 Seth Jennings
2011-10-03 18:51 ` Dan Magenheimer [this message]
2011-10-03 23:06 ` Greg KH
2011-10-04 13:21 ` Seth Jennings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4291ee6-2352-45af-acd9-4a87d1b897bd@default \
--to=dan.magenheimer@oracle.com \
--cc=cascardo@holoscopio.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=sjenning@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®