From: Herbert Xu <herbert@gondor.apana.org.au>
To: Thomas Graf <tgraf@suug.ch>
Cc: davem@davemloft.net, netdev@vger.kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH 1/3 net-next] rhashtable: Avoid calculating hash again to unlock
Date: Sat, 14 Mar 2015 13:20:02 +1100 [thread overview]
Message-ID: <20150314022002.GA10086@gondor.apana.org.au> (raw)
In-Reply-To: <533e5f99a1fc96e557baf4322bda126530236862.1426257747.git.tgraf@suug.ch>
On Fri, Mar 13, 2015 at 03:45:19PM +0100, Thomas Graf wrote:
> Caching the lock pointer avoids having to hash on the object
> again to unlock the bucket locks.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Looks good to me. I originally avoided doing this because I
thought I had to hold every bucket lock from the first table to
the last with multiple rehashing. However, my new scheme only
requires the "first" table and the last table to be locked so
caching it is fine.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2015-03-14 2:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 14:45 [PATCH 0/3 net-next] Minor rhashtable fixes Thomas Graf
2015-03-13 14:45 ` [PATCH 1/3 net-next] rhashtable: Avoid calculating hash again to unlock Thomas Graf
2015-03-14 2:20 ` Herbert Xu [this message]
2015-03-13 14:45 ` [PATCH 2/3 net-next] rhashtable: Use spin_lock_bh_nested() consistently Thomas Graf
2015-03-13 16:54 ` David Miller
2015-03-14 2:21 ` Herbert Xu
2015-03-16 8:44 ` Thomas Graf
2015-03-13 14:45 ` [PATCH 3/3 net-next] rhashtable: Annotate RCU locking of walkers Thomas Graf
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=20150314022002.GA10086@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.