Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2000 19:03:38 -0600
From:      Chuck Paterson <cp@bsdi.com>
To:        arch@freebsd.org
Subject:   Short summary
Message-ID:  <200005250103.TAA15470@berserker.bsdi.com>

next in thread | raw e-mail | index | archive | help
	
	What is being proposed here is a major kernel architectural
change. The locking provided by SPLS in the traditional BSD kernel goes away 
and is replaced by mutexs. This model is very different. Interrupts
do not in general get blocked. When interrupt service code needs
access to some piece of data which is actively being modified by
what is traditionally thought of as the "top half" the interrupt
thread will block at that point. The finer grained the locking the
less chance of a collision, but the number of locking operation
goes up and a price has to be paid.

	BSDI has been shipping only a MP capable kernel since 98.
This kernel has a very few number of locks, for the sake of discussion
it is a Giant lock kernel. This kernel ran as fast as the previous
non-MP capable kernel in a uniprocessor environment. Trying to take
the locking any finer would have significantly impacted uniprocessor
performance.

	The architecture being proposed here is the same as the
BSD/OS SMPng kernel. An MP capable version of this kernel runs
virtually the same speed as the Giant lock BSD/OS kernel in a uniprocessor
environment. It occurred to me today that in a uniprocessor environment
the lock prefix to the cmpxchg can be removed.  I ran some
experiments. The following data is from a very limited sample size. On
a couple of different systems with different clock rates removing
the lock prefix reduced execution time of mutex operations to one
third of their original value. Running the same job with two kernels
whose only difference was the lock prefix there was a reduction in
system time of 2.5 percent. This suggested that the total system
time used for locking with the SMP locks in place is 3.6 percent
and with the the locks trimmed for uniprocessor only operation is
1.2 percent. (Please excuse rounding errors).


	It appears that there is a desire to retain both 386 and
486 processors, and perhaps a uniprocessor only version of Pentium
or better. There are several acceptable ways to achieve this so it
doesn't seem to be a big deal, except for the small matter of doing
the work. Both the uniprocessor and multiprocessor versions run
under the new architecture, the old SPL code will (is it
will or would for a proposal?) be totally gone. 

Chuck



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?200005250103.TAA15470>