[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <152120385651.2065.2567466917573907029.stgit@localhost.localdomain>
Date: Fri, 16 Mar 2018 15:38:23 +0300
From: Kirill Tkhai <ktkhai@...tuozzo.com>
To: santosh.shilimkar@...cle.com, davem@...emloft.net,
netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
rds-devel@....oracle.com, edumazet@...gle.com,
ktkhai@...tuozzo.com, sowmini.varadhan@...cle.com
Subject: [PATCH RFC RFC] rds: Use NETDEV_UNREGISTER in rds_tcp_dev_event()
(then kill NETDEV_UNREGISTER_FINAL)
Hi,
rds_tcp_dev_event() is the last user of NETDEV_UNREGISTER_FINAL stage.
If we rework it, we'll be able to kill the stage, and this will decrease
the number of rtnl_lock() we take during generic net device unregistration.
This is very hot path for namespaces.
467fa15356acf by Sowmini Varadhan added NETDEV_UNREGISTER_FINAL dependence
with the commentary:
/* rds-tcp registers as a pernet subys, so the ->exit will only
* get invoked after network acitivity has quiesced. We need to
* clean up all sockets to quiesce network activity, and use
* the unregistration of the per-net loopback device as a trigger
* to start that cleanup.
*/
It seems all the protocols pernet subsystems meet this situation, but they
solve it in generic way. What does rds so specific have?
This commit makes event handler to iterate rds_tcp_conn_list and
kill them. If we change the stage to NETDEV_UNREGISTER, what will change?
Can unregistered loopback device on dead net add new items to rds_tcp_conn_list?
How it's possible?
What the problem is to move rds_tcp_kill_sock() into pernet subsys exit?
Kirill
---
net/rds/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index eb04e7fa2467..4c6db9cb6261 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -567,7 +567,7 @@ static int rds_tcp_dev_event(struct notifier_block *this,
* the unregistration of the per-net loopback device as a trigger
* to start that cleanup.
*/
- if (event == NETDEV_UNREGISTER_FINAL &&
+ if (event == NETDEV_UNREGISTER &&
dev->ifindex == LOOPBACK_IFINDEX)
rds_tcp_kill_sock(dev_net(dev));
Powered by blists - more mailing lists