From: Florian Westphal <fw@strlen.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Florian Westphal <fw@strlen.de>,
"David S. Miller" <davem@davemloft.net>,
Thomas Graf <tgraf@suug.ch>,
netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] rhashtable: Add nested tables
Date: Tue, 7 Feb 2017 19:02:16 +0100 [thread overview]
Message-ID: <20170207180216.GC11584@breakpoint.cc> (raw)
In-Reply-To: <20170207132911.GA14888@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, Feb 07, 2017 at 02:17:28PM +0100, Florian Westphal wrote:
> >
> > Ok, but why?
>
> Because people expect the hash table insertion to succeed, even
> on softirq paths where you cannot vmalloc.
I can't really say anything here because *I* don't expect
it to succeed.
> > It seems to add a whole lot of complexity...
> >
> > What users can't handle the insert failure case until resize
> > has completed?
>
> Users that need to insert on softirq that cannot throttle the
> rate.
Even with this proposed patch things will eventually fail
on OOM conditions.
Also, such period should be very short until rht has reached
peak size for the workload.
> > Would relaxing the max chain length (until rehash is done) be an
> > alternative?
>
> Considering that this is intended for users that cannot throttle
> the rate of insertion, I think we'd be much better off just failing
> them than sticking them on what will essentially be a linked list.
I think that would depend on the user and the requirement, but
I don't know of any such users.
I get impression thatan (r)hashtable might be the wrong data
structure for this in first place.
Also, given that we could easily oversubscribe a table by a factor
of 10 or more while still keeping sane chain lengths I don't
see why thats a problem (also, a 'rht_insert_force' or similar
interface that doesn't do chain length checks makes it
easy to spot places that need/want this behaviour).
> As people don't like insertion failure, I think this level of
> complexity is justified.
I am not sure.
I think rhastable is already bloated; I can't say I can understand
all of the checks and knobs it has without looking at git history.
(insecure_elasticity and/or insecure_max_entries come to mind, seems
some of that might not even be needed anymore but I don't have time
right now to investigate).
next prev parent reply other threads:[~2017-02-07 18:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 12:38 [PATCH 0/3] rhashtable: Handle table allocation failure during insertion Herbert Xu
2017-02-07 12:39 ` [PATCH 1/3] gfs2: Use rhashtable walk interface in glock_hash_walk Herbert Xu
2017-02-07 12:39 ` [PATCH 2/3] tipc: Fix tipc_sk_reinit race conditions Herbert Xu
2017-02-10 10:53 ` Ying Xue
2017-02-07 12:39 ` [PATCH 3/3] rhashtable: Add nested tables Herbert Xu
2017-02-07 13:17 ` Florian Westphal
2017-02-07 13:29 ` Herbert Xu
2017-02-07 18:02 ` Florian Westphal [this message]
2017-02-08 1:09 ` Herbert Xu
2017-02-09 2:12 ` [lkp-robot] [rhashtable] 60be2ebf32: INFO:suspicious_RCU_usage kernel test robot
2017-02-08 18:26 ` [PATCH 0/3] rhashtable: Handle table allocation failure during insertion David Miller
2017-02-11 11:22 ` Herbert Xu
2017-02-11 11:24 ` [v2 PATCH " Herbert Xu
2017-02-11 11:26 ` [v2 PATCH 1/3] gfs2: Use rhashtable walk interface in glock_hash_walk Herbert Xu
2017-02-11 11:26 ` [v2 PATCH 2/3] tipc: Fix tipc_sk_reinit race conditions Herbert Xu
2017-02-11 11:26 ` [v2 PATCH 3/3] rhashtable: Add nested tables Herbert Xu
2017-02-14 3:18 ` [v2 PATCH 0/3] rhashtable: Handle table allocation failure during insertion David Miller
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=20170207180216.GC11584@breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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).