]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] signal latency improvement
authorIngo Molnar <mingo@elte.hu>
Mon, 26 May 2003 03:08:12 +0000 (20:08 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 26 May 2003 03:08:12 +0000 (20:08 -0700)
This further optimizes the 'kick wakeup' scheduler feature:

 - do not kick any CPU on UP

 - no need to mark the target task for reschedule - it's enough to send an
   interrupt to that CPU, that will initiate a signal processing pass.

kernel/sched.c

index f9dc0a968a61493d8a7c32edcc2840cc260e7cd9..354936bdc222e1a4a516995b4772f4cac02092c6 100644 (file)
@@ -500,9 +500,12 @@ repeat_lock_task:
                                        resched_task(rq->curr);
                        }
                        success = 1;
-               } else
-                       if (unlikely(kick) && task_running(rq, p))
-                               resched_task(rq->curr);
+               }
+#if CONFIG_SMP
+               else
+                       if (unlikely(kick) && task_running(rq, p) && (p->thread_info->cpu != smp_processor_id()))
+                               smp_send_reschedule(p->thread_info->cpu);
+#endif
                p->state = TASK_RUNNING;
        }
        task_rq_unlock(rq, &flags);