public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Weigle <ehw@lanl.gov>
To: "Linux kernel mailing list (lkml)" <linux-kernel@vger.kernel.org>
Cc: Mark Gardner <mkg@lanl.gov>
Subject: [question] peculiar scheduler execution pattern
Date: Fri, 1 Feb 2002 11:01:20 -0700	[thread overview]
Message-ID: <20020201180120.GF24524@lanl.gov> (raw)

Good morning-

Summary: I am measuring how long the kernel spends in schedule(). On a
dual CPU machine, the time for one CPU is lower than the other. Regularly
(about every second) the results switch. Why is the time spent in schedule()
longer on one CPU than the other and why do the results switch periodically?
I vaguely remember seeing something about this on the list recently (with
all the O(1) discussion), but searched the archives to no avail.

Details: The machine is a dual 400 MHz Pentium II running Debian testing with a
2.4.17 SMP kernel. I am using an instrumentation package we are developing [1]
to save a timestamp at the beginning and end of kernel/sched.c:schedule(). The
time source is get_cycles(). Other than an empty infinite loop program,
the usual daemons and my ssh shell, nothing is running on the machine. (When
not running the CPU bound process, uptime reports a load of 0.00.)

A graph [2] of the time spent in schedule as a function of time shows one
CPU spends less time in schedule than the other one (approximately 2 usec
and 6 usec respectively). After about a minute they switch places.

Why is the time spent in schedule() longer on one CPU than the other and
why do the results switch periodically?

Any information, links, etc. would be appreciated (and I'm on the list,
so a CC is not required).
-Eric

[1] http://www.lanl.gov/radiant/website/research/measurement/magnet.html
[2] http://public.lanl.gov/mkg/cpubound_normal_ctx_time.png

-- 
--------------------------------------------
 Eric H. Weigle   CCS-1, RADIANT team
 ehw@lanl.gov     Los Alamos National Lab
 (505) 665-4937   http://home.lanl.gov/ehw/
--------------------------------------------

                 reply	other threads:[~2002-02-01 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020201180120.GF24524@lanl.gov \
    --to=ehw@lanl.gov \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkg@lanl.gov \
    /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