* [PATCH net-next nfs 0/6] Converting pernet_operations (part #7)
@ 2018-03-13 10:49 Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
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 nfs pernet_operations
in this series. All of them look similar each other, they mostly
create and destroy caches with small exceptions.
Also, there is rxrpc_net_ops, which is used in AFS.
Thanks,
Kirill
---
Kirill Tkhai (6):
net: Convert rpcsec_gss_net_ops
net: Convert sunrpc_net_ops
net: Convert nfsd_net_ops
net: Convert nfs4_dns_resolver_ops
net: Convert nfs4blocklayout_net_ops
net: Convert rxrpc_net_ops
fs/nfs/blocklayout/rpc_pipefs.c | 1 +
fs/nfs/dns_resolve.c | 1 +
fs/nfsd/nfsctl.c | 1 +
net/rxrpc/net_ns.c | 1 +
net/sunrpc/auth_gss/auth_gss.c | 1 +
net/sunrpc/sunrpc_syms.c | 1 +
6 files changed, 6 insertions(+)
--
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
@ 2018-03-13 10:49 ` Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-23 18:55 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops Kirill Tkhai
` (7 subsequent siblings)
8 siblings, 2 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations initialize and destroy sunrpc_net_id
refered per-net items. Only used global list is cache_list,
and accesses already serialized.
sunrpc_destroy_cache_detail() check for list_empty() without
cache_list_lock, but when it's called from unregister_pernet_subsys(),
there can't be callers in parallel, so we won't miss list_empty()
in this case.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/sunrpc/auth_gss/auth_gss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 9463af4b32e8..44f939cb6bc8 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
static struct pernet_operations rpcsec_gss_net_ops = {
.init = rpcsec_gss_init_net,
.exit = rpcsec_gss_exit_net,
+ .async = true,
};
/*
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
@ 2018-03-13 10:49 ` Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 3/6] net: Convert nfsd_net_ops Kirill Tkhai
` (6 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations look similar to rpcsec_gss_net_ops,
they just create and destroy another caches. So, they also
can be async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/sunrpc/sunrpc_syms.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 56f9eff74150..68287e921847 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -79,6 +79,7 @@ static struct pernet_operations sunrpc_net_ops = {
.exit = sunrpc_exit_net,
.id = &sunrpc_net_id,
.size = sizeof(struct sunrpc_net),
+ .async = true,
};
static int __init
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 3/6] net: Convert nfsd_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops Kirill Tkhai
@ 2018-03-13 10:49 ` Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations look similar to rpcsec_gss_net_ops,
they just create and destroy another caches. So, they also
can be async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
fs/nfsd/nfsctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index d107b4426f7e..1e3824e6cce0 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1263,6 +1263,7 @@ static struct pernet_operations nfsd_net_ops = {
.exit = nfsd_exit_net,
.id = &nfsd_net_id,
.size = sizeof(struct nfsd_net),
+ .async = true,
};
static int __init init_nfsd(void)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (2 preceding siblings ...)
2018-03-13 10:49 ` [PATCH net-next nfs 3/6] net: Convert nfsd_net_ops Kirill Tkhai
@ 2018-03-13 10:49 ` Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations look similar to rpcsec_gss_net_ops,
they just create and destroy another cache. Also they create
and destroy directory. So, they also look safe to be async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
fs/nfs/dns_resolve.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index 060c658eab66..e90bd69ab653 100644
--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -410,6 +410,7 @@ static void nfs4_dns_net_exit(struct net *net)
static struct pernet_operations nfs4_dns_resolver_ops = {
.init = nfs4_dns_net_init,
.exit = nfs4_dns_net_exit,
+ .async = true,
};
static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (3 preceding siblings ...)
2018-03-13 10:49 ` [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
@ 2018-03-13 10:49 ` Kirill Tkhai
2018-03-23 18:54 ` Anna Schumaker
2018-03-13 10:50 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops Kirill Tkhai
` (3 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:49 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations create and destroy per-net pipe
and dentry, and they seem safe to be marked as async.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
fs/nfs/blocklayout/rpc_pipefs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index 9fb067a6f7e0..ef9fa111b009 100644
--- a/fs/nfs/blocklayout/rpc_pipefs.c
+++ b/fs/nfs/blocklayout/rpc_pipefs.c
@@ -261,6 +261,7 @@ static void nfs4blocklayout_net_exit(struct net *net)
static struct pernet_operations nfs4blocklayout_net_ops = {
.init = nfs4blocklayout_net_init,
.exit = nfs4blocklayout_net_exit,
+ .async = true,
};
int __init bl_init_pipefs(void)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (4 preceding siblings ...)
2018-03-13 10:49 ` [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
@ 2018-03-13 10:50 ` Kirill Tkhai
2018-03-13 15:26 ` [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) David Miller
` (2 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-13 10:50 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, ktkhai, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
These pernet_operations modifies rxrpc_net_id-pointed
per-net entities. There is external link to AF_RXRPC
in fs/afs/Kconfig, but it seems there is no other
pernet_operations interested in that per-net entities.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/rxrpc/net_ns.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/rxrpc/net_ns.c b/net/rxrpc/net_ns.c
index f18c9248e0d4..5fd939dabf41 100644
--- a/net/rxrpc/net_ns.c
+++ b/net/rxrpc/net_ns.c
@@ -106,4 +106,5 @@ struct pernet_operations rxrpc_net_ops = {
.exit = rxrpc_exit_net,
.id = &rxrpc_net_id,
.size = sizeof(struct rxrpc_net),
+ .async = true,
};
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 0/6] Converting pernet_operations (part #7)
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (5 preceding siblings ...)
2018-03-13 10:50 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops Kirill Tkhai
@ 2018-03-13 15:26 ` David Miller
2018-03-15 13:32 ` Kirill Tkhai
2018-03-20 16:49 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops David Howells
8 siblings, 0 replies; 20+ messages in thread
From: David Miller @ 2018-03-13 15:26 UTC (permalink / raw)
To: ktkhai
Cc: trond.myklebust, anna.schumaker, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
From: Kirill Tkhai <ktkhai@virtuozzo.com>
Date: Tue, 13 Mar 2018 13:49:05 +0300
> 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 nfs pernet_operations
> in this series. All of them look similar each other, they mostly
> create and destroy caches with small exceptions.
>
> Also, there is rxrpc_net_ops, which is used in AFS.
I'll let the various maintainers pick these up instead of passing
them via the net-next tree.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 0/6] Converting pernet_operations (part #7)
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (6 preceding siblings ...)
2018-03-13 15:26 ` [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) David Miller
@ 2018-03-15 13:32 ` Kirill Tkhai
2018-03-15 14:24 ` J. Bruce Fields
2018-03-20 16:49 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops David Howells
8 siblings, 1 reply; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-15 13:32 UTC (permalink / raw)
To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
dhowells, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
Hi,
Trond, Anna, Bruce, Jeff, David and other NFS and RXRPC people,
could you please provide your vision on this patches?
Thanks,
Kirill
On 13.03.2018 13:49, Kirill Tkhai wrote:
> 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 nfs pernet_operations
> in this series. All of them look similar each other, they mostly
> create and destroy caches with small exceptions.
>
> Also, there is rxrpc_net_ops, which is used in AFS.
>
> Thanks,
> Kirill
> ---
>
> Kirill Tkhai (6):
> net: Convert rpcsec_gss_net_ops
> net: Convert sunrpc_net_ops
> net: Convert nfsd_net_ops
> net: Convert nfs4_dns_resolver_ops
> net: Convert nfs4blocklayout_net_ops
> net: Convert rxrpc_net_ops
>
>
> fs/nfs/blocklayout/rpc_pipefs.c | 1 +
> fs/nfs/dns_resolve.c | 1 +
> fs/nfsd/nfsctl.c | 1 +
> net/rxrpc/net_ns.c | 1 +
> net/sunrpc/auth_gss/auth_gss.c | 1 +
> net/sunrpc/sunrpc_syms.c | 1 +
> 6 files changed, 6 insertions(+)
>
> --
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 0/6] Converting pernet_operations (part #7)
2018-03-15 13:32 ` Kirill Tkhai
@ 2018-03-15 14:24 ` J. Bruce Fields
2018-03-15 14:46 ` Kirill Tkhai
0 siblings, 1 reply; 20+ messages in thread
From: J. Bruce Fields @ 2018-03-15 14:24 UTC (permalink / raw)
To: Kirill Tkhai
Cc: davem, trond.myklebust, anna.schumaker, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On Thu, Mar 15, 2018 at 04:32:30PM +0300, Kirill Tkhai wrote:
> Trond, Anna, Bruce, Jeff, David and other NFS and RXRPC people,
> could you please provide your vision on this patches?
Whoops, sorry, I haven't been paying attention. Do you have a pointer
to documentation? I'm unclear what the actual concurrency change
is--sounds like it becomes possible that e.g. multiple ->init methods
(from the same pernet_operations but for different namespaces) could run
in parallel?
Sounds likely to be safe, and I don't actually care too much who merges
them as they look very unlikely to conflict with anything pending. But
unless anyone tells me otherwise I'll take the one nfsd_net_ops patch
and leave the rest to Anna or Trond.
--b.
>
> Thanks,
> Kirill
>
> On 13.03.2018 13:49, Kirill Tkhai wrote:
> > 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 nfs pernet_operations
> > in this series. All of them look similar each other, they mostly
> > create and destroy caches with small exceptions.
> >
> > Also, there is rxrpc_net_ops, which is used in AFS.
> >
> > Thanks,
> > Kirill
> > ---
> >
> > Kirill Tkhai (6):
> > net: Convert rpcsec_gss_net_ops
> > net: Convert sunrpc_net_ops
> > net: Convert nfsd_net_ops
> > net: Convert nfs4_dns_resolver_ops
> > net: Convert nfs4blocklayout_net_ops
> > net: Convert rxrpc_net_ops
> >
> >
> > fs/nfs/blocklayout/rpc_pipefs.c | 1 +
> > fs/nfs/dns_resolve.c | 1 +
> > fs/nfsd/nfsctl.c | 1 +
> > net/rxrpc/net_ns.c | 1 +
> > net/sunrpc/auth_gss/auth_gss.c | 1 +
> > net/sunrpc/sunrpc_syms.c | 1 +
> > 6 files changed, 6 insertions(+)
> >
> > --
> > Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> >
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 0/6] Converting pernet_operations (part #7)
2018-03-15 14:24 ` J. Bruce Fields
@ 2018-03-15 14:46 ` Kirill Tkhai
0 siblings, 0 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-15 14:46 UTC (permalink / raw)
To: J. Bruce Fields
Cc: davem, trond.myklebust, anna.schumaker, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 15.03.2018 17:24, J. Bruce Fields wrote:
> On Thu, Mar 15, 2018 at 04:32:30PM +0300, Kirill Tkhai wrote:
>> Trond, Anna, Bruce, Jeff, David and other NFS and RXRPC people,
>> could you please provide your vision on this patches?
>
> Whoops, sorry, I haven't been paying attention. Do you have a pointer
> to documentation? I'm unclear what the actual concurrency change
> is--sounds like it becomes possible that e.g. multiple ->init methods
> (from the same pernet_operations but for different namespaces) could run
> in parallel?
There is a commentary near struct pernet_operations in fresh net-next.git:
struct pernet_operations {
struct list_head list;
/*
* Below methods are called without any exclusive locks.
* More than one net may be constructed and destructed
* in parallel on several cpus. Every pernet_operations
* have to keep in mind all other pernet_operations and
* to introduce a locking, if they share common resources.
*
* Exit methods using blocking RCU primitives, such as
* synchronize_rcu(), should be implemented via exit_batch.
* Then, destruction of a group of net requires single
* synchronize_rcu() related to these pernet_operations,
* instead of separate synchronize_rcu() for every net.
* Please, avoid synchronize_rcu() at all, where it's possible.
*/
I hope this is enough. Please tell me, if there is unclear thing, I'll
extend it.
> Sounds likely to be safe, and I don't actually care too much who merges
> them as they look very unlikely to conflict with anything pending. But
> unless anyone tells me otherwise I'll take the one nfsd_net_ops patch
> and leave the rest to Anna or Trond.
Sounds great. Thanks!
Kirill
>> Thanks,
>> Kirill
>>
>> On 13.03.2018 13:49, Kirill Tkhai wrote:
>>> 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 nfs pernet_operations
>>> in this series. All of them look similar each other, they mostly
>>> create and destroy caches with small exceptions.
>>>
>>> Also, there is rxrpc_net_ops, which is used in AFS.
>>>
>>> Thanks,
>>> Kirill
>>> ---
>>>
>>> Kirill Tkhai (6):
>>> net: Convert rpcsec_gss_net_ops
>>> net: Convert sunrpc_net_ops
>>> net: Convert nfsd_net_ops
>>> net: Convert nfs4_dns_resolver_ops
>>> net: Convert nfs4blocklayout_net_ops
>>> net: Convert rxrpc_net_ops
>>>
>>>
>>> fs/nfs/blocklayout/rpc_pipefs.c | 1 +
>>> fs/nfs/dns_resolve.c | 1 +
>>> fs/nfsd/nfsctl.c | 1 +
>>> net/rxrpc/net_ns.c | 1 +
>>> net/sunrpc/auth_gss/auth_gss.c | 1 +
>>> net/sunrpc/sunrpc_syms.c | 1 +
>>> 6 files changed, 6 insertions(+)
>>>
>>> --
>>> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
>>>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
` (7 preceding siblings ...)
2018-03-15 13:32 ` Kirill Tkhai
@ 2018-03-20 16:49 ` David Howells
8 siblings, 0 replies; 20+ messages in thread
From: David Howells @ 2018-03-20 16:49 UTC (permalink / raw)
To: Kirill Tkhai
Cc: dhowells, davem, trond.myklebust, anna.schumaker, bfields,
jlayton, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
Kirill Tkhai <ktkhai@virtuozzo.com> wrote:
> These pernet_operations modifies rxrpc_net_id-pointed
> per-net entities. There is external link to AF_RXRPC
> in fs/afs/Kconfig, but it seems there is no other
> pernet_operations interested in that per-net entities.
The fs/afs/ namespacing stuff isn't active yet as I'm trying to decide on how
to deal with the DNS cache which also needs namespacing.
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
DaveM: Can you take this into net-next and add:
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
@ 2018-03-23 18:53 ` Anna Schumaker
2018-03-26 9:30 ` Kirill Tkhai
2018-03-26 18:36 ` J. Bruce Fields
2018-03-23 18:55 ` Anna Schumaker
1 sibling, 2 replies; 20+ messages in thread
From: Anna Schumaker @ 2018-03-23 18:53 UTC (permalink / raw)
To: Kirill Tkhai, davem, trond.myklebust, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> These pernet_operations initialize and destroy sunrpc_net_id
> refered per-net items. Only used global list is cache_list,
> and accesses already serialized.
>
> sunrpc_destroy_cache_detail() check for list_empty() without
> cache_list_lock, but when it's called from unregister_pernet_subsys(),
> there can't be callers in parallel, so we won't miss list_empty()
> in this case.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
It might make sense to take these and the other NFS patches through the net tree, since the pernet_operations don't yet have the async field in my tree (and I therefore can't compile once these are applied).
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
> ---
> net/sunrpc/auth_gss/auth_gss.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
> index 9463af4b32e8..44f939cb6bc8 100644
> --- a/net/sunrpc/auth_gss/auth_gss.c
> +++ b/net/sunrpc/auth_gss/auth_gss.c
> @@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
> static struct pernet_operations rpcsec_gss_net_ops = {
> .init = rpcsec_gss_init_net,
> .exit = rpcsec_gss_exit_net,
> + .async = true,
> };
>
> /*
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops
2018-03-13 10:49 ` [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops Kirill Tkhai
@ 2018-03-23 18:53 ` Anna Schumaker
0 siblings, 0 replies; 20+ messages in thread
From: Anna Schumaker @ 2018-03-23 18:53 UTC (permalink / raw)
To: Kirill Tkhai, davem, trond.myklebust, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> These pernet_operations look similar to rpcsec_gss_net_ops,
> they just create and destroy another caches. So, they also
> can be async.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
> ---
> net/sunrpc/sunrpc_syms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
> index 56f9eff74150..68287e921847 100644
> --- a/net/sunrpc/sunrpc_syms.c
> +++ b/net/sunrpc/sunrpc_syms.c
> @@ -79,6 +79,7 @@ static struct pernet_operations sunrpc_net_ops = {
> .exit = sunrpc_exit_net,
> .id = &sunrpc_net_id,
> .size = sizeof(struct sunrpc_net),
> + .async = true,
> };
>
> static int __init
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops
2018-03-13 10:49 ` [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
@ 2018-03-23 18:53 ` Anna Schumaker
0 siblings, 0 replies; 20+ messages in thread
From: Anna Schumaker @ 2018-03-23 18:53 UTC (permalink / raw)
To: Kirill Tkhai, davem, trond.myklebust, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> These pernet_operations look similar to rpcsec_gss_net_ops,
> they just create and destroy another cache. Also they create
> and destroy directory. So, they also look safe to be async.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
> ---
> fs/nfs/dns_resolve.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
> index 060c658eab66..e90bd69ab653 100644
> --- a/fs/nfs/dns_resolve.c
> +++ b/fs/nfs/dns_resolve.c
> @@ -410,6 +410,7 @@ static void nfs4_dns_net_exit(struct net *net)
> static struct pernet_operations nfs4_dns_resolver_ops = {
> .init = nfs4_dns_net_init,
> .exit = nfs4_dns_net_exit,
> + .async = true,
> };
>
> static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops
2018-03-13 10:49 ` [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
@ 2018-03-23 18:54 ` Anna Schumaker
0 siblings, 0 replies; 20+ messages in thread
From: Anna Schumaker @ 2018-03-23 18:54 UTC (permalink / raw)
To: Kirill Tkhai, davem, trond.myklebust, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> These pernet_operations create and destroy per-net pipe
> and dentry, and they seem safe to be marked as async.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
> ---
> fs/nfs/blocklayout/rpc_pipefs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
> index 9fb067a6f7e0..ef9fa111b009 100644
> --- a/fs/nfs/blocklayout/rpc_pipefs.c
> +++ b/fs/nfs/blocklayout/rpc_pipefs.c
> @@ -261,6 +261,7 @@ static void nfs4blocklayout_net_exit(struct net *net)
> static struct pernet_operations nfs4blocklayout_net_ops = {
> .init = nfs4blocklayout_net_init,
> .exit = nfs4blocklayout_net_exit,
> + .async = true,
> };
>
> int __init bl_init_pipefs(void)
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
@ 2018-03-23 18:55 ` Anna Schumaker
1 sibling, 0 replies; 20+ messages in thread
From: Anna Schumaker @ 2018-03-23 18:55 UTC (permalink / raw)
To: Kirill Tkhai, davem, trond.myklebust, bfields, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> These pernet_operations initialize and destroy sunrpc_net_id
> refered per-net items. Only used global list is cache_list,
> and accesses already serialized.
>
> sunrpc_destroy_cache_detail() check for list_empty() without
> cache_list_lock, but when it's called from unregister_pernet_subsys(),
> there can't be callers in parallel, so we won't miss list_empty()
> in this case.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
It might make sense to take these and the other NFS patches through the net tree, since the pernet_operations don't yet have the async field in my tree (and I therefore can't compile once these are applied).
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
> ---
> net/sunrpc/auth_gss/auth_gss.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
> index 9463af4b32e8..44f939cb6bc8 100644
> --- a/net/sunrpc/auth_gss/auth_gss.c
> +++ b/net/sunrpc/auth_gss/auth_gss.c
> @@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
> static struct pernet_operations rpcsec_gss_net_ops = {
> .init = rpcsec_gss_init_net,
> .exit = rpcsec_gss_exit_net,
> + .async = true,
> };
>
> /*
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-23 18:53 ` Anna Schumaker
@ 2018-03-26 9:30 ` Kirill Tkhai
2018-03-26 18:36 ` J. Bruce Fields
1 sibling, 0 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-26 9:30 UTC (permalink / raw)
To: Anna Schumaker, davem, trond.myklebust, bfields, jlayton,
dhowells, keescook, dwindsor, ishkamiel, elena.reshetova,
linux-nfs, linux-afs, netdev
On 23.03.2018 21:53, Anna Schumaker wrote:
>
>
> On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
>> These pernet_operations initialize and destroy sunrpc_net_id
>> refered per-net items. Only used global list is cache_list,
>> and accesses already serialized.
>>
>> sunrpc_destroy_cache_detail() check for list_empty() without
>> cache_list_lock, but when it's called from unregister_pernet_subsys(),
>> there can't be callers in parallel, so we won't miss list_empty()
>> in this case.
>>
>> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
>
> It might make sense to take these and the other NFS patches through the net tree, since the pernet_operations don't yet have the async field in my tree (and I therefore can't compile once these are applied).
>
> Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
Thanks a lot, Anna!
Kirill
>> ---
>> net/sunrpc/auth_gss/auth_gss.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
>> index 9463af4b32e8..44f939cb6bc8 100644
>> --- a/net/sunrpc/auth_gss/auth_gss.c
>> +++ b/net/sunrpc/auth_gss/auth_gss.c
>> @@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
>> static struct pernet_operations rpcsec_gss_net_ops = {
>> .init = rpcsec_gss_init_net,
>> .exit = rpcsec_gss_exit_net,
>> + .async = true,
>> };
>>
>> /*
>>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-23 18:53 ` Anna Schumaker
2018-03-26 9:30 ` Kirill Tkhai
@ 2018-03-26 18:36 ` J. Bruce Fields
2018-03-27 8:52 ` Kirill Tkhai
1 sibling, 1 reply; 20+ messages in thread
From: J. Bruce Fields @ 2018-03-26 18:36 UTC (permalink / raw)
To: Anna Schumaker
Cc: Kirill Tkhai, davem, trond.myklebust, jlayton, dhowells,
keescook, dwindsor, ishkamiel, elena.reshetova, linux-nfs,
linux-afs, netdev
On Fri, Mar 23, 2018 at 02:53:34PM -0400, Anna Schumaker wrote:
>
>
> On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
> > These pernet_operations initialize and destroy sunrpc_net_id refered
> > per-net items. Only used global list is cache_list, and accesses
> > already serialized.
> >
> > sunrpc_destroy_cache_detail() check for list_empty() without
> > cache_list_lock, but when it's called from
> > unregister_pernet_subsys(), there can't be callers in parallel, so
> > we won't miss list_empty() in this case.
> >
> > Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
>
> It might make sense to take these and the other NFS patches through
> the net tree, since the pernet_operations don't yet have the async
> field in my tree (and I therefore can't compile once these are
> applied).
Ditto for the nfsd patch, so, for what it's worth:
Acked-by: J. Bruce Fields <bfields@redhat.com>
for that patch.--b.
--b.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops
2018-03-26 18:36 ` J. Bruce Fields
@ 2018-03-27 8:52 ` Kirill Tkhai
0 siblings, 0 replies; 20+ messages in thread
From: Kirill Tkhai @ 2018-03-27 8:52 UTC (permalink / raw)
To: J. Bruce Fields, Anna Schumaker
Cc: davem, trond.myklebust, jlayton, dhowells, keescook, dwindsor,
ishkamiel, elena.reshetova, linux-nfs, linux-afs, netdev
On 26.03.2018 21:36, J. Bruce Fields wrote:
> On Fri, Mar 23, 2018 at 02:53:34PM -0400, Anna Schumaker wrote:
>>
>>
>> On 03/13/2018 06:49 AM, Kirill Tkhai wrote:
>>> These pernet_operations initialize and destroy sunrpc_net_id refered
>>> per-net items. Only used global list is cache_list, and accesses
>>> already serialized.
>>>
>>> sunrpc_destroy_cache_detail() check for list_empty() without
>>> cache_list_lock, but when it's called from
>>> unregister_pernet_subsys(), there can't be callers in parallel, so
>>> we won't miss list_empty() in this case.
>>>
>>> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
>>
>> It might make sense to take these and the other NFS patches through
>> the net tree, since the pernet_operations don't yet have the async
>> field in my tree (and I therefore can't compile once these are
>> applied).
>
> Ditto for the nfsd patch, so, for what it's worth:
>
> Acked-by: J. Bruce Fields <bfields@redhat.com>
>
> for that patch.--b.
Thanks, Bruce.
Kirill
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-03-27 8:52 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 10:49 [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 1/6] net: Convert rpcsec_gss_net_ops Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-26 9:30 ` Kirill Tkhai
2018-03-26 18:36 ` J. Bruce Fields
2018-03-27 8:52 ` Kirill Tkhai
2018-03-23 18:55 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 2/6] net: Convert sunrpc_net_ops Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 3/6] net: Convert nfsd_net_ops Kirill Tkhai
2018-03-13 10:49 ` [PATCH net-next nfs 4/6] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
2018-03-23 18:53 ` Anna Schumaker
2018-03-13 10:49 ` [PATCH net-next nfs 5/6] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
2018-03-23 18:54 ` Anna Schumaker
2018-03-13 10:50 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops Kirill Tkhai
2018-03-13 15:26 ` [PATCH net-next nfs 0/6] Converting pernet_operations (part #7) David Miller
2018-03-15 13:32 ` Kirill Tkhai
2018-03-15 14:24 ` J. Bruce Fields
2018-03-15 14:46 ` Kirill Tkhai
2018-03-20 16:49 ` [PATCH net-next nfs 6/6] net: Convert rxrpc_net_ops David Howells
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).