diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-09-02 07:48:02 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-08 10:12:41 -0500 |
| commit | a2e09c5fbdd51755c24eaced80b1d68599ce607e (patch) | |
| tree | 81301d029a1c1d1e39252fa1a9c60e2d4adf71cb /kernel | |
| parent | aed543518c7446190d8d6e2c743c1579a99fbd7b (diff) | |
Patch hrtimer_wakeup() callback to record RELEASE_LATENCY
Record interrupt latency for tasks that use nanosleep or some other
interface that ends up using a hrtimer_sleeper struct to trigger the
wakeup of the task when the next job is released.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/time/hrtimer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index bb281cfa31e9..2ce65d992935 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
| @@ -50,6 +50,9 @@ | |||
| 50 | #include <linux/timer.h> | 50 | #include <linux/timer.h> |
| 51 | #include <linux/freezer.h> | 51 | #include <linux/freezer.h> |
| 52 | 52 | ||
| 53 | #include <litmus/debug_trace.h> | ||
| 54 | #include <litmus/trace.h> | ||
| 55 | |||
| 53 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
| 54 | 57 | ||
| 55 | #include <trace/events/timer.h> | 58 | #include <trace/events/timer.h> |
| @@ -1480,7 +1483,15 @@ static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer) | |||
| 1480 | 1483 | ||
| 1481 | t->task = NULL; | 1484 | t->task = NULL; |
| 1482 | if (task) | 1485 | if (task) |
| 1486 | { | ||
| 1487 | if (is_realtime(task)) | ||
| 1488 | { | ||
| 1489 | ktime_t expires = hrtimer_get_expires(timer); | ||
| 1490 | lt_t intended_release = ktime_to_ns(expires); | ||
| 1491 | TS_RELEASE_LATENCY(intended_release); | ||
| 1492 | } | ||
| 1483 | wake_up_process(task); | 1493 | wake_up_process(task); |
| 1494 | } | ||
| 1484 | 1495 | ||
| 1485 | return HRTIMER_NORESTART; | 1496 | return HRTIMER_NORESTART; |
| 1486 | } | 1497 | } |
