#1819 closed enhancement (fixed)

Add SMP Awareness to Thread Timeslicing

Reported by: Joel Sherrill Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: minor Keywords:
Cc: jennifer.averett@…, gedare@… Blocked By:
Blocking:

Description

On each clock tick, there is accounting which must be done for timeslicing. The time quantum for each executing thread must be decremented and, if the remaining time goes to zero, then the thread must logically perform a yield operation. The current implementation is in a method called _Thread_Tickle_timeslice. This only examines the thread currently executing on ONE CPU. In an SMP system, this management must be done for all of the threads across all CPUs.

This patch adds an "at tick" entry point to the scheduler plugin interface. This allows each scheduler implementation to perform whatever actions it needs to on each clock tick. The current schedulers are all priority based with timeslicing so the Deterministic Priority Scheduler and Simple Priority Scheduler can use the same "at tick" handler. The Simple SMP Priority Scheduler provides its own implementation.

It may be possible to refactor out a common "update timeslice info on thread" routine but, if possible, that will be a follow up action.

All non-SMP tests pass on SIS.

Attachments (2)

pr1819.diff (16.6 KB) - added by Joel Sherrill on 06/16/11 at 20:15:58.
First version for review
pr1819a.diff (16.9 KB) - added by Joel Sherrill on 06/17/11 at 13:30:11.
2nd revision

Download all attachments as: .zip

Change History (7)

Changed on 06/16/11 at 20:15:58 by Joel Sherrill

Attachment: pr1819.diff added

First version for review

comment:1 Changed on 06/16/11 at 20:16:07 by Joel Sherrill

Cc: Jennifer Averett added

comment:2 Changed on 06/16/11 at 20:16:18 by Joel Sherrill

Cc: giddyup44@… added

Changed on 06/17/11 at 13:30:11 by Joel Sherrill

Attachment: pr1819a.diff added

2nd revision

comment:3 Changed on 06/17/11 at 13:30:11 by Joel Sherrill

attachments.isobsolete: 01

comment:4 Changed on 06/17/11 at 13:31:57 by Joel Sherrill

Resolution: fixed
Status: newclosed

Committed.

comment:5 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.