From 0da35d673e1c1717821f724d8fb00379477b65be Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Thu, 21 Oct 2021 19:20:36 -0400 Subject: dag case study scripts --- extra.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'extra.h') diff --git a/extra.h b/extra.h index ceaee92..f2ec84e 100644 --- a/extra.h +++ b/extra.h @@ -30,7 +30,7 @@ extern int sched_getcpu(); #endif // This is a proxy for "case study mode" now -#define LITMUS 0 +#define LITMUS 1 #define MMDC_PROF 0 #if LITMUS @@ -106,7 +106,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { #if LITMUS fprintf(stderr, " in ms\n"); fprintf(stderr, " 0 for Level-A, 1 for Level-B, 2 for Level-C\n"); - fprintf(stderr, " in ms\n"); + fprintf(stderr, " in ms\n"); #endif /* LITMUS */ exit(1); } @@ -209,6 +209,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { _rt_period = ms2ns(strtoul(argv[end], NULL, 10)); _rt_crit = atoi(argv[end+1]); _rt_phase = ms2ns(strtoul(argv[end+2], NULL, 10)); + // _rt_phase = 0; unsigned int wait = 1; if (be_migrate_to_domain(_rt_core) < 0) { perror("Unable to migrate to specified CPU"); @@ -221,7 +222,8 @@ static void _rt_load_params_itrl(int argc, char **argv) { rt_param.period = _rt_period; rt_param.relative_deadline = 0; rt_param.phase = _rt_phase; - rt_param.priority = LITMUS_LOWEST_PRIORITY; + // rt_param.priority = LITMUS_LOWEST_PRIORITY; + rt_param.priority = ns2ms(_rt_phase); rt_param.cls = _rt_crit; rt_param.budget_policy = NO_ENFORCEMENT; rt_param.cpu = _rt_core; @@ -435,10 +437,11 @@ static void _rt_start_loop() { } if (last == 0) { last = now; - } else if (now > last + 60ull * _BILLION && _rt_crit >= 2) { - last = now; - fprintf(stderr, "(%s/%d:%lu) Ping\n", _rt_our_prog_name, gettid(), _rt_cp->job_index); - } + } + // else if (now > last + 60ull * _BILLION && _rt_crit >= 2) { + // last = now; + // fprintf(stderr, "(%s/%d:%lu) Ping\n", _rt_our_prog_name, gettid(), _rt_cp->job_index); + // } if (sleep_next_period() != 0) { perror("Unable to sleep for next period"); } -- cgit v1.2.2