From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757995AbZBZCzu (ORCPT ); Wed, 25 Feb 2009 21:55:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751411AbZBZCzm (ORCPT ); Wed, 25 Feb 2009 21:55:42 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:62417 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751274AbZBZCzl (ORCPT ); Wed, 25 Feb 2009 21:55:41 -0500 Message-ID: <49A604BA.9090407@cn.fujitsu.com> Date: Thu, 26 Feb 2009 10:55:54 +0800 From: Li Zefan User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: bharata@linux.vnet.ibm.com CC: linux-kernel@vger.kernel.org, Balaji Rao , Dhaval Giani , Balbir Singh , Paul Menage , Andrew Morton , Ingo Molnar , Peter Zijlstra Subject: Re: [RFC PATCH 1/2] New cgroup subsystem API (->initialize()) References: <20090225105730.GA4008@in.ibm.com> <20090225105831.GB4008@in.ibm.com> In-Reply-To: <20090225105831.GB4008@in.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bharata B Rao wrote: > From: Balaji Rao > > 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?