aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-09-02 07:48:02 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-05-26 17:12:37 -0400
commit230bdd88afc42cba3da8eaf29adbe75d6dc4a9f3 (patch)
tree35ca3f66b72b24bc30f728956946a05e34e6064a /kernel
parent141fbbfcabf3b7686e6d3a6578b47b94805adb8e (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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 49da37510d78..6a52fda75cda 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>
@@ -1458,7 +1461,15 @@ static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer)
1458 1461
1459 t->task = NULL; 1462 t->task = NULL;
1460 if (task) 1463 if (task)
1464 {
1465 if (is_realtime(task))
1466 {
1467 ktime_t expires = hrtimer_get_expires(timer);
1468 lt_t intended_release = ktime_to_ns(expires);
1469 TS_RELEASE_LATENCY(intended_release);
1470 }
1461 wake_up_process(task); 1471 wake_up_process(task);
1472 }
1462 1473
1463 return HRTIMER_NORESTART; 1474 return HRTIMER_NORESTART;
1464} 1475}