Re: [PATCH] vxlan: using hash_lock to protect one budegt in vxlan_flush
From: David Miller
Date: Fri Apr 12 2019 - 00:30:24 EST
From: Litao Jiao <jiaolitao@xxxxxxxxxxxx>
Date: Thu, 11 Apr 2019 15:06:09 +0800
> The hash_lock will hold long time in vxlan_flush when stopping the
> vxlan device in which there has lots of vxlan fdb entries;it would
> affect the bh process in local cpu; and other cpu would wait for
> a long time in vxlan_snoop until the hash_lock is released;so
> using hash_lock to protect one budegt in vxlan_flush could
> reduce the continuous holding time of the lock.
>
> Signed-off-by: Litao Jiao <jiaolitao@xxxxxxxxxxxx>
Now you are doing FDB_HASH_SIZE spin lock/unlock sequences.
There has to be a better way.