From: Michael Kerrisk <mtk.manpages@googlemail.com>
To: Sripathi Kodi <sripathik@in.ibm.com>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
vinay@linux.vnet.ibm.com, drepper@redhat.com
Subject: Re: [PATCH] RUSAGE_THREAD
Date: Mon, 10 Mar 2008 16:33:08 +0100 [thread overview]
Message-ID: <47D554B4.6090407@gmail.com> (raw)
In-Reply-To: <200802271711.55530.sripathik@in.ibm.com>
Sripathi Kodi wrote:
> On Friday 22 February 2008 23:13, Michael Kerrisk wrote:
>> Sripathi Kodi wrote:
>>> Hi Andrew,
>>>
>>> This adds the RUSAGE_THREAD option for the getrusage system call.
>>> This is essentially Roland's patch from
>>> http://lkml.org/lkml/2008/1/18/589, but the line about RUSAGE_LWP
>>> line has been removed, as suggested by Ulrich and Christoph.
>>>
>>> Thanks,
>>> Sripathi.
>>>
>>> This adds the RUSAGE_THREAD option for the getrusage system call.
>> Sripathi,
>>
>> Could you write some small piece of text for the getrusage.2 man page
>> that describes the intended behavior of RUSAGE_THREAD?
>
> Michael,
>
> Please take a look at the following patch to getrusage.2. This is the first
> time I have edited a manpage, so I hope I have done it correctly!
>
> Also, the RUSAGE_THREAD patch is currently in -mm, but not in mainline
> yet. Hoping that it will make it, I have put a line in the patch that it is
> supported from 2.6.25 onwards.
Sripathi,
Thanks for the patch -- looks reasonable to me.
I see that RUSAGE_THREAD didin't make the cut for 2.6.25. If you remember,
could you ping me when it does hit mainline.
Cheers,
Michael
> PS: I fixed spelling error in Ulrich's mail id in the CC list.
>
> Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
>
> --- getrusage.2.org 2008-02-27 17:00:57.000000000 +0530
> +++ getrusage.2 2008-02-27 17:01:28.000000000 +0530
> @@ -44,12 +44,22 @@ getrusage \- get resource usage
> .PP
> .BR getrusage ()
> returns current resource usages, for a \fIwho\fP
> -of either
> +of
> +.B RUSAGE_THREAD,
> .B RUSAGE_SELF
> or
> .BR RUSAGE_CHILDREN .
> -The former asks for resources used by the current process,
> -the latter for resources used by those of its children
> +.PP
> +.B RUSAGE_THREAD
> +asks for resources used by the calling thread.
> +.PP
> +.B RUSAGE_SELF
> +asks for resources used by the current process,
> +which is the sum of resources used by all threads
> +in the process.
> +.PP
> +.B RUSAGE_CHILDREN
> +asks for resources used by those of its children
> that have terminated and have been waited for.
> .PP
> .in +0.5i
> @@ -130,6 +140,9 @@ Since Linux 2.6,
> and
> .I ru_nivcsw
> are also maintained.
> +.PP
> +.B RUSAGE_THREAD
> +is supported only in Linux kernel versions 2.6.25 and above.
> .SH "SEE ALSO"
> .BR getrlimit (2),
> .BR times (2),
>
--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
next prev parent reply other threads:[~2008-03-10 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 5:55 [PATCH] RUSAGE_THREAD Sripathi Kodi
2008-02-22 17:43 ` Michael Kerrisk
2008-02-27 11:41 ` Sripathi Kodi
2008-03-10 15:33 ` Michael Kerrisk [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-17 8:27 [RFC] Per-thread getrusage Vinay Sridhar
2008-01-19 1:14 ` [PATCH] RUSAGE_THREAD Roland McGrath
2008-01-19 6:21 ` Ulrich Drepper
2008-01-21 9:55 ` Christoph Hellwig
2008-01-26 7:23 ` Michael Kerrisk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47D554B4.6090407@gmail.com \
--to=mtk.manpages@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=sripathik@in.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=vinay@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.