Skip to content

Commit d01320a

Browse files
kv2019ilgirdwood
authored andcommitted
schedule: zephyr_domain: include domain block in ll time tracking
Include the possible domain block time when measuring the time it takes to complete one iteration of the low-latency scheduler thread loop. The ll timer metrics are typically used for initial system debug and it can be misleading when domain block events are not counted in reported average/max numbers. Change the timing code to start measurement immediately after domain thread semaphore is taken. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 17f46a7 commit d01320a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/schedule/zephyr_domain.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ static void zephyr_domain_thread_fn(void *p1, void *p2, void *p3)
7272
/* immediately go to sleep, waiting to be woken up by the timer */
7373
k_sem_take(&dt->sem, K_FOREVER);
7474

75+
cycles0 = k_cycle_get_32();
76+
7577
#if CONFIG_CROSS_CORE_STREAM
7678
/*
7779
* If zephyr_domain->block is set -- block LL scheduler from starting its
@@ -92,7 +94,6 @@ static void zephyr_domain_thread_fn(void *p1, void *p2, void *p3)
9294
}
9395
#endif
9496

95-
cycles0 = k_cycle_get_32();
9697
dt->handler(dt->arg);
9798
cycles1 = k_cycle_get_32();
9899

0 commit comments

Comments
 (0)