[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B146B2D.9040700@jp.fujitsu.com>
Date: Tue, 01 Dec 2009 10:02:37 +0900
From: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To: Stanislaw Gruszka <sgruszka@...hat.com>
CC: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Spencer Candland <spencer@...ehost.com>,
Américo Wang <xiyou.wangcong@...il.com>,
Oleg Nesterov <oleg@...hat.com>,
Balbir Singh <balbir@...ibm.com>
Subject: Re: [PATCH 2/2] cputime: introduce thread_group_times()
Stanislaw Gruszka wrote:
> Idea is very good IMHO.
Thank you very much!
>> #ifndef CONFIG_VIRT_CPU_ACCOUNTING
>> - cputime_t prev_utime, prev_stime;
>> + cputime_t prev_utime, prev_stime, prev_tgutime, prev_tgstime;
>> #endif
>
> I think the new values should be part of struct_signal (see below)
Good point. I'll update patch to do so.
>> /*
>> + * Must be called with siglock held.
>> + */
>> +void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
>> +{
>> + struct task_cputime cputime;
>> +
>> + __thread_group_times(p, &cputime);
>> +
>> + if (ut)
>> + *ut = cputime.utime;
>> + if (st)
>> + *st = cputime.stime;
>
> No thread_group_times() nor task_times() is called with NULL arguments, we
> can get rid of "if ({u,s}t)" checks. Perhaps thread_group_times() should
> have "struct task_cputime" argument as it is wrapper for
> thread_group_cputime();
Removing "if ({u,s}t)" is OK with me.
I expect all thread_group_times() user should have no interest in members
of struct task_cputime other than {u,s}time, so I'd like to keep the
argument as is.
Thanks,
H.Seto
--
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