Date: Tue, 19 Feb 2002 01:12:49 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Bruce Evans <bde@zeta.org.au> Cc: Greg Lehey <grog@FreeBSD.ORG>, <arch@FreeBSD.ORG>, <jhb@FreeBSD.ORG> Subject: Re: buildworld comparison stable vs current Message-ID: <200202190912.g1J9CnB59744@apollo.backplane.com> References: <20020219194134.V1374-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:> stable: 2467550 voluntary context switches (buildworld -j 10)
:> current: 23879443 voluntary context switches (buildworld -j 10)
:
:These mostly aren't for interrupts (unless they are for IPIs). I get:
:
: 393580 voluntary context switches
: 355294 involuntary context switches
:
:for UP on an Athlon1600 (for a makeworld which took 1573 seconds in
:-current), i.e., only 1/60 as many voluntary context switches. I think
:most of them are for context switches to idle because Giant is held.
:The idle process is more of a mistake than I first thought.
:
:Bruce
Ah! Ok, that makes a lot more sense.
There is work in progress to patch mutex sleep locks to spin in
this situation. My attempt today didn't work out too well but
apparently John has some code to do it as well that hasn't been
incorporated. I believe it will help the problem but I'm not sure
if it will solve it. I think there may be something else going
on because the context switch rate goes from 230/sec on an idle
box to almost 2000/sec if I am running a single copy of a syscall
intensive program, like TG (gettimeofday() loop) or TU (getuid() loop).
Not even two processes... just one will do it. A for(;;); loop does
not cause any increase. I'm at a loss at the moment.
In anycase, it's definitely costly. I don't think the idle process
is directly responsible but it could be getting switched to as a side
effect of something else.
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202190912.g1J9CnB59744>
