smp_send_reschedule vs. smp_migrate_task

From: Paul Mackerras (paulus@samba.org)
Date: Wed Feb 13 2002 - 02:37:14 EST


I am looking at the updates for PPC that are needed because of the
changes to the scheduler in 2.5.x. I need to implement
smp_migrate_task(), but I do not have another IPI easily available;
the Open PIC interrupt controller used in a lot of SMP PPC machines
supports 4 IPIs in hardware and we are already using all of them.

Thus I was thinking of using the same IPI for smp_migrate_task and
smp_send_reschedule. The idea is that smp_send_reschedule(cpu) will
be effectively smp_migrate_task(cpu, NULL), and the code that receives
that IPI will check for the NULL and do set_need_resched() instead of
sched_task_migrated().

At present the i386 version of smp_migrate_task uses a single global
spinlock, thus only one task can be migrating at a time. If I make
smp_send_reschedule and smp_migrate_task both use the same global
spinlock, is that likely to cause deadlocks or unacceptable
contention? In fact it would not be hard to have a spinlock per cpu.
Would we ever be likely to do smp_migrate_task and set_need_resched
for the same target cpu at the same time?

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:52 EST