summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-27 08:48:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 11:00:28 +0100
commitb9990b8d46812766c8ca0ce5523a035be16f83a7 (patch)
tree427010b001141613531f7285449cd05f19e13ca4 /cpukit/include/rtems/score
parentscore: Add node to insert to Chain_Node_order (diff)
downloadrtems-b9990b8d46812766c8ca0ce5523a035be16f83a7.tar.bz2
score: Fix SMP EDF priority group ordering
The SMP EDF scheduler supports one-to-one and one-to-all thread to processor affinities. The one-to-one thread to processor affinity introduces a constraint on the ordering of threads. The implementation uses one ready queue for threads which have a one-to-all affinity and one for each one-to-one affinity group. To order threads across the ready queues, a generation number is used. However, the approach to update the generation number each time a thread is inserted into a ready queue was wrong. The generation number needs to be updated only in the enqueue and enqueue scheduled operations where an insert priority is available. The scheduled chain needs to take the generation number into account. An example scenario which shows the bug is this. Let T be a high priority task affine to processor X. Let A be a lower priority task affine to processor X. Let B be a lower priority task with no affinity to a particular processor which executes on processor Y. Let B be in the same priority group than A and after A. Let T set the affinity to all processors. Now A (higher priority relative to B) should execute on X and T (high priority) should execute on Y. Close #4534.
Diffstat (limited to 'cpukit/include/rtems/score')
0 files changed, 0 insertions, 0 deletions