From: "Ulrich Drepper" <drepper@gmail.com>
To: "Claudio Scordino" <cloud.of.andor@gmail.com>
Cc: "Andrew Morton" <akpm@osdl.org>,
linux-kernel@vger.kernel.org, luto@myrealbox.com,
alan@lxorguk.ukuu.org.uk, torvalds@osdl.org,
kernel-janitors@lists.osdl.org, bert.hubert@netherlabs.nl
Subject: Re: [PATCH] Extending getrusage
Date: Fri, 21 Apr 2006 07:32:43 -0700 [thread overview]
Message-ID: <a36005b50604210732h69f4408ey99b7895de8dbd902@mail.gmail.com> (raw)
In-Reply-To: <d0191dad0604210305n7ce4b59aja5d215d92f95e1f4@mail.gmail.com>
On 4/21/06, Claudio Scordino <cloud.of.andor@gmail.com> wrote:
> Recently, while writing some code at user level, I needed a fast way
> to have such information about another process.
That's not very specific. And one program isn't really a compelling
reason. You should specify with some level of detail why you need
that information and why you cannot depend on collaboration of the
process you try to get the information for.
> - return -EINVAL;
> - return getrusage(current, who, ru);
> + struct rusage r;
> + struct task_struct *tsk = current;
> + read_lock(&tasklist_lock);
You are introducing scalability problems where there were none before.
Even if there is some justification revealed in the end IMO the patch
shouldn't be accepted in this form. You should not slow down the
normal case of operation. If the current thread is observed the lock
isn't needed.
next prev parent reply other threads:[~2006-04-21 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-20 15:21 Claudio Scordino
2006-04-20 23:21 ` Andrew Morton
2006-04-21 7:41 ` bert hubert
2006-04-21 10:05 ` Claudio Scordino
2006-04-21 14:32 ` Ulrich Drepper [this message]
2006-04-22 10:25 ` Claudio Scordino
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=a36005b50604210732h69f4408ey99b7895de8dbd902@mail.gmail.com \
--to=drepper@gmail.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bert.hubert@netherlabs.nl \
--cc=cloud.of.andor@gmail.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@myrealbox.com \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®