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

Ben Pfaff blp at nicira.com
Mon Aug 18 20:22:41 UTC 2014


On Mon, Aug 18, 2014 at 07:47:53PM +0000, Daniele Di Proietto wrote:
> 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
> >>block
> >> in the "slow path" case. This commit adds fat_rwlock_try_get_slot__()
> >>which
> >> 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
> >faster?
> 
> 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
> packets.
> 
> 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.

Thanks for the additional details.  It makes sense now.



More information about the dev mailing list