From owner-freebsd-arch Wed May 24 18: 3:44 2000 Delivered-To: freebsd-arch@freebsd.org Received: from berserker.bsdi.com (berserker.twistedbit.com [199.79.183.1]) by hub.freebsd.org (Postfix) with ESMTP id 62BF837B9B1 for ; Wed, 24 May 2000 18:03:40 -0700 (PDT) (envelope-from cp@berserker.bsdi.com) Received: from berserker.bsdi.com (cp@[127.0.0.1]) by berserker.bsdi.com (8.9.3/8.9.3) with ESMTP id TAA15470 for ; Wed, 24 May 2000 19:03:38 -0600 (MDT) Message-Id: <200005250103.TAA15470@berserker.bsdi.com> To: arch@freebsd.org Subject: Short summary From: Chuck Paterson Date: Wed, 24 May 2000 19:03:38 -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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