From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [patch 0/4] taskstats: Improve cumulative time accounting From: Peter Zijlstra In-Reply-To: <20101119201108.269346583@linux.vnet.ibm.com> References: <20101119201108.269346583@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Fri, 19 Nov 2010 21:19:15 +0100 Message-ID: <1290197955.2109.1617.camel@laptop> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: Michael Holzheu Cc: Oleg Nesterov , Shailabh Nagar , Andrew Morton , John stultz , Thomas Gleixner , Balbir Singh , Martin Schwidefsky , Heiko Carstens , Roland McGrath , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org List-ID: On Fri, 2010-11-19 at 21:11 +0100, Michael Holzheu wrote: > Due to POSIX POSIX.1-2001, the CPU time of processes is not accounted > to the cumulative time of the parents, if the parents ignore SIGCHLD > or have set SA_NOCLDWAIT. This behaviour has the major drawback that > it is not possible to calculate all consumed CPU time of a system by > looking at the current tasks. CPU time can be lost. > > To solve this problem, this patch set duplicates the cumulative accounting > data in the signal_struct. In the second set (cdata_acct) the complete > cumulative resource counters are stored. The new cumulative CPU time (utime > and stime) is then exported via the taskstats interface. Maybe this has been treated earlier in the threads and I missed it, but the obvious solution doesn't get mentioned: What would break if we violate this silly POSIX rule and account time of childs regardless of SIGCHLD/SA_NOCLDWAIT?