mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: torvalds@osdl.org
Cc: Ashok Raj <ashok.raj@intel.com>,
	nickpiggin@yahoo.com.au, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: [CPU Hotplug PATCH] Restore Idle task's priority during CPU_DEAD notification
Date: Wed, 26 May 2004 11:46:13 +0530	[thread overview]
Message-ID: <20040526061613.GA18314@in.ibm.com> (raw)
In-Reply-To: <1085537205.2639.61.camel@bach>

Linus,
	Patch below (against 2.6.7-rc1) fixes a CPU Hotplug problem wherein
idle task's "->prio" value is not restored to MAX_PRIO during CPU_DEAD 
handling. Without this patch, once a CPU is offlined and then later onlined, it 
becomes "more or less" useless (does not run any task other than its idle task!)
Please apply.


---

 linux-2.6.7-rc1-vatsa/kernel/sched.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN kernel/sched.c~restore_idle_prio kernel/sched.c
--- linux-2.6.7-rc1/kernel/sched.c~restore_idle_prio	2004-05-25 17:04:19.000000000 +0530
+++ linux-2.6.7-rc1-vatsa/kernel/sched.c	2004-05-25 17:04:34.000000000 +0530
@@ -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);
 

_
On Wed, May 26, 2004 at 12:06:46PM +1000, Rusty Russell wrote:
> On Wed, 2004-05-26 at 02:35, Raj, Ashok wrote:
> > Thanks Vatsa...
> > 
> > It seems to work right now....
> 
> It seems obviously correct and harmless to me.  As it also fixes a
> problem, I'd say this should go to Linus & Andrew ASAP.
> 
> Thanks!
> Rusty.
> -- 
> Anyone who quotes me in their signature is an idiot -- Rusty Russell
> 

-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017

       reply	other threads:[~2004-05-26  6:15 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   ` Srivatsa Vaddagiri [this message]
2004-05-26 11:27     ` Ingo Molnar
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=20040526061613.GA18314@in.ibm.com \
    --to=vatsa@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=ashok.raj@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --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®