From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756047AbYDFFN0 (ORCPT ); Sun, 6 Apr 2008 01:13:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752647AbYDFFNQ (ORCPT ); Sun, 6 Apr 2008 01:13:16 -0400 Received: from e28smtp02.in.ibm.com ([59.145.155.2]:42013 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbYDFFNQ (ORCPT ); Sun, 6 Apr 2008 01:13:16 -0400 Message-ID: <47F85BB1.8010503@linux.vnet.ibm.com> Date: Sun, 06 Apr 2008 10:42:17 +0530 From: Balbir Singh Reply-To: balbir@linux.vnet.ibm.com Organization: IBM User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Balaji Rao CC: Dhaval Giani , linux-kernel@vger.kernel.org, containers@lists.osdl.org, menage@google.com, a.p.zijlstra@chello.nl, balbir@in.ibm.com, Srivatsa Vaddagiri Subject: Re: [RFC][-mm] [1/2] Simple stats for cpu resource controller References: <200804052339.46632.balajirrao@gmail.com> <200804060201.52726.balajirrao@gmail.com> <20080405205914.GA25009@linux.vnet.ibm.com> <200804060251.51635.balajirrao@gmail.com> In-Reply-To: <200804060251.51635.balajirrao@gmail.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 Balaji Rao wrote: > On Sunday 06 April 2008 02:29:14 am Dhaval Giani wrote: >> On Sun, Apr 06, 2008 at 02:01:52AM +0530, Balaji Rao wrote: >>> On Sunday 06 April 2008 01:10:41 am Dhaval Giani wrote: >>>>> +}; >>>>> + >>>>> +struct cpu_cgroup_stat_cpu { >>>>> + s64 count[CPU_CGROUP_STAT_NSTATS]; >>>> u64? time does not go negative :) >>> Right. But these stats are not only going to measure time. We need the > same >>> variables for measuring other stats as well. I'm not sure if we would >>> encounter scheduler stats that would count negative. >>> >>> Balbir, what do you say ? >> I would prefer to keep the stats logically separate. So something like >> struct cpu_cgroup_stat_cpu { >> u64 time[]; >> s64 some_other_stat; >> } >> and so on. (I am not sure, is there some advantage gained by using >> structs?) Makes the code more maintainable imho. >> > This would break the generic nature of __cpu_cgroup_stat_add. Its not a nice > thing in my opinion. > I prefer keeping stats in the array as Balaji has done, it makes it easier to do batch processing on the stats. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL