[ovs-dev] [PATCH v2 2/5] Make ByteQ safe for simultaneous producer/consumer

Anton Ivanov anton.ivanov at cambridgegreys.com
Fri Jun 5 12:46:02 UTC 2020


On 04/06/2020 21:47, Ben Pfaff wrote:
> On Tue, Jun 02, 2020 at 08:21:49AM +0100, anton.ivanov at cambridgegreys.com wrote:
>> From: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>>
>> A ByteQ with unlocked head and tail is unsafe for simultaneous
>> consume/produce.
> It isn't meant for that use, or at least it wasn't.  If you're changing
> the goal then you should document the new guarantees, as do the other
> OVS data structures that have thread-safety guarantees.
>
Ack. I will do in the next patch revision.

It is guaranteed for parallel use by ONE producer and ONE consumer. More 
than one on either side will not work.

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/



More information about the dev mailing list