public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jim Bradleigh <jim.bradleigh1@btinternet.com>
To: Jim Bradleigh <jim.bradleigh1@btinternet.com>,
	  eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] CPULoad on i386
Date: Fri, 04 Sep 2009 15:09:00 -0000	[thread overview]
Message-ID: <150989.54606.qm@web87010.mail.ird.yahoo.com> (raw)
In-Reply-To: <915838.75812.qm@web87009.mail.ird.yahoo.com>

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

  reply	other threads:[~2009-09-04 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  9:41 [ECOS] umount leaks /dev/flash/ device slots Stanislav Meduna
2009-09-04 10:11 ` [ECOS] CPULoad on i386 Jim Bradleigh
2009-09-04 15:09   ` Jim Bradleigh [this message]
2013-11-14 10:15 ` [ECOS] Re: umount leaks /dev/flash/ device slots Daniel Zebralla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150989.54606.qm@web87010.mail.ird.yahoo.com \
    --to=jim.bradleigh1@btinternet.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).