#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 Jun 16, 2011 at 8:15:58 PM.
First version for review
pr1819a.diff (16.9 KB) - added by Joel Sherrill on Jun 17, 2011 at 1:30:11 PM.
2nd revision

Download all attachments as: .zip

Change History (7)

Changed on Jun 16, 2011 at 8:15:58 PM by Joel Sherrill

Attachment: pr1819.diff added

First version for review

comment:1 Changed on Jun 16, 2011 at 8:16:07 PM by Joel Sherrill

Cc: Jennifer Averett added

comment:2 Changed on Jun 16, 2011 at 8:16:18 PM by Joel Sherrill

Cc: giddyup44@… added

Changed on Jun 17, 2011 at 1:30:11 PM by Joel Sherrill

Attachment: pr1819a.diff added

2nd revision

comment:3 Changed on Jun 17, 2011 at 1:30:11 PM by Joel Sherrill

attachments.isobsolete: 01

comment:4 Changed on Jun 17, 2011 at 1:31:57 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Committed.

comment:5 Changed on Nov 24, 2014 at 6:58:28 PM 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.