Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216852
| From | Phil Sutter <phil@nwl.cc> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads |
| Date | 2015-09-01 15:50 +0200 |
| Message-ID | <q3U6K-8ac-29@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <q35xg-2u8-5@gated-at.bofh.it> <q3v8m-5TL-15@gated-at.bofh.it> <q3SeC-5tT-15@gated-at.bofh.it> <q3TaF-6OS-21@gated-at.bofh.it> <q3Tu3-7qR-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 01, 2015 at 09:00:57PM +0800, Herbert Xu wrote: > On Tue, Sep 01, 2015 at 02:46:48PM +0200, Phil Sutter wrote: > > > > This is not an inherent behaviour of the implementation but general > > agreement. The insertion may fail non-permanently (returning -EBUSY), > > users are expected to handle this by retrying the operation. > > Absolutely not. The only reason for an insertion to fail is if we > can't allocate enough memory. Unless the user is also looping its > kmalloc calls it definitely shouldn't be retrying the insert. rhashtable_insert_fast() returns -EBUSY if the table is full (rht_grow_above_100() returns true) and an asynchronous rehash operation is active. AFAICT, this is not necessarily caused by memory pressure. > If an expansion fails it means either that the system is suffering > a catastrophic memory shortage, or the user of rhashtable is doing > something wrong. Hmm. Since memory allocation is first tried with GFP_ATOMIC set and upon failure retried in background, this seems like a situation which might happen during normal use. If that already indicates a severe problem, why retry in background at all? Cheers, Phil -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] rhashtable-test: add cond_resched() to thread test Phil Sutter <phil@nwl.cc> - 2015-08-28 12:30 +0200
[PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-08-28 12:30 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Thomas Graf <tgraf@suug.ch> - 2015-08-28 13:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-08-28 13:20 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-08-28 15:40 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Thomas Graf <tgraf@suug.ch> - 2015-08-29 00:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-08-29 11:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-30 09:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-08-31 13:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-01 13:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-09-01 14:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-01 15:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-01 15:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-09-01 15:50 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-01 16:00 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter <phil@nwl.cc> - 2015-09-01 16:00 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-01 16:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Thomas Graf <tgraf@suug.ch> - 2015-09-01 16:20 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-01 16:20 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Thomas Graf <tgraf@suug.ch> - 2015-09-01 17:00 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-02 04:10 +0200
Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads Thomas Graf <tgraf@suug.ch> - 2015-09-02 09:10 +0200
[PATCH 3/3] rhashtable-test: calculate max_entries value by default Phil Sutter <phil@nwl.cc> - 2015-08-28 12:30 +0200
Re: [PATCH 3/3] rhashtable-test: calculate max_entries value by default Thomas Graf <tgraf@suug.ch> - 2015-08-28 13:20 +0200
Re: [PATCH 1/3] rhashtable-test: add cond_resched() to thread test Thomas Graf <tgraf@suug.ch> - 2015-08-28 13:10 +0200
csiph-web