Commit 9e3a8956 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] CPU scheduler CAN_MIGRATE fix

From: Andrew Theurer <habanero@us.ibm.com>

This change:
http://linux.bkbits.net:8080/linux-2.5/diffs/kernel/sched.c@1.202

does not seem to make sense:

#define CAN_MIGRATE_TASK(p,rq,this_cpu)					\
	((!idle || (jiffies - (p)->last_run > cache_decay_ticks)) &&    \
		!task_running(rq, p) &&					\
			cpu_isset(this_cpu, (p)->cpus_allowed))

It should be just the opposite; an idle cpu should be able to have a more
aggressive steal, and a busy cpu should not.
parent dd3f51c2
...@@ -1064,7 +1064,7 @@ static void load_balance(runqueue_t *this_rq, int idle, cpumask_t cpumask) ...@@ -1064,7 +1064,7 @@ static void load_balance(runqueue_t *this_rq, int idle, cpumask_t cpumask)
*/ */
#define CAN_MIGRATE_TASK(p,rq,this_cpu) \ #define CAN_MIGRATE_TASK(p,rq,this_cpu) \
((!idle || (jiffies - (p)->last_run > cache_decay_ticks)) && \ ((idle || (jiffies - (p)->last_run > cache_decay_ticks)) && \
!task_running(rq, p) && \ !task_running(rq, p) && \
cpu_isset(this_cpu, (p)->cpus_allowed)) cpu_isset(this_cpu, (p)->cpus_allowed))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment