#3059 closed enhancement (fixed)

Add a simple processor affinity support to the EDF SMP scheduler

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:


Add support to the EDF SMP scheduler to honour one-to-one and one-to-all thread processor affinities. Use one ready queue for threads with a one-to-all affinity. Use one ready queue for each of the one-to-one threads for each processor. Since a red-black tree is used for the ready queues, the space overhead of one pointer per ready queue is small.

Change History (28)

comment:1 Changed on 07/10/17 at 07:33:00 by Sebastian Huber <sebastian.huber@…>

In fd03ba4/rtems-source-builder:

4.12: Fix and update bitset(9)

Update #3059.

comment:2 Changed on 07/10/17 at 07:37:14 by Sebastian Huber <sebastian.huber@…>

In 3dfe55ee/rtems:

score: Use <sys/bitset.h> for Processor_mask

Implement the Processor_mask via <sys/bitset.h>. Provide
_Processor_mask_To_uint32_t() to enable its use in device specific
routines, e.g. interrupt affinity register in an interrupt controller.

Update #3059.

comment:3 Changed on 07/10/17 at 07:37:27 by Sebastian Huber <sebastian.huber@…>

In 7a5e4d94/rtems:

score: Add processor mask to/from cpu_set_t

Update #3059.

comment:4 Changed on 07/10/17 at 07:37:38 by Sebastian Huber <sebastian.huber@…>

In 6223097a/rtems:

score: Add some processor mask functions

Update #3059.

comment:5 Changed on 07/10/17 at 07:37:51 by Sebastian Huber <sebastian.huber@…>

In 7851555/rtems:

score: Move processor affinity to Thread_Control

Update #3059.

comment:6 Changed on 07/10/17 at 07:38:03 by Sebastian Huber <sebastian.huber@…>

In 6b1d8c7/rtems:

score: Add processor set to scheduler context

Replace the simple processor count with the processor set owned by the
scheduler instance.

Update #3059.

comment:7 Changed on 07/10/17 at 07:38:15 by Sebastian Huber <sebastian.huber@…>

In 1ec9c86/rtems:

rtems: Fix rtems_scheduler_remove_processor()

Account for the thread processor affinity and make sure that it is
possible to allocate a processor to each thread dedicated to a scheduler

Update #3059.

comment:8 Changed on 07/10/17 at 07:38:28 by Sebastian Huber <sebastian.huber@…>

In 0232b28/rtems:

score: Use processor mask for set affinity

Update #3059.

comment:9 Changed on 07/10/17 at 07:38:41 by Sebastian Huber <sebastian.huber@…>

In 76d1198/rtems:

score: Introduce _SMP_Get_online_processors()

Update #3059.

comment:10 Changed on 07/10/17 at 07:38:53 by Sebastian Huber <sebastian.huber@…>

In 16347a6/rtems:

score: Fix default set affinity

The set of online processors must be a subset of the thread processor
affinity for the schedulers without arbitrary processor affinity support
to avoid problems in case of processor addition and removal.

Update #3059.

comment:11 Changed on 07/10/17 at 07:39:05 by Sebastian Huber <sebastian.huber@…>

In 197a614/rtems:

score: Add scheduler node to set affinity op

Update #3059.

comment:12 Changed on 07/10/17 at 07:39:17 by Sebastian Huber <sebastian.huber@…>

In e745ec5/rtems:

smptests/smpstrongapa01: Simplify

Update #3059.

comment:13 Changed on 07/10/17 at 07:39:29 by Sebastian Huber <sebastian.huber@…>

In d19dc071/rtems:

score: Pass scheduler nodes to processor allocator

This allows scheduler implementations to easily access
scheduler-specific data.

Update #3059.

comment:14 Changed on 07/10/17 at 07:39:41 by Sebastian Huber <sebastian.huber@…>

In 34487537/rtems:

score: Add simple affinity support to EDF SMP

Update #3059.

comment:15 Changed on 07/10/17 at 07:39:54 by Sebastian Huber <sebastian.huber@…>

In 4a1bdd30/rtems:

score: Fix set scheduler

Ensure that the thread processor affinity fits the new scheduler

Update #3059.

comment:16 Changed on 07/10/17 at 07:40:06 by Sebastian Huber <sebastian.huber@…>

In 21389c06/rtems:

score: Make EDF the default SMP scheduler

The EDF SMP scheduler supports simple thread processor affinities
(see #3059) with a small run-time overhead. The current default SMP
scheduler lacks support for thread processor affinities at all. The EDF
SMP scheduler offers a good feature set for most applications. So, use
it by default. Run-time libraries like libgomp, MTAPI, work stealing
schedulers, language interpreters (e.g. Erlang virtual machine),
maintainence of per-processor data (e.g. Universal Memory Allocator
(UMA)), etc. use a one-to-one thread processor affinity for example.

Update #3063.

comment:17 Changed on 07/10/17 at 07:49:06 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 9037998/rtems-docs:

c-user: Update scheduler/task chapter

Reflect EDF SMP scheduler changes.

Close #3059.
Close #3063.

comment:18 Changed on 07/11/17 at 11:51:47 by Sebastian Huber <sebastian.huber@…>

In 3b14e7aa/rtems:

rtems: Fix warning

Update #3059.

comment:19 Changed on 07/11/17 at 12:16:24 by Sebastian Huber <sebastian.huber@…>

In c29eb085/rtems:

bsps/sparc: Fix ambapp_int_set_affinity()

Update #3059.

comment:20 Changed on 07/12/17 at 06:15:29 by Sebastian Huber <sebastian.huber@…>

In 8397320/rtems-source-builder:

4.12: Fix bitset(9)

Update #3059.

comment:21 Changed on 07/12/17 at 08:57:27 by Sebastian Huber <sebastian.huber@…>

In e2623038/rtems:

score: Fix typo

Update #3059.

comment:22 Changed on 07/18/17 at 12:38:53 by Sebastian Huber <sebastian.huber@…>

In 852d7059/rtems:

score: Fix warning

Update #3059.

comment:23 Changed on 07/19/17 at 11:04:31 by Sebastian Huber <sebastian.huber@…>

In 96ce1ec/rtems:

smptests/smpscheduler02: Remove invalid assert

Update #3059.

comment:24 Changed on 09/22/17 at 12:24:57 by Sebastian Huber <sebastian.huber@…>

In 560acb62/rtems:

score: Include missing header file

Update #3059.

comment:25 Changed on 10/10/17 at 06:27:10 by Sebastian Huber

Component: SMPscore

comment:26 Changed on 10/10/17 at 06:29:01 by Sebastian Huber

Component: scorecpukit

comment:27 Changed on 11/07/17 at 06:09:28 by Sebastian Huber <sebastian.huber@…>

In bceb9db6/rtems:

score: Remove superfluous include

Update #3059.

comment:28 Changed on 11/09/17 at 06:27:14 by Sebastian Huber


Milestone renamed

Note: See TracTickets for help on using tickets.