From c5831a3f9af11228dbdaabaf01f69d37e55684ef Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 9 Apr 2014 15:07:54 +0200 Subject: score: Add clustered/partitioned scheduling Clustered/partitioned scheduling helps to control the worst-case latencies in the system. The goal is to reduce the amount of shared state in the system and thus prevention of lock contention. Modern multi-processor systems tend to have several layers of data and instruction caches. With clustered/partitioned scheduling it is possible to honour the cache topology of a system and thus avoid expensive cache synchronization traffic. We have clustered scheduling in case the set of processors of a system is partitioned into non-empty pairwise-disjoint subsets. These subsets are called clusters. Clusters with a cardinality of one are partitions. Each cluster is owned by exactly one scheduler instance. --- cpukit/score/src/threadinitialize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 153c1d0b13..f8e0e7d440 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -31,6 +31,7 @@ bool _Thread_Initialize( Objects_Information *information, Thread_Control *the_thread, + const Scheduler_Control *scheduler, void *stack_area, size_t stack_size, bool is_fp, @@ -50,7 +51,6 @@ bool _Thread_Initialize( bool extension_status; size_t i; bool scheduler_allocated = false; - const Scheduler_Control *scheduler; /* * Do not use _TLS_Size here since this will lead GCC to assume that this @@ -188,6 +188,7 @@ bool _Thread_Initialize( the_thread->is_scheduled = false; the_thread->is_in_the_air = false; the_thread->is_executing = false; + the_thread->scheduler = scheduler; #endif /* Initialize the CPU for the non-SMP schedulers */ @@ -199,7 +200,6 @@ bool _Thread_Initialize( the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; - scheduler = _Scheduler_Get( _Thread_Get_executing() ); scheduler_allocated = _Scheduler_Allocate( scheduler, the_thread ); if ( !scheduler_allocated ) { goto failed; -- cgit v1.2.3