* [PATCH net-next 0/4] Converting pernet_operations (part #6)
@ 2018-03-13 10:36 Kirill Tkhai
2018-03-13 10:36 ` [PATCH net-next 1/4] net: Convert sctp_defaults_ops Kirill Tkhai
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:36 UTC (permalink / raw)
To: davem, vyasevich, nhorman, jon.maloy, ying.xue,
santosh.shilimkar, netdev, ktkhai
Hi,
this series continues to review and to convert pernet_operations
to make them possible to be executed in parallel for several
net namespaces in the same time. There are sctp, tipc and rds
in this series.
Thanks,
Kirill
---
Kirill Tkhai (4):
net: Convert sctp_defaults_ops
net: Convert sctp_ctrlsock_ops
net: Convert tipc_net_ops
net: Convert rds_tcp_net_ops
net/rds/tcp.c | 1 +
net/sctp/protocol.c | 2 ++
net/tipc/core.c | 1 +
3 files changed, 4 insertions(+)
--
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/4] net: Convert sctp_defaults_ops
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
@ 2018-03-13 10:36 ` Kirill Tkhai
2018-03-13 10:37 ` [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops Kirill Tkhai
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:36 UTC (permalink / raw)
To: davem, vyasevich, nhorman, jon.maloy, ying.xue,
santosh.shilimkar, netdev, ktkhai
These pernet_operations have a deal with sysctl, /proc
entries and statistics. Also, there are freeing of
net::sctp::addr_waitq queue and net::sctp::local_addr_list
in exit method. All of them look pernet-divided, and it
seems these items are only interesting for sctp_defaults_ops,
which are safe to be executed in parallel.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/sctp/protocol.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 91813e686c67..32be52304f98 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1330,6 +1330,7 @@ static void __net_exit sctp_defaults_exit(struct net *net)
static struct pernet_operations sctp_defaults_ops = {
.init = sctp_defaults_init,
.exit = sctp_defaults_exit,
+ .async = true,
};
static int __net_init sctp_ctrlsock_init(struct net *net)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
2018-03-13 10:36 ` [PATCH net-next 1/4] net: Convert sctp_defaults_ops Kirill Tkhai
@ 2018-03-13 10:37 ` Kirill Tkhai
2018-03-13 11:45 ` Neil Horman
2018-03-13 10:37 ` [PATCH net-next 3/4] net: Convert tipc_net_ops Kirill Tkhai
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:37 UTC (permalink / raw)
To: davem, vyasevich, nhorman, jon.maloy, ying.xue,
santosh.shilimkar, netdev, ktkhai
These pernet_operations create and destroy net::sctp::ctl_sock.
Since pernet_operations do not send sctp packets each other,
they look safe to be marked as async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/sctp/protocol.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 32be52304f98..606361ee9e4a 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1354,6 +1354,7 @@ static void __net_init sctp_ctrlsock_exit(struct net *net)
static struct pernet_operations sctp_ctrlsock_ops = {
.init = sctp_ctrlsock_init,
.exit = sctp_ctrlsock_exit,
+ .async = true,
};
/* Initialize the universe into something sensible. */
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 3/4] net: Convert tipc_net_ops
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
2018-03-13 10:36 ` [PATCH net-next 1/4] net: Convert sctp_defaults_ops Kirill Tkhai
2018-03-13 10:37 ` [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops Kirill Tkhai
@ 2018-03-13 10:37 ` Kirill Tkhai
2018-03-13 10:37 ` [PATCH net-next 4/4] net: Convert rds_tcp_net_ops Kirill Tkhai
2018-03-13 15:25 ` [PATCH net-next 0/4] Converting pernet_operations (part #6) David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:37 UTC (permalink / raw)
To: davem, vyasevich, nhorman, jon.maloy, ying.xue,
santosh.shilimkar, netdev, ktkhai
TIPC looks concentrated in itself, and other pernet_operations
seem not touching its entities.
tipc_net_ops look pernet-divided, and they should be safe to
be executed in parallel for several net the same time.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/tipc/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 0b982d048fb9..04fd91bb11d7 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -105,6 +105,7 @@ static struct pernet_operations tipc_net_ops = {
.exit = tipc_exit_net,
.id = &tipc_net_id,
.size = sizeof(struct tipc_net),
+ .async = true,
};
static int __init tipc_init(void)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 4/4] net: Convert rds_tcp_net_ops
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
` (2 preceding siblings ...)
2018-03-13 10:37 ` [PATCH net-next 3/4] net: Convert tipc_net_ops Kirill Tkhai
@ 2018-03-13 10:37 ` Kirill Tkhai
2018-03-13 15:25 ` [PATCH net-next 0/4] Converting pernet_operations (part #6) David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:37 UTC (permalink / raw)
To: davem, vyasevich, nhorman, jon.maloy, ying.xue,
santosh.shilimkar, netdev, ktkhai
These pernet_operations create and destroy sysctl table
and listen socket. Also, exit method flushes global
workqueue and work. Everything looks per-net safe,
so we can mark them async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/rds/tcp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 08230a145042..eb04e7fa2467 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -515,6 +515,7 @@ static struct pernet_operations rds_tcp_net_ops = {
.exit = rds_tcp_exit_net,
.id = &rds_tcp_netid,
.size = sizeof(struct rds_tcp_net),
+ .async = true,
};
static void rds_tcp_kill_sock(struct net *net)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops
2018-03-13 10:37 ` [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops Kirill Tkhai
@ 2018-03-13 11:45 ` Neil Horman
0 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2018-03-13 11:45 UTC (permalink / raw)
To: Kirill Tkhai
Cc: davem, vyasevich, jon.maloy, ying.xue, santosh.shilimkar, netdev
On Tue, Mar 13, 2018 at 01:37:02PM +0300, Kirill Tkhai wrote:
> These pernet_operations create and destroy net::sctp::ctl_sock.
> Since pernet_operations do not send sctp packets each other,
> they look safe to be marked as async.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
> net/sctp/protocol.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 32be52304f98..606361ee9e4a 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1354,6 +1354,7 @@ static void __net_init sctp_ctrlsock_exit(struct net *net)
> static struct pernet_operations sctp_ctrlsock_ops = {
> .init = sctp_ctrlsock_init,
> .exit = sctp_ctrlsock_exit,
> + .async = true,
> };
>
> /* Initialize the universe into something sensible. */
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/4] Converting pernet_operations (part #6)
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
` (3 preceding siblings ...)
2018-03-13 10:37 ` [PATCH net-next 4/4] net: Convert rds_tcp_net_ops Kirill Tkhai
@ 2018-03-13 15:25 ` David Miller
4 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2018-03-13 15:25 UTC (permalink / raw)
To: ktkhai; +Cc: vyasevich, nhorman, jon.maloy, ying.xue, santosh.shilimkar, netdev
From: Kirill Tkhai <ktkhai@virtuozzo.com>
Date: Tue, 13 Mar 2018 13:36:33 +0300
> this series continues to review and to convert pernet_operations
> to make them possible to be executed in parallel for several
> net namespaces in the same time. There are sctp, tipc and rds
> in this series.
Series applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-03-13 15:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 10:36 [PATCH net-next 0/4] Converting pernet_operations (part #6) Kirill Tkhai
2018-03-13 10:36 ` [PATCH net-next 1/4] net: Convert sctp_defaults_ops Kirill Tkhai
2018-03-13 10:37 ` [PATCH net-next 2/4] net: Convert sctp_ctrlsock_ops Kirill Tkhai
2018-03-13 11:45 ` Neil Horman
2018-03-13 10:37 ` [PATCH net-next 3/4] net: Convert tipc_net_ops Kirill Tkhai
2018-03-13 10:37 ` [PATCH net-next 4/4] net: Convert rds_tcp_net_ops Kirill Tkhai
2018-03-13 15:25 ` [PATCH net-next 0/4] Converting pernet_operations (part #6) David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).