diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-09-27 13:47:31 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-02-19 15:33:40 -0500 |
commit | bb55630f8b8e0afc5e53ec20d71e0cd3a18913b2 (patch) | |
tree | bc3d2fcb1ab48377254ac8900b57be141d752745 | |
parent | 36bd5c4bb70936815c5273aef8bee1cafccf1a1a (diff) |
Fix: Incorrectly expressed PGM adjustment thresh.
PGM release/deadline adjustment is ignored if the difference between
an adjusted time and current time falls below a given threshold.
This threshold is supposed to be 200us, but was actually 200ns.
This patch resolves this--threshold is now propertly 200us.
-rw-r--r-- | litmus/pgm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/litmus/pgm.c b/litmus/pgm.c index 2bfa8d0843c1..0bc190851718 100644 --- a/litmus/pgm.c +++ b/litmus/pgm.c | |||
@@ -9,8 +9,8 @@ | |||
9 | /* Only readjust release/deadline if difference is over a given threshold. | 9 | /* Only readjust release/deadline if difference is over a given threshold. |
10 | It's a weak method for accounting overheads. Ideally, we'd know the last | 10 | It's a weak method for accounting overheads. Ideally, we'd know the last |
11 | time t was woken up by its last predecessor, rather than having to look | 11 | time t was woken up by its last predecessor, rather than having to look |
12 | at 'now'. */ | 12 | at 'now'. Adjustment threshold currently set to 200us. */ |
13 | #define ADJUSTMENT_THRESH_US 200 | 13 | #define ADJUSTMENT_THRESH_NS (200*1000LL) |
14 | 14 | ||
15 | void setup_pgm_release(struct task_struct* t) | 15 | void setup_pgm_release(struct task_struct* t) |
16 | { | 16 | { |
@@ -29,8 +29,8 @@ void setup_pgm_release(struct task_struct* t) | |||
29 | This is possible since PGM jobs are early-released. Don't shift our | 29 | This is possible since PGM jobs are early-released. Don't shift our |
30 | deadline if we got the tokens earlier than expected. */ | 30 | deadline if we got the tokens earlier than expected. */ |
31 | if (now > tsk_rt(t)->job_params.release) { | 31 | if (now > tsk_rt(t)->job_params.release) { |
32 | long long diff = now - tsk_rt(t)->job_params.release; | 32 | long long diff_ns = now - tsk_rt(t)->job_params.release; |
33 | if (diff > ADJUSTMENT_THRESH_US) { | 33 | if (diff_ns > ADJUSTMENT_THRESH_NS) { |
34 | lt_t adj_deadline = now + get_rt_relative_deadline(t); | 34 | lt_t adj_deadline = now + get_rt_relative_deadline(t); |
35 | 35 | ||
36 | TRACE_TASK(t, "adjusting PGM release time from (r = %llu, d = %llu) " | 36 | TRACE_TASK(t, "adjusting PGM release time from (r = %llu, d = %llu) " |
@@ -44,7 +44,7 @@ void setup_pgm_release(struct task_struct* t) | |||
44 | } | 44 | } |
45 | else { | 45 | else { |
46 | TRACE_TASK(t, "adjustment falls below threshold. %lld < %lld\n", | 46 | TRACE_TASK(t, "adjustment falls below threshold. %lld < %lld\n", |
47 | diff, ADJUSTMENT_THRESH_US); | 47 | diff_ns, ADJUSTMENT_THRESH_NS); |
48 | } | 48 | } |
49 | } | 49 | } |
50 | else { | 50 | else { |