Re: per-thread rusage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/1/07, Bill Irwin <[email protected]> wrote:
>> A sort of note for me to refer back to when I get the rest of the way
>> here. AIX does this with getrusage(RUSAGE_THREAD,...), Solaris with
>> getrusage(RUSAGE_LWP,...),

On Tue, May 01, 2007 at 11:39:46AM -0700, Ulrich Drepper wrote:
> RUSAGE_LWP is a remnant of Solaris' M-on-N thread library days.  No
> reason to got there.  Use RUSAGE_THREAD.  Even though the kernel calls
> the process and process group, at userland these are threads and
> processes.

Well, this is just the part where I'm surveying how other OS's report
getrusage-like info on a per-thread basis. As far as this is concerned,
RUSAGE_LWP is just Solaris nomenclature for it. The implementation
details (e.g. M:N thread disambiguation) are not so important for this.
What I think it means is "Solaris and AIX pass a nonstandard flag to
getrusage() for the same purpose."

And actually, you're a good person to ask about all this. How do other
kernels/OS's report per-thread analogues of rusage information? Googling
for getrusage() manpages is probably not going to find ones that, say,
force userspace to fish it out of /proc/ analogues and so on. The basic
idea is to try to do it similarly to how everyone else does so userspace
(I suppose this would include glibc) don't have to bend over backward to
accommodate it. Or basically to do what everyone expects.


- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux