[RTEMS Project] #4534: SMP EDF scheduler violates priority group ordering

RTEMS trac trac at rtems.org
Tue Nov 23 13:36:03 UTC 2021


#4534: SMP EDF scheduler violates priority group ordering
--------------------------------+------------------------------
 Reporter:  Sebastian Huber     |       Owner:  Sebastian Huber
     Type:  defect              |      Status:  closed
 Priority:  normal              |   Milestone:  6.1
Component:  score               |     Version:  5
 Severity:  normal              |  Resolution:  fixed
 Keywords:  SMP, qualification  |  Blocked By:
 Blocking:                      |
--------------------------------+------------------------------
Changes (by Sebastian Huber <sebastian.huber@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b9990b8d46812766c8ca0ce5523a035be16f83a7/rtems"
 b9990b8d/rtems]:
 {{{
 #!CommitTicketReference repository="rtems"
 revision="b9990b8d46812766c8ca0ce5523a035be16f83a7"
 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.
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4534#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list