xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Interrupt latency measurement technique
@ 2014-08-27  9:14 Andrii Tseglytskyi
  2014-08-27 10:07 ` Andrii Tseglytskyi
  2014-08-28  1:07 ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: Andrii Tseglytskyi @ 2014-08-27  9:14 UTC (permalink / raw)
  To: xen-devel@lists.xen.org, Ian Campbell, Julien Grall,
	Stefano Stabellini

Hi,

I need to measure IRQ latency introduced by Xen: (GIC -> Xen IRQ
handler -> Dom0 IRQ handler)
I need to know how many time I spend in Xen IRQ handler.

Can someone comment - is the following algorithm works:

- in function xen/arch/arm/gic.c: gic_interrupt() store timer counter value:
xen_timer_val = READ_SYSREG64(CNTPCT_EL0) - READ_SYSREG64(CNTVOFF_EL2)

- in any IRQ handler in dom0 store timer counter value:
dom0_timer_val = READ_SYSREG64(CNTPCT_EL0)

- calculate time diff in nanoseconds:
time_diff_ns = ticks_to_ns(dom0_timer_val - xen_timer_val)

Using this technique I measured display IRQ latency and got about
- 20 to 30 usec latency on 1 GHz MPU frequency
- 10 to 20 usec latencyon 1.5 GHz MPU frequency

Are these numbers expectable? Can this technique be used?

Regards,
Andrii

-- 

Andrii Tseglytskyi | Embedded Dev
GlobalLogic
www.globallogic.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-29 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27  9:14 [RFC] Interrupt latency measurement technique Andrii Tseglytskyi
2014-08-27 10:07 ` Andrii Tseglytskyi
2014-08-29 18:07   ` Jonathan Fraser
2014-08-29 20:11     ` Andrii Tseglytskyi
2014-08-28  1:07 ` Ian Campbell
2014-08-28  7:58   ` Andrii Tseglytskyi
2014-08-28 17:47     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).