From: Ingo Molnar <mingo@elte.hu>
To: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: torvalds@osdl.org, Ashok Raj <ashok.raj@intel.com>,
nickpiggin@yahoo.com.au, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [CPU Hotplug PATCH] Restore Idle task's priority during CPU_DEAD notification
Date: Wed, 26 May 2004 13:27:26 +0200 [thread overview]
Message-ID: <20040526112726.GA8499@elte.hu> (raw)
In-Reply-To: <20040526061613.GA18314@in.ibm.com>
* Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
> @@ -3569,6 +3569,7 @@ static int migration_call(struct notifie
> rq = task_rq_lock(rq->idle, &flags);
> deactivate_task(rq->idle, rq);
> __setscheduler(rq->idle, SCHED_NORMAL, MAX_PRIO);
> + rq->idle->prio = MAX_PRIO;
> task_rq_unlock(rq, &flags);
> BUG_ON(rq->nr_running != 0);
Looks good. A small nit: while your patch creates a perfectly correct
idle thread too, i'd prefer the modified variant below. The
__setscheduler() call is (technically) incorrect because in the
SCHED_NORMAL case the prio should be zero. So it's a bit cleaner to set
up the static priority to MAX_PRIO and then revert the policy to
SCHED_NORMAL via __setscheduler(). Ok?
Ingo
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
--- linux/kernel/sched.c.orig
+++ linux/kernel/sched.c
@@ -3566,7 +3566,8 @@ static int migration_call(struct notifie
/* Idle task back to normal (off runqueue, low prio) */
rq = task_rq_lock(rq->idle, &flags);
deactivate_task(rq->idle, rq);
- __setscheduler(rq->idle, SCHED_NORMAL, MAX_PRIO);
+ rq->idle->static_prio = MAX_PRIO;
+ __setscheduler(rq->idle, SCHED_NORMAL, 0);
task_rq_unlock(rq, &flags);
BUG_ON(rq->nr_running != 0);
next prev parent reply other threads:[~2004-05-26 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <A28EFEDC5416054BA1026D892753E9AF059A50EC@orsmsx404.amr.corp.intel.com>
[not found] ` <1085537205.2639.61.camel@bach>
2004-05-26 6:16 ` [CPU Hotplug PATCH] Restore Idle task's priority during CPU_DEAD notification Srivatsa Vaddagiri
2004-05-26 11:27 ` Ingo Molnar [this message]
2004-05-26 11:51 ` Srivatsa Vaddagiri
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=20040526112726.GA8499@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=ashok.raj@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@osdl.org \
--cc=vatsa@in.ibm.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 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.