[ovs-dev] [PATCH] fat-rwlock: fat_rwlock_tryrdlock() should never block

Daniele Di Proietto ddiproietto at vmware.com
Mon Aug 18 19:47:53 UTC 2014

On 8/18/14, 11:47 AM, "Ben Pfaff" <blp at nicira.com> wrote:

>On Mon, Aug 18, 2014 at 11:26:22AM -0700, Daniele Di Proietto wrote:
>> fat_rwlock_tryrdlock() used to call fat_rwlock_get_slot__() which could
>> in the "slow path" case. This commit adds fat_rwlock_try_get_slot__()
>> does not block, even in the "slow path" case.
>> Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
>What's the visible effect of this patch?  Does it make something

Hi Ben,

this fixes a hang on dpif-netdev: fat_rwlock_tryrdlock() is used to detect
if there¹s a registered upcall handler. If the lock is taken (because
there is no upcall handler) the pmd thread is blocked and stops processing

The issue specifically happens when creating the datapath with dpctl
commands, so it is not a big problem.

I will send a v2 with a more clear commit message.

More information about the dev mailing list