Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273729 > unrolled thread

rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY

Started byXin Long <lucien.xin@gmail.com>
First post2015-11-20 06:20 +0100
Last post2015-11-20 13:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY Xin Long <lucien.xin@gmail.com> - 2015-11-20 06:20 +0100
    Re: rhashtable: how to deal with that rhashtable_lookup_insert_key  return -EBUSY Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-20 13:30 +0100
    Re: rhashtable: how to deal with that rhashtable_lookup_insert_key  return -EBUSY Phil Sutter <phil@nwl.cc> - 2015-11-20 13:40 +0100

#1273729 — rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY

FromXin Long <lucien.xin@gmail.com>
Date2015-11-20 06:20 +0100
Subjectrhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY
Message-ID<qwMh4-2O8-1@gated-at.bofh.it>
when I use rhashtable_lookup_insert_key, sometimes it will return -EBUSY.
im not sure if there is a good way to workabout it.
or I should just try again and again until it's inserted successfully ?

I have seen some use in kernel  by now, but it seems that no one consider
this issue for their cases. but it indeed exists in my case.

did I use it incorrectly or something else ?

Thanks.
--
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]


#1274025 — Re: rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2015-11-20 13:30 +0100
SubjectRe: rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY
Message-ID<qwSZc-79N-13@gated-at.bofh.it>
In reply to#1273729
On Fri, Nov 20, 2015 at 01:24:01PM +0100, Phil Sutter wrote:
>
> Herbert, did you manage to reproduce the problem meanwhile? If so, was
> there any progress on fixing rhashtable? Otherwise, I could respin my
> patch from [1] to cover only -EBUSY case by default and add a parameter
> to make non-permanent -ENOMEM visible.

No I have not been able to reproduce this yet.

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]


#1274037 — Re: rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY

FromPhil Sutter <phil@nwl.cc>
Date2015-11-20 13:40 +0100
SubjectRe: rhashtable: how to deal with that rhashtable_lookup_insert_key return -EBUSY
Message-ID<qwSZc-79N-15@gated-at.bofh.it>
In reply to#1273729
On Fri, Nov 20, 2015 at 01:14:18PM +0800, Xin Long wrote:
> when I use rhashtable_lookup_insert_key, sometimes it will return -EBUSY.
> im not sure if there is a good way to workabout it.
> or I should just try again and again until it's inserted successfully ?
> 
> I have seen some use in kernel  by now, but it seems that no one consider
> this issue for their cases. but it indeed exists in my case.
> 
> did I use it incorrectly or something else ?

AFAIK, insert returning -EBUSY is a situation users have to be aware of
and retry the insert. I sent a patch[1] to fix this in test_rhashtable.

That patch though retried in case of -ENOMEM as well, which was
considered wrong to do and therefore it wasn't accepted. But in my test
runs, -ENOMEM happened quite frequently and it also wasn't a permanent
error. For details, see the following discussion[2].

Herbert, did you manage to reproduce the problem meanwhile? If so, was
there any progress on fixing rhashtable? Otherwise, I could respin my
patch from [1] to cover only -EBUSY case by default and add a parameter
to make non-permanent -ENOMEM visible.

Cheers, Phil

[1]: https://lkml.org/lkml/2015/8/28/197
[2]: https://lkml.org/lkml/2015/8/28/281
> 
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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