Messages in this thread | | | Date | Thu, 26 Feb 2009 10:55:54 +0800 | From | Li Zefan <> | Subject | Re: [RFC PATCH 1/2] New cgroup subsystem API (->initialize()) |
| |
Bharata B Rao wrote: > From: Balaji Rao <balajirrao@gmail.com> > > cgroup: Add ->initialize() to cgroup_subsys structure > > Some cgroup subsystems (like cpu controller) would need subsystem > specific initialization. Such subsystems can define ->initialize() > which gets called during cgroup_init() (and not cgroup_init_early()). >
I think it's better to avoid adding this.
It would be best if we can add a hook to initialize init_task_group.stat where kmalloc is available but acount_xxx_time() hasn't been called. Otherwise, we have to check (tg->stat == NULL) in account_task_group_time(), then why not add a hook in smp_init_smp() to do initialization?
| |