]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'mlxsw-Remove-RTNL-from-route-insertion-path'
authorDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commit4317c8880e6e80cda8a8bd757c9bf11af20542cd
treea6e31a786822338207e5d1fdf558667ff169770c
parent2e60e6a02746773a7c0fe584ffaa92f56665f177
parentdb61783acc8e0d411bb7f13d216aeb9b80b0d203
Merge branch 'mlxsw-Remove-RTNL-from-route-insertion-path'

Ido Schimmel says:

====================
mlxsw: Remove RTNL from route insertion path

This patch set removes RTNL from the route insertion path in mlxsw in
order to reduce the control plane latency: the time it takes to push
routes from user space to the kernel and mlxsw.

Up until now mlxsw did not have a lock to protect its shared router data
structures and instead relied on RTNL. While this was simple and worked,
it resulted in large control plane latencies as RTNL was heavily
contended - by both the task receiving the netlink messages from user
space and the mlxsw workqueue that programs the routes to the device.

By removing RTNL and introducing a new router mutex, this patch set
reduces the control plane latency by ~80%. A single mutex is added as
inside mlxsw there is not a lot of concurrency. In addition, a more
fine-grained locking scheme is much more error-prone.

Patches #1-#6 are preparations. They add needed locking in NVE and
multicast routing code instead of relying on RTNL
Patch #7 introduces the new mutex
Patches #8-#12 gradually take the lock in various entry points into the
routing code
Patch #13 removes RTNL in places where it is no longer required
====================

Signed-off-by: David S. Miller <davem@davemloft.net>