Re: [RFC PATCH 1/2] New cgroup subsystem API (->initialize())

From: Li Zefan
Date: Wed Feb 25 2009 - 21:55:50 EST


Bharata B Rao wrote:
> From: Balaji Rao <balajirrao@xxxxxxxxx>
>
> 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?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/