lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200802271711.55530.sripathik@in.ibm.com>
Date:	Wed, 27 Feb 2008 17:11:55 +0530
From:	Sripathi Kodi <sripathik@...ibm.com>
To:	Michael Kerrisk <mtk.manpages@...glemail.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Roland McGrath <roland@...hat.com>,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	vinay@...ux.vnet.ibm.com, drepper@...hat.com
Subject: Re: [PATCH] RUSAGE_THREAD

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.

Thanks,
Sripathi.

PS: I fixed spelling error in Ulrich's mail id in the CC list.

Signed-off-by: Sripathi Kodi <sripathik@...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),
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ