Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2022-01-20 Thread Damjan Marion via lists.fd.io
p change). >>>>>>> >>>>>>> I crafted WIP patch to present my idea: >>>>>>> >>>>>>> https://gerrit.fd.io/r/c/vpp/+/34326 >>>>>>> >>>>>>> In this patch I get a rid of all store

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-04 Thread Florin Coras
ms with strong memory ordering (like x86_64) this will result >>>>>> with just normal stores (but compiler will know that it should not >>>>>> reorder them). >>>>>> On platforms with weak memory ordering (like arch64) this will result in >>&

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-04 Thread Damjan Marion via lists.fd.io
(ptr, val, __ATOMIC_RELEASE); >>>>>> >>>>>> On platforms with strong memory ordering (like x86_64) this will result >>>>>> with just normal stores (but compiler will know that it should not >>>>>> reorder them). >>&g

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-04 Thread Nick Zavaritsky
mailto:vpp-dev@lists.fd.io> mailto:vpp-dev@lists.fd.io>> On Behalf Of Nick Zavaritsky Sent: Monday, November 1, 2021 12:12 PM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: [vpp-dev] Bihash is considered thread-safe but probably shouldn't Hello bihash experts! The

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-03 Thread Florin Coras
>>>> Thanks, >>>> >>>> — >>>> Damjan >>>> >>>> >>>> >>>>> On 02.11.2021., at 12:14, Dave Barach >>>> <mailto:v...@barachs.net>> wrote: >>>>> >>>>> Dear

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-03 Thread Damjan Marion via lists.fd.io
priority, or some other >>>> expedients to make the required assumptions true? >>>> >>>> It’s easy enough to change the code in various ways so this use-case >>>> cannot backfire. High on the list: always make a working copy of the >>>>

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-03 Thread Damjan Marion via lists.fd.io
thread priority, or some other >>> expedients to make the required assumptions true? >>> >>> It’s easy enough to change the code in various ways so this use-case cannot >>> backfire. High on the list: always make a working copy of the bucket, vs. >>> updat

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-03 Thread Florin Coras
> backfire. High on the list: always make a working copy of the bucket, vs. >> update in place. Won’t help write performance, but it’s likely to make the >> pain go away. >> >> Bucket-level reader-locks would involve adding Avogadro’s number of atomic >> ops to the p

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-03 Thread Damjan Marion via lists.fd.io
WIW... Dave > > > From: vpp-dev@lists.fd.io On Behalf Of Nick Zavaritsky > Sent: Monday, November 1, 2021 12:12 PM > To: vpp-dev@lists.fd.io > Subject: [vpp-dev] Bihash is considered thread-safe but probably shouldn't > > Hello bihash experts! > > There&#

Re: [vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-02 Thread Dave Barach
-starter. FWIW... Dave From: vpp-dev@lists.fd.io On Behalf Of Nick Zavaritsky Sent: Monday, November 1, 2021 12:12 PM To: vpp-dev@lists.fd.io Subject: [vpp-dev] Bihash is considered thread-safe but probably shouldn't Hello bihash experts! There's an old thread claiming t

[vpp-dev] Bihash is considered thread-safe but probably shouldn't

2021-11-01 Thread Nick Zavaritsky
Hello bihash experts! There's an old thread claiming that bihash lookup can produce a value=-1 under intense add/delete concurrent activity: https://lists.fd.io/g/vpp-dev/message/15606 We had a seemingly related crash recently when a lookup in snat_main.flow_hash yielded a value=-1 which was s