netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Ying Xue <ying.xue@windriver.com>
Cc: davem@davemloft.net, eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3] lib/rhashtable: allow user to set the minimum shifts of shrinking
Date: Mon, 1 Sep 2014 10:03:02 +0100	[thread overview]
Message-ID: <20140901090302.GB27933@casper.infradead.org> (raw)
In-Reply-To: <1409381306-7036-1-git-send-email-ying.xue@windriver.com>

On 08/30/14 at 02:48pm, Ying Xue wrote:
> Although rhashtable library allows user to specify a quiet big size
> for user's created hash table, the table may be shrunk to a
> very small size - HASH_MIN_SIZE(4) after object is removed from
> the table at the first time. Subsequently, even if the total amount
> of objects saved in the table is quite lower than user's initial
> setting in a long time, the hash table size is still dynamically
> adjusted by rhashtable_shrink() or rhashtable_expand() each time
> object is inserted or removed from the table. However, as
> synchronize_rcu() has to be called when table is shrunk or
> expanded by the two functions, we should permit user to set the
> minimum table size through configuring the minimum number of shifts
> according to user specific requirement, avoiding these expensive
> actions of shrinking or expanding because of calling synchronize_rcu().
> 
> Signed-off-by: Ying Xue <ying.xue@windriver.com>

I see the following warning when compiling:

In file included from lib/rhashtable.c:17:0:
lib/rhashtable.c: In function ‘rhashtable_init’:
include/linux/kernel.h:715:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_max1 == &_max2);  \
                 ^
lib/rhashtable.c:570:22: note: in expansion of macro ‘max’
  params->min_shift = max(params->min_shift, ilog2(HASH_MIN_SIZE));

  reply	other threads:[~2014-09-01  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-30  6:48 [PATCH net-next v3] lib/rhashtable: allow user to set the minimum shifts of shrinking Ying Xue
2014-09-01  9:03 ` Thomas Graf [this message]
2014-09-01  9:28   ` Ying Xue
2014-09-01  9:41     ` 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=20140901090302.GB27933@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ying.xue@windriver.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;
as well as URLs for NNTP newsgroup(s).