[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090325044039.GB3276@in.ibm.com>
Date: Wed, 25 Mar 2009 10:10:39 +0530
From: Bharata B Rao <bharata@...ux.vnet.ibm.com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org, Balaji Rao <balajirrao@...il.com>,
Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Paul Menage <menage@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH -tip] cpuacct: per-cgroup utime/stime statistics - v5
On Wed, Mar 25, 2009 at 08:48:03AM +0800, Li Zefan wrote:
> > cpuacct: Add stime and utime statistics
> >
> > Add per-cgroup cpuacct controller statistics like the system and user
> > time consumed by the group of tasks.
>
> Reviewed-by: Li Zefan <lizf@...fujitsu.com>
Thanks.
>
> except a bug below.
>
> > + for (i = 0; i < CPUACCT_STAT_NSTATS; i++)
> > + if (percpu_counter_init(&ca->cpustat[i], 0))
> > + goto out_free_counters;
> >
> > if (cgrp->parent)
> > ca->parent = cgroup_ca(cgrp->parent);
> >
> > return &ca->css;
> > +
> > +out_free_counters:
> > + i--;
> > + while (i-- >= 0)
> > + percpu_counter_destroy(&ca->cpustat[i]);
>
> replace "i--; while (i-- >=0)" to "while (--i >=0)", otherwise
> you'll be accessing ca->cpustat[-1].
Sorry about this. Posted the fixed version.
Regards,
Bharata.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists