Skip to content

RTA refactoring to support phases composition

Darryl Green requested to merge github/fork/derkling/rtapp-refactoring into master

Created by: derkling

This is a main re-factoring of the RTA phases definition methods (Ramp, Periodic) etc. to support the composition of multiple pahses for a single task. That feature was already present but not well documented.

An example of the new interface is provided by the update SchedFreq smoke test, where the three different pahses are now defined like:

# Light workload
light  = Periodic(duty_cycle_pct=10, duration_s=1.0, period_ms= 10,
                  cpus=str(target.bl.bigs_online[0]))
heavy  = Periodic(duty_cycle_pct=90, duration_s=0.1, period_ms=100)
medium = Periodic(duty_cycle_pct=50, duration_s=1.0, period_ms= 10)

task = light + heavy + medium

rtapp.conf(
   kind='profile',
   params={
      'task1': lhl_task.get()
   }
)

Notice the usage of the get() method on the composed task to get the params required for the rtapp configuration.

Merge request reports