lkml.org 
[lkml]   [2002]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectsmp_send_reschedule vs. smp_migrate_task
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.032 / U:3.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site