Re: [patch v2 4/4] taskstats: Export "cdata_wait" CPU times with taskstats

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Wednesday, December 1, 2010 - 11:51 am

On 11/29, Michael Holzheu wrote:

OK, I guess you mean that we want to read utime/stime "atomically",
and thus we need ->siglock to prevent the race with __exit_signal().


perhaps we need a small comment to explain ->siglock...

But in fact I don't really understand this anyway. This is called
before we reparent our children. This means that ac_cutime/ac_cstime
can be changed after that (multithreading, or full_cdata_enabled).

Say, taskstats_exit()->fill_stats()->bacct_add_tsk(). Every thread
does this, including the group_leader. But, it is possible that
group_leader exits first, before other threads. IOW, what
stats->ac_cXtime actually mean?


Nevermind, the whole series looks correct to me. Although I still
can't find the time to read it ;) But at first glance this version
addresses all concerns we discussed before.

Oleg.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch v2 0/4] taskstats: Improve cumulative time accounting, Michael Holzheu, (Mon Nov 29, 9:42 am)
[patch v2 1/4] taskstats: Introduce "struct cdata", Michael Holzheu, (Mon Nov 29, 9:42 am)
[patch v2 3/4] taskstats: Introduce kernel.full_cdata sysctl, Michael Holzheu, (Mon Nov 29, 9:42 am)
Re: [patch v2 4/4] taskstats: Export "cdata_wait" CPU time ..., Oleg Nesterov, (Wed Dec 1, 11:51 am)