zephyriot / zephyr-issues

0 stars 0 forks source link

[ARC] legacy/benchmark/latency_measure not measuring RIRQ/FIRQ #1289

Open nashif opened 7 years ago

nashif commented 7 years ago

Reported by Chuck Jordan:

The latency_measure benchmark is NOT measuring RIRQ or FIRQ interrupts. Rather, it uses irq_offload() to trigger an interrupt. But this isn't really an interrupt, its an EXCEPTION using the trap instruction. Exception handling is much SLOWER on the ARC, since software must save all the registers w/o hardware assist. To truly measure RIRQ and FIRQ, we could either re-work irq_offload so that it uses the AUX_IRQ_HINT register (requiring some interrupt vector), OR, we could create an ARC-only version of this benchmark that is re-written to use AUX_IRQ_HINT from the test itself -- and not use irq_offload.

(Imported from Jira ZEP-1412)

nashif commented 7 years ago

by Mark Linkmeyer:

Hi Chuck Jordan , what's the status on this one?

nashif commented 7 years ago

by Chuck Jordan:

No progress. I've been away from Zephyr a bit, to help another team out that was falling behind.

latency_measure advertises that it measures interrupts, but on ARC, it is using the "exception" path, which is a slower code path. So the goal here would be to modify this so that it actually measures interrupts. I can think of two simple ways to do this: [] Use the ARC timer interrupt -- because its always there on every ARC configuration. There is timer0 and timer1. At least one of these will be present. OR [] Use the AUX_IRQ_HINT register and give it an "unused" vector for it to assert an interrupt.

If priority 0 is used, can measure FIRQ path. If priority is NOT 0, can measure RIRQ path. This benchmark could be improved to measure interrupts at more than one priority, for those targets that support different implementations for different priorities.

nashif commented 7 years ago

by Mark Linkmeyer:

Hi Wayne Ren , in cleaning up issues in preparation of the move to GitHub issues, I cleared the FixVersion field for this story because it was set to 1.8 and 1.8 was already released. If you know when it is now planned to be released, please set the FixVersion field accordingly.