summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-09 15:07:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 10:41:44 +0200
commitc5831a3f9af11228dbdaabaf01f69d37e55684ef (patch)
treee9ddedd942f3f31d239820dfc4dbcef4cde0b09a /cpukit/rtems
parentrtems: Add task get/set scheduler (diff)
downloadrtems-c5831a3f9af11228dbdaabaf01f69d37e55684ef.tar.bz2
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.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/clocktick.c2
-rw-r--r--cpukit/rtems/src/taskcreate.c2
-rw-r--r--cpukit/rtems/src/tasksetaffinity.c1
3 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c
index 1abaa7f20e..a026b44494 100644
--- a/cpukit/rtems/src/clocktick.c
+++ b/cpukit/rtems/src/clocktick.c
@@ -34,7 +34,7 @@ rtems_status_code rtems_clock_tick( void )
_Watchdog_Tickle_ticks();
- _Scheduler_Tick( _Scheduler_Get( NULL ) );
+ _Scheduler_Tick();
#if defined( RTEMS_SMP )
_Thread_Enable_dispatch();
diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c
index 35dd37c4e5..65a8d33ff1 100644
--- a/cpukit/rtems/src/taskcreate.c
+++ b/cpukit/rtems/src/taskcreate.c
@@ -23,6 +23,7 @@
#include <rtems/rtems/modesimpl.h>
#include <rtems/rtems/support.h>
#include <rtems/score/apimutex.h>
+#include <rtems/score/schedulerimpl.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/threadimpl.h>
@@ -140,6 +141,7 @@ rtems_status_code rtems_task_create(
status = _Thread_Initialize(
&_RTEMS_tasks_Information,
the_thread,
+ _Scheduler_Get_by_CPU_index( _SMP_Get_current_processor() ),
NULL,
stack_size,
is_fp,
diff --git a/cpukit/rtems/src/tasksetaffinity.c b/cpukit/rtems/src/tasksetaffinity.c
index 6d8def7aca..3294f97639 100644
--- a/cpukit/rtems/src/tasksetaffinity.c
+++ b/cpukit/rtems/src/tasksetaffinity.c
@@ -43,7 +43,6 @@ rtems_status_code rtems_task_set_affinity(
case OBJECTS_LOCAL:
ok = _Scheduler_Set_affinity(
- _Scheduler_Get( the_thread ),
the_thread,
cpusetsize,
cpuset