This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: load monitoring (on an ARM)
- To: furrer at engineer dot com (Travis Furrer)
- Subject: Re: [ECOS] load monitoring (on an ARM)
- From: andrew dot lunn at ascom dot ch (Andrew Lunn)
- Date: Fri, 11 Feb 2000 09:24:37 +0100 (MET)
- Cc: ecos-discuss at sourceware dot cygnus dot com
> Thanks Andrew for the cpuload code! It seems to work quite
> nicely.
Good.
> However, one pitfall of using idle_thread_loops as the indicator
> of CPU load is that the code in HAL_IDLE_THREAD_ACTION can
> interfere.
Yep. I thought about that when i designed to code and then ignored it
because my system is always plugged into the mains.
I think the only way out of the idle loop is via an interrupt. I
assume you get your tick interrupts from a high speed clock. When you
go into idle mode read the high speed clock. In the interrupt
processing code add another read to the high speed clock. Subtract and
you have the time in idle mode.
Andrew