Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293677 > unrolled thread
| Started by | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| First post | 2015-12-17 09:50 +0100 |
| Last post | 2015-12-17 18:10 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: rhashtable: Prevent spurious EBUSY errors on insertion Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-17 09:50 +0100
Re: rhashtable: Prevent spurious EBUSY errors on insertion Xin Long <lucien.xin@gmail.com> - 2015-12-17 10:10 +0100
Re: rhashtable: Prevent spurious EBUSY errors on insertion Xin Long <lucien.xin@gmail.com> - 2015-12-17 17:10 +0100
Re: rhashtable: Prevent spurious EBUSY errors on insertion Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-18 03:30 +0100
Re: rhashtable: Prevent spurious EBUSY errors on insertion Xin Long <lucien.xin@gmail.com> - 2015-12-18 09:20 +0100
Re: rhashtable: Prevent spurious EBUSY errors on insertion David Miller <davem@davemloft.net> - 2015-12-17 18:10 +0100
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-12-17 09:50 +0100 |
| Subject | Re: rhashtable: Prevent spurious EBUSY errors on insertion |
| Message-ID | <qGCq6-5pv-17@gated-at.bofh.it> |
On Thu, Dec 17, 2015 at 04:46:00PM +0800, Xin Long wrote:
>
> sorry for late test, but unfortunately, my case with rhashtalbe still
> return EBUSY.
> I added some debug code in rhashtable_insert_rehash(), and found:
> *future_tbl is null*
>
> fail:
> /* Do not fail the insert if someone else did a rehash. */
> if (likely(rcu_dereference_raw(tbl->future_tbl))) {
> printk("future_tbl is there\n");
> return 0;
> } else {
> printk("future_tbl is null\n");
> }
>
> any idea why ?
That's presumably because you got a genuine double rehash.
Until you post your code we can't really help you.
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
--
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/
[toc] | [next] | [standalone]
| From | Xin Long <lucien.xin@gmail.com> |
|---|---|
| Date | 2015-12-17 10:10 +0100 |
| Message-ID | <qGCJs-5LN-1@gated-at.bofh.it> |
| In reply to | #1293677 |
On Thu, Dec 17, 2015 at 4:48 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Thu, Dec 17, 2015 at 04:46:00PM +0800, Xin Long wrote:
>>
>> sorry for late test, but unfortunately, my case with rhashtalbe still
>> return EBUSY.
>> I added some debug code in rhashtable_insert_rehash(), and found:
>> *future_tbl is null*
>>
>> fail:
>> /* Do not fail the insert if someone else did a rehash. */
>> if (likely(rcu_dereference_raw(tbl->future_tbl))) {
>> printk("future_tbl is there\n");
>> return 0;
>> } else {
>> printk("future_tbl is null\n");
>> }
>>
>> any idea why ?
>
> That's presumably because you got a genuine double rehash.
>
> Until you post your code we can't really help you.
>
i wish i could , but my codes is a big patch for sctp, and this issue
happens in a special stress test based on this patch.
im trying to think how i can show you. :)
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Xin Long <lucien.xin@gmail.com> |
|---|---|
| Date | 2015-12-17 17:10 +0100 |
| Message-ID | <qGJhU-1Gz-25@gated-at.bofh.it> |
| In reply to | #1293691 |
On Thu, Dec 17, 2015 at 5:00 PM, Xin Long <lucien.xin@gmail.com> wrote:
> On Thu, Dec 17, 2015 at 4:48 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>> On Thu, Dec 17, 2015 at 04:46:00PM +0800, Xin Long wrote:
>>>
>>> sorry for late test, but unfortunately, my case with rhashtalbe still
>>> return EBUSY.
>>> I added some debug code in rhashtable_insert_rehash(), and found:
>>> *future_tbl is null*
>>>
>>> fail:
>>> /* Do not fail the insert if someone else did a rehash. */
>>> if (likely(rcu_dereference_raw(tbl->future_tbl))) {
>>> printk("future_tbl is there\n");
>>> return 0;
>>> } else {
>>> printk("future_tbl is null\n");
>>> }
>>>
>>> any idea why ?
>>
>> That's presumably because you got a genuine double rehash.
>>
>> Until you post your code we can't really help you.
>>
> i wish i could , but my codes is a big patch for sctp, and this issue
> happens in a special stress test based on this patch.
> im trying to think how i can show you. :)
I'm just wondering, why do not we handle the genuine double rehash
issue inside rhashtable? i mean it's just a temporary error that a
simple retry may fix it.
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-12-18 03:30 +0100 |
| Message-ID | <qGSXU-7WI-1@gated-at.bofh.it> |
| In reply to | #1294013 |
On Fri, Dec 18, 2015 at 12:07:08AM +0800, Xin Long wrote: > > I'm just wondering, why do not we handle the genuine double rehash > issue inside rhashtable? i mean it's just a temporary error that a > simple retry may fix it. Because a double rehash means that someone has cracked your hash function and there is no point in trying anymore. 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 -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Xin Long <lucien.xin@gmail.com> |
|---|---|
| Date | 2015-12-18 09:20 +0100 |
| Message-ID | <qGYqB-379-15@gated-at.bofh.it> |
| In reply to | #1294401 |
On Fri, Dec 18, 2015 at 10:26 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote: > On Fri, Dec 18, 2015 at 12:07:08AM +0800, Xin Long wrote: >> >> I'm just wondering, why do not we handle the genuine double rehash >> issue inside rhashtable? i mean it's just a temporary error that a >> simple retry may fix it. > > Because a double rehash means that someone has cracked your hash > function and there is no point in trying anymore. ok, get your point, is it possible to be triggered by some cases under a big stress insertion, but they are all legal cases. like we use rhash in nftables, if there are a big batch sets to insert, may this issue happen? > > 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 -- 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/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-12-17 18:10 +0100 |
| Message-ID | <qGKdY-2ks-11@gated-at.bofh.it> |
| In reply to | #1293691 |
From: Xin Long <lucien.xin@gmail.com>
Date: Thu, 17 Dec 2015 17:00:35 +0800
> On Thu, Dec 17, 2015 at 4:48 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>> On Thu, Dec 17, 2015 at 04:46:00PM +0800, Xin Long wrote:
>>>
>>> sorry for late test, but unfortunately, my case with rhashtalbe still
>>> return EBUSY.
>>> I added some debug code in rhashtable_insert_rehash(), and found:
>>> *future_tbl is null*
>>>
>>> fail:
>>> /* Do not fail the insert if someone else did a rehash. */
>>> if (likely(rcu_dereference_raw(tbl->future_tbl))) {
>>> printk("future_tbl is there\n");
>>> return 0;
>>> } else {
>>> printk("future_tbl is null\n");
>>> }
>>>
>>> any idea why ?
>>
>> That's presumably because you got a genuine double rehash.
>>
>> Until you post your code we can't really help you.
>>
> i wish i could , but my codes is a big patch for sctp, and this issue
> happens in a special stress test based on this patch.
> im trying to think how i can show you. :)
Simply post it.
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web