public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Irwin <bill.irwin@oracle.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Bill Irwin <bill.irwin@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Dumazet <dada1@cosmosbay.com>,
	linux-kernel@vger.kernel.org, wli@holomorphy.com
Subject: Re: per-thread rusage
Date: Tue, 1 May 2007 15:29:22 -0700	[thread overview]
Message-ID: <20070501222922.GS26598@holomorphy.com> (raw)
In-Reply-To: <a36005b50705011510k4cd7873dr3fb8206c0f107169@mail.gmail.com>

On 5/1/07, Bill Irwin <bill.irwin@oracle.com> wrote:
>> 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.

On Tue, May 01, 2007 at 03:10:40PM -0700, Ulrich Drepper wrote:
> I think beside RUSAGE_THREAD you'll find no precedence.  It's all new,
> you have to tread the path.  The RUSAGE_THREAD interface is not
> sufficient, actually.  First, if a thread terminates we don't have to
> keep it stick around until a wait call can be issued.  We terminate
> threads right away and the synchronization with waiters is done
> independently.  Seond, the thread ID (aka kernel process ID) is not
> exported nor should it.  This is easy to solve, though: introduce a
> pthread_getrusage interface.

Sounds reasonable enough. I can follow directions. I'd not be concerned
if you happen to write it yourself, though I'll get around to it if you
don't.


On Tue, May 01, 2007 at 03:10:40PM -0700, Ulrich Drepper wrote:
> To solve the first problem the terminating thread should write out the
> data before it is gone.  Automatically.  After registration.  So, you
> could have a syscall to register a structure in the user address space
> which is filled with the data.  If the data structure is the same as
> rusage you're done.  If you use a different data structure yo need to
> introduce a getrusage-equivalent syscall.
> With this infrastructure in place we could have
>  int pthread_getrusage(pthread_t, struct ruage *);
> and
>  int pthread_join4(pthread_t, void ** valueptr, struct rusage *);
> pthread_join4 is a joke, we need a better name, but you get the drift.

This addresses further missing pieces in the API beyond what the
getrusage() flag did. I'll follow this precisely for any patch posted
for merging, and Cc: you on such.


-- wli

  parent reply	other threads:[~2007-05-01 22:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04 17:29 per-thread rusage William Lee Irwin III
2007-04-04 17:48 ` Eric Dumazet
2007-04-04 18:10   ` William Lee Irwin III
2007-04-09 23:53     ` Andrew Morton
2007-04-10  0:42       ` William Lee Irwin III
2007-04-10  0:53         ` Andrew Morton
2007-04-10  1:12           ` William Lee Irwin III
2007-04-10  1:18             ` Andrew Morton
2007-05-01 17:29         ` Bill Irwin
2007-05-01 18:39           ` Ulrich Drepper
2007-05-01 20:24             ` Bill Irwin
2007-05-01 22:10               ` Ulrich Drepper
2007-05-01 22:27                 ` Theodore Tso
2007-05-01 22:34                   ` Bill Irwin
2007-05-01 23:04                     ` Alan Cox
2007-05-01 23:17                       ` Bill Irwin
2007-05-02  5:05                       ` Balbir Singh
2007-05-02  0:17                   ` Ulrich Drepper
2007-05-02  4:31                     ` Theodore Tso
2007-05-02  4:57                       ` Ulrich Drepper
2007-05-01 22:29                 ` Bill Irwin [this message]
2007-04-04 22:36 ` Valdis.Kletnieks
2007-04-05  4:09   ` William Lee Irwin III
  -- strict thread matches above, loose matches on Subject: below --
2007-04-10 20:10 Oleg Nesterov

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=20070501222922.GS26598@holomorphy.com \
    --to=bill.irwin@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dada1@cosmosbay.com \
    --cc=drepper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox