On 29 Aug 2024, at 9:51, Simon Horman wrote:
> On Wed, Aug 28, 2024 at 03:28:41PM +0200, Eelco Chaudron wrote:
>> This fix makes sure spurious wakeups are detected using a
>> conditional variable in a loop.
>>
>> Fixes: 0e124db81f63 ("stopwatch: Add API for waiting until samples have been
>> processed")
>> Signed-off-by: Eelco Chaudron <[email protected]>
>
> Thanks Eelco,
>
> My understanding of this patch is it protects against the
> case where ovs_mutex_cond_wait() returns other than due to
> the call to xpthread_cond_signal(&stopwatches_sync) in stopwatch_thread().
>
> If so, I agree it is correct as stopwatches_sync_requested will be false
> if this is the case. I also believe this is thread-safe as
> stopwatches_sync_requested is always by guarded stopwatches_lock.
Thanks for adding your analysis, they are correct.
> I also note that there are no other places where stopwatches_sync is used
> (so they don't need to be considered).
>
> And lastly, I agree that the code being fixed was addressed by
> the cited commit.
>
Thanks for the review!
> Acked-by: Simon Horman <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev