From: Ying Xue <ying.xue@windriver.com>
To: <tgraf@suug.ch>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net-next 3/3] rhashtable: add a note for grow and shrink decision functions
Date: Fri, 9 Jan 2015 16:23:38 +0800 [thread overview]
Message-ID: <1420791818-22150-4-git-send-email-ying.xue@windriver.com> (raw)
In-Reply-To: <1420791818-22150-1-git-send-email-ying.xue@windriver.com>
As commit c0c09bfdc415 ("rhashtable: avoid unnecessary wakeup for
worker queue") moves condition statements of verifying whether hash
table size exceeds its maximum threshold or reaches its minimum
threshold from resizing functions to resizing decision functions,
we should add a note in rhashtable.h to indicate the implementation
of what the grow and shrink decision function must enforce min/max
shift, otherwise, it's failed to take min/max shift's set watermarks
into effect.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Cc: Thomas Graf <tgraf@suug.ch>
---
include/linux/rhashtable.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 7b9bd77..9570832 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -79,6 +79,10 @@ struct rhashtable;
* @obj_hashfn: Function to hash object
* @grow_decision: If defined, may return true if table should expand
* @shrink_decision: If defined, may return true if table should shrink
+ *
+ * Note: when implementing the grow and shrink decision function, min/max
+ * shift must be enforced, otherwise, resizing watermarks they set may be
+ * useless.
*/
struct rhashtable_params {
size_t nelem_hint;
--
1.7.9.5
next prev parent reply other threads:[~2015-01-09 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 8:23 [PATCH net-next 0/3] remove nl_sk_hash_lock from netlink socket Ying Xue
2015-01-09 8:23 ` [PATCH net-next 1/3] rhashtable: involve rhashtable_lookup_compare_insert routine Ying Xue
2015-01-09 10:31 ` Thomas Graf
2015-01-09 8:23 ` [PATCH net-next 2/3] netlink: eliminate nl_sk_hash_lock Ying Xue
2015-01-09 10:55 ` Thomas Graf
2015-01-12 21:27 ` David Miller
2015-01-09 8:23 ` Ying Xue [this message]
2015-01-09 10:31 ` [PATCH net-next 3/3] rhashtable: add a note for grow and shrink decision functions 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=1420791818-22150-4-git-send-email-ying.xue@windriver.com \
--to=ying.xue@windriver.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).