[ECOS] CPULoad on i386

Jim Bradleigh jim.bradleigh1@btinternet.com
Fri Sep 4 15:09:00 GMT 2009


Hi,

I found out that by replacing the asm("hlt") command in hal_idle_thread_action with a "nop" causes the ticks reported to jump from 1 per millisecond to about ~160,000 ticks per ms..

Obviously the hlt command is causing the CPU to wait til the next maskable interrupt occurs, in my case this (normally) will be the timer as it is set to tick at 1ms (rather than the eCos default 10ms)

Quick questions:

Is there any harm in letting the Idle run as fast as it can? 
How did the cpu load package ever work on an i386 platform?

Thanks,

Jim



----- Original Message ----
From: Jim Bradleigh <jim.bradleigh1@btinternet.com>
To: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Sent: Friday, 4 September, 2009 11:11:15 AM
Subject: [ECOS] CPULoad on i386

Hi,

I`ve been trying to get an idea of my applications performance (was < 10% on windows machine) and have been running into problems with the cpuload feature.

cyg_cpuload_get returns zero for all the fields and I`ve debugged into the code and fouind the calibration value is (around) 0x64.

Shouldn`t the high priroty idle thread run more than ~100 times during 100ms? I would expect a massive figure here..(also 100 times in 100 ms sounds a bit like I executed per ms)

I`ve tried this with both my custom repository and a default "i386 with 8139" repository and the results are the same. I`ve removed network cards, ensured a single process CPU (AMD Sempron 2800+) without power managament is used and call the functions at the very start of main() 

Anyone got any ideas? 

James



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list