From: Peter Zijlstra <peterz@infradead.org>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] make setpriority POSIX compliant; introduce PRIO_THREAD extension
Date: Mon, 01 Sep 2008 17:19:35 +0200 [thread overview]
Message-ID: <1220282375.8426.69.camel@twins> (raw)
In-Reply-To: <1220281737.8426.67.camel@twins>
On Mon, 2008-09-01 at 17:08 +0200, Peter Zijlstra wrote:
> On Mon, 2008-09-01 at 16:42 +0200, Denys Vlasenko wrote:
> > On Mon, 2008-09-01 at 16:12 +0200, Denys Vlasenko wrote:
> > > Patch is run tested. I will post test program etc as a reply.
> >
> > Looks like Evolution word-wrapped the patch. Let me try again.
>
> Patch looks simple enough, although a few comments below.
> Also, I guess the glibc people (Ulrich added to CC) might have an
> opinion.
>
> > Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> > --
> > + case PRIO_PROCESS:
> > + if (who)
> > + pid = find_vpid(who);
> > + else {
> > + pid = task_pid(current);
> > + who = current->pid;
> > + }
> > + do_each_pid_thread(pid, PIDTYPE_PID, p) {
> > + if (who == p->pid || who == p->tgid) {
> > + error = set_one_prio(p, niceval, error);
> > + }
> > + } while_each_pid_thread(pid, PIDTYPE_PID, p);
>
> I worry about destroying the return value here, support one thread
> fails, but the next succeeds, should we still report failure?
Ok - got fooled by this funny set_one_prio() function. It passes the old
error value and maintains it if no new error occurs (except for -ESRCH,
but I guess people know wth they're doing).
So I'll retract my concern.
next prev parent reply other threads:[~2008-09-01 15:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 14:12 [PATCH] make setpriority POSIX compliant; introduce PRIO_THREAD extension Denys Vlasenko
2008-09-01 14:17 ` Denys Vlasenko
2008-09-01 14:42 ` Denys Vlasenko
2008-09-01 15:08 ` Peter Zijlstra
2008-09-01 15:19 ` Peter Zijlstra [this message]
2008-09-01 15:20 ` Denys Vlasenko
2008-09-01 17:58 ` Ulrich Drepper
2008-09-09 15:45 ` Michael Kerrisk
2008-09-09 16:42 ` Chris Friesen
2008-09-09 18:45 ` Michael Kerrisk
2008-09-10 9:28 ` Denys Vlasenko
2008-09-10 11:57 ` Michael Kerrisk
2008-09-10 12:08 ` Christoph Hellwig
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=1220282375.8426.69.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.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 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.