From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: sched_yield() version 2.4.24
Date: Tue, 30 Mar 2004 12:09:11 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.53.0403301204510.7155@chaos> (raw)
In-Reply-To: <4069A729.3030507@nortelnetworks.com>
On Tue, 30 Mar 2004, Chris Friesen wrote:
> Richard B. Johnson wrote:
> > Anybody know why a task that does:
> >
> > for(;;)
> > sched_yield();
> >
> > Shows 100% CPU utiliization when there are other tasks that
> > are actually getting the CPU?
>
> What do the other tasks show for cpu in top?
>
Well in excess of 100% on a single-CPU system.
12:02pm up 1 day, 53 min, 4 users, load average: 2.54, 1.25, 0.90
34 processes: 31 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 65.8% user, 134.6% system, 0.0% nice, 0.0% idle
Mem: 322352K av, 101772K used, 220580K free, 0K shrd, 9836K buff
Swap: 1044208K av, 1044208K used, 0K free 20240K cached
PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
7144 root 19 0 5564 5564 1444 R 0 82.5 1.7 2:27 client
7143 root 15 0 980 976 428 S 0 59.9 0.3 1:57 server
7142 root 18 0 1464 1464 1444 R 0 56.0 0.4 1:39 client
7163 root 11 0 568 564 432 R 0 1.9 0.1 0:00 top
[SNIPPED...sleeping tasks]
Here, one of the 'client' tasks is yielding its CPU time when it
is waiting on a semaphore from the first one.
> Maybe it's an artifact of the timer-based process sampling for cpu
> utilization, and it just happens to be running when the timer interrupt
> fires, so it keeps getting billed?
>
> Chris
>
I think somebody forgot to put something into the 'current' structure
when sys_sched_yield() gets called.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-03-30 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-30 16:47 Richard B. Johnson
2004-03-30 16:58 ` Chris Friesen
2004-03-30 17:09 ` Richard B. Johnson [this message]
2004-03-30 17:30 ` Chris Friesen
2004-03-30 17:52 ` Ben Greear
2004-03-30 19:40 ` Denis Vlasenko
2004-03-30 20:29 ` Richard B. Johnson
2004-03-30 23:10 ` Diego Calleja García
2004-03-31 13:53 ` Richard B. Johnson
2004-04-01 0:05 ` Eric W. Biederman
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=Pine.LNX.4.53.0403301204510.7155@chaos \
--to=root@chaos.analogic.com \
--cc=cfriesen@nortelnetworks.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®