netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netclassid_cgroup: explicitly init the early_init field
@ 2014-04-22  5:31 Jianyu Zhan
  2014-04-22  6:28 ` Li Zefan
  2014-04-22 11:02 ` Neil Horman
  0 siblings, 2 replies; 3+ messages in thread
From: Jianyu Zhan @ 2014-04-22  5:31 UTC (permalink / raw)
  To: davem, lizefan, tj, nhorman, aris, dborkman, nasa4836
  Cc: netdev, linux-kernel

For a cgroup subsystem who should init early, then it should carefully
take care of the implementation of css_alloc, because it will be called
before mm_init() setup the world.

Luckily we don't, and we better explicitly assign the early_init field
to 0, for document reason.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
---
 net/core/netclassid_cgroup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
index 22931e1..1b07dca 100644
--- a/net/core/netclassid_cgroup.c
+++ b/net/core/netclassid_cgroup.c
@@ -108,4 +108,5 @@ struct cgroup_subsys net_cls_cgrp_subsys = {
 	.css_free		= cgrp_css_free,
 	.attach			= cgrp_attach,
 	.base_cftypes		= ss_files,
+	.early_init		= 0,
 };
-- 
2.0.0-rc0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] netclassid_cgroup: explicitly init the early_init field
  2014-04-22  5:31 [PATCH] netclassid_cgroup: explicitly init the early_init field Jianyu Zhan
@ 2014-04-22  6:28 ` Li Zefan
  2014-04-22 11:02 ` Neil Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Li Zefan @ 2014-04-22  6:28 UTC (permalink / raw)
  To: Jianyu Zhan; +Cc: davem, tj, nhorman, aris, dborkman, netdev, linux-kernel

On 2014/4/22 13:31, Jianyu Zhan wrote:
> For a cgroup subsystem who should init early, then it should carefully
> take care of the implementation of css_alloc, because it will be called
> before mm_init() setup the world.
> 
> Luckily we don't, and we better explicitly assign the early_init field
> to 0, for document reason.
> 

The initialization is redundant, and your reason is not reasonable.

> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>

nack

> ---
>  net/core/netclassid_cgroup.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
> index 22931e1..1b07dca 100644
> --- a/net/core/netclassid_cgroup.c
> +++ b/net/core/netclassid_cgroup.c
> @@ -108,4 +108,5 @@ struct cgroup_subsys net_cls_cgrp_subsys = {
>  	.css_free		= cgrp_css_free,
>  	.attach			= cgrp_attach,
>  	.base_cftypes		= ss_files,
> +	.early_init		= 0,
>  };
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netclassid_cgroup: explicitly init the early_init field
  2014-04-22  5:31 [PATCH] netclassid_cgroup: explicitly init the early_init field Jianyu Zhan
  2014-04-22  6:28 ` Li Zefan
@ 2014-04-22 11:02 ` Neil Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Horman @ 2014-04-22 11:02 UTC (permalink / raw)
  To: Jianyu Zhan; +Cc: davem, lizefan, tj, aris, dborkman, netdev, linux-kernel

On Tue, Apr 22, 2014 at 01:31:16PM +0800, Jianyu Zhan wrote:
> For a cgroup subsystem who should init early, then it should carefully
> take care of the implementation of css_alloc, because it will be called
> before mm_init() setup the world.
> 
> Luckily we don't, and we better explicitly assign the early_init field
> to 0, for document reason.
> 
> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
> ---
>  net/core/netclassid_cgroup.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
> index 22931e1..1b07dca 100644
> --- a/net/core/netclassid_cgroup.c
> +++ b/net/core/netclassid_cgroup.c
> @@ -108,4 +108,5 @@ struct cgroup_subsys net_cls_cgrp_subsys = {
>  	.css_free		= cgrp_css_free,
>  	.attach			= cgrp_attach,
>  	.base_cftypes		= ss_files,
> +	.early_init		= 0,
>  };
> -- 
> 2.0.0-rc0
> 
> 
Agreed, this doesn't make sense, early_init is default assigned to zero.  What
problem are you trying to solve?
Neil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-22 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22  5:31 [PATCH] netclassid_cgroup: explicitly init the early_init field Jianyu Zhan
2014-04-22  6:28 ` Li Zefan
2014-04-22 11:02 ` Neil Horman

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).