lkml.org 
[lkml]   [2002]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[question] peculiar scheduler execution pattern
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/
--------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.033 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site