[ovs-dev] [OVN Patch v14 1/3] ovn-libs: Add support for parallel processing

Anton Ivanov anton.ivanov at cambridgegreys.com
Thu Feb 25 16:03:08 UTC 2021


Good one.

I will add handling for that.

I think we can just restart the call if it is it an EINTR.

A.

On 25/02/2021 15:18, Ilya Maximets wrote:
> On 2/12/21 3:49 PM, Anton Ivanov wrote:
>> This adds a set of functions and macros intended to process
>> hashes in parallel.
>>
>> The principles of operation are documented in the fasthmap.h
>>
>> If these one day go into the OVS tree, the OVS tree versions
>> would be used in preference.
>>
>> Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
> Hi, Anton.  Not a full review, just one comment below.
>
>> +static inline void wait_for_work(struct worker_control *control)
>> +{
>> +    sem_wait(control->fire);
>> +}
> Shouldn't we check the result of sem_wait?  If it failed with
> EINTR we likely need to call it again, otherwise worker thread
> might start working on the incomplete or uninitialized data
> and crash.
>
> We may also add assertion for EINVAL just to catch it earlier.
>
> Best regards, Ilya Maximets.
>
-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/



More information about the dev mailing list