Beispiel #1
0
    def get_rtapp_profile(cls,
                          plat_info,
                          cpu,
                          nr_steps,
                          min_util=5,
                          max_util=75):
        start_pct = cls.unscaled_utilization(plat_info, cpu, min_util)
        end_pct = cls.unscaled_utilization(plat_info, cpu, max_util)

        delta_pct = ceil((end_pct - start_pct) / nr_steps)

        rtapp_profile = {
            cls.task_name:
            Ramp(
                start_pct=start_pct,
                end_pct=end_pct,
                delta_pct=delta_pct,
                time_s=0.3,
                loops=20,
                period_ms=cls.TASK_PERIOD_MS,
                # Make sure we run on one CPU only, so that we only stress
                # frequency scaling and not placement.
                cpus=[cpu],
            )
        }

        return rtapp_profile
Beispiel #2
0
    def get_rtapp_profile(cls, plat_info):
        big_cpu = plat_info["capacity-classes"][-1][0]

        task = (
            # Big task
            Periodic(
                duty_cycle_pct=75, duration_s=5, period_ms=200, cpus=[big_cpu])
            +
            # Ramp Down
            Ramp(start_pct=50,
                 end_pct=5,
                 delta_pct=20,
                 time_s=1,
                 period_ms=200,
                 cpus=[big_cpu]) +
            # Ramp Up
            Ramp(start_pct=10,
                 end_pct=60,
                 delta_pct=20,
                 time_s=1,
                 period_ms=200,
                 cpus=[big_cpu]))
        return {'test': task}
Beispiel #3
0
    def get_rtapp_profile(cls, plat_info):
        start_pct = cls.get_big_duty_cycle(plat_info, 70)
        end_pct = cls.get_little_duty_cycle(plat_info, 10)

        rtapp_profile = {
            cls.task_name:
            Ramp(start_pct=start_pct,
                 end_pct=end_pct,
                 delta_pct=5,
                 time_s=.5,
                 period_ms=cls.TASK_PERIOD_MS)
        }

        return rtapp_profile
Beispiel #4
0
    def get_rtapp_profile(cls, plat_info):
        littles = plat_info["capacity-classes"][0]
        bigs = plat_info["capacity-classes"][-1]

        start_pct = cls.unscaled_utilization(plat_info, bigs[0], 70)
        end_pct = cls.unscaled_utilization(plat_info, littles[0], 10)

        rtapp_profile = {
            cls.task_name:
            Ramp(start_pct=start_pct,
                 end_pct=end_pct,
                 delta_pct=5,
                 time_s=.5,
                 period_ms=cls.TASK_PERIOD_MS)
        }

        return rtapp_profile
Beispiel #5
0
    def test_composition(self):
        """
        Test RTA task composition with __add__

        Creates a composed workload by +-ing RTATask objects, tests that the
        JSON has the expected content, then tests running the workload
        """
        light = Periodic(duty_cycle_pct=10, duration_s=1.0, period_ms=10)

        start_pct = 10
        end_pct = 90
        delta_pct = 20
        ramp = Ramp(start_pct=start_pct,
                    end_pct=end_pct,
                    delta_pct=delta_pct,
                    time_s=1,
                    period_ms=50)

        heavy = Periodic(duty_cycle_pct=90, duration_s=0.1, period_ms=100)

        profile = {"test_task": light + ramp + heavy}

        exp_phases = [
            # Light phase:
            {
                "loop": 100,
                "run": 1000,
                "timer": {
                    "period": 10000,
                    "ref": "test_task"
                }
            },
            # Ramp phases:
            {
                "loop": 20,
                "run": 5000,
                "timer": {
                    "period": 50000,
                    "ref": "test_task"
                }
            },
            {
                "loop": 20,
                "run": 15000,
                "timer": {
                    "period": 50000,
                    "ref": "test_task"
                }
            },
            {
                "loop": 20,
                "run": 25000,
                "timer": {
                    "period": 50000,
                    "ref": "test_task"
                }
            },
            {
                "loop": 20,
                "run": 35000,
                "timer": {
                    "period": 50000,
                    "ref": "test_task"
                }
            },
            {
                "loop": 20,
                "run": 45000,
                "timer": {
                    "period": 50000,
                    "ref": "test_task"
                }
            },
            # Heavy phase:
            {
                "loop": 1,
                "run": 90000,
                "timer": {
                    "period": 100000,
                    "ref": "test_task"
                }
            }
        ]

        self._do_test(profile, exp_phases)