lkml.org 
[lkml]   [2009]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] cpuacct: add a branch prediction
    From
    On Thu, Feb 26, 2009 at 2:10 PM, KAMEZAWA Hiroyuki
    <kamezawa.hiroyu@jp.fujitsu.com> wrote:
    > On Thu, 26 Feb 2009 16:35:33 +0800
    > Li Zefan <lizf@cn.fujitsu.com> wrote:
    >
    >> ca is not checked before hierarchy support, and it's a side-effect.
    >>
    >> Before cpuacct is initialized, css == task->cgroups->subsys[cpuacct_subsys] == NULL,
    >> but ca = task_ca(tsk) is not necessarily NULL, unless struct cgroup_subsys_state is the
    >> first member of struct cpuacct.
    >>
    >> And the above code actually should be:
    >>
    >> do {
    >>       ...
    >> } while (ca->parent);
    >>
    > I'll send no more objections to this patch itself.
    >
    > But IMHO, this loop is tooo bad, I think. The hierarchy information should be gathered by
    > read-side and the total code should be

    How do you take care of accounting when a group gets deleted ?.
    Wouldn't you loose some information due to deleted groups if you want
    to accumulate hierarchical stats only during read ?

    Regards,
    Bharata.
    --
    http://bharata.sulekha.com/blog/posts.htm
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-02-26 11:13    [W:2.689 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site