linux.conf.au, January 2003 PROGRAMMING: kernel/sched.c #define CAN_MIGRATE_TASK(p,rq,this_cpu) \ ((jiffies - (p)->sleep_timestamp > cache_decay_ticks) && \ !task_running(rq, p) && \ ((p)->cpus_allowed & (1UL << (this_cpu)))) curr = curr->prev; if (!CAN_MIGRATE_TASK(tmp, busiest, this_cpu)) { if (curr != head) goto skip_queue; idx++; goto skip_bitmap; } pull_task(busiest, array, tmp, this_rq, this_cpu); if (!idle && --imbalance) { if (curr != head) goto skip_queue; idx++; goto skip_bitmap; } out_unlock: spin_unlock(&busiest->lock); out: ; }