lkml.org 
[lkml]   [2003]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectsmall migration thread fix
Date
Hi,

the small patch fixes a potential problem in the migration thread for
the case that the first CPU in the cpus_allowed mask of a process is
offline. Please consider applying it to your trees.

Thanks!
Regards,
Erich

diff -urNp linux-2.5.55/kernel/sched.c linux-2.5.55-fix/kernel/sched.c
--- linux-2.5.55/kernel/sched.c 2003-01-09 05:04:22.000000000 +0100
+++ linux-2.5.55-fix/kernel/sched.c 2003-01-10 13:37:40.000000000 +0100
@@ -2108,7 +2108,7 @@ static int migration_thread(void * data)
spin_unlock_irqrestore(&rq->lock, flags);

p = req->task;
- cpu_dest = __ffs(p->cpus_allowed);
+ cpu_dest = __ffs(p->cpus_allowed & cpu_online_map);
rq_dest = cpu_rq(cpu_dest);
repeat:
cpu_src = task_cpu(p);
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.063 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site