OpenVZ Forum


Home » Mailing lists » Devel » [PATCH -mm 2/3] cgroup: simplify init_subsys()
Re: [PATCH -mm 2/3] cgroup: simplify init_subsys() [message #28953 is a reply to message #28931] Wed, 02 April 2008 10:26 Go to previous messageGo to previous message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On Tue, Apr 1, 2008 at 7:16 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>  -
>  -       /* If this subsystem requested that it be notified with fork
>  -        * events, we should send it one now for every process in the
>  -        * system */
>  -       if (ss->fork) {
>  -               struct task_struct *g, *p;
>  -
>  -               read_lock(&tasklist_lock);
>  -               do_each_thread(g, p) {
>  -                       ss->fork(ss, p);
>  -               } while_each_thread(g, p);
>  -               read_unlock(&tasklist_lock);
>  -       }

Should we maybe call ss->fork(ss, &init_task) ? Or just document that
ss->fork() explicitly doesn't get called for init.

Maybe also add some BUG()s to confirm that no other tasks have in fact
been forked by this point?

Paul
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Previous Topic: [RFC][PATCH 0/4] Object creation with a pre-defined id (v2)
Next Topic: [PATCH -mm 0/3] cgroup: use hash table for css_set
Goto Forum:
  


Current Time: Fri Aug 29 07:25:46 GMT 2025

Total time taken to generate the page: 0.10963 seconds