From 983c96c6a0fd6ae4c553ccbdf9e86fccedeb2b1c Mon Sep 17 00:00:00 2001
From: Robert Watson The FreeBSD Symmetric MultiProcessing (SMP) project, often referred to
- as SMPng (SMP next generation), is focused on introducing parallelism
+ The FreeBSD Next Generation Symmetric Multi-Processing Project,
+ generally referred to as SMPng, is focused on introducing parallelism
into the FreeBSD kernel.
- While earlier versions of FreeBSD (3.x, 4.x) supported parallelism in
- user processes, the kernel was limited to executing on a single
- processor at a time, using what is referred to as a "Giant lock" around
- the kernel.
- For many interesting workloads, this results in a substantial speed-up,
- as significant computation occurs in user processes, especially for
- applications such as rendering and compilation.
+ While earlier versions of FreeBSD (3.x, 4.x) supported parallel
+ execution of user processes, the kernel was limited to running on a
+ single processor at a time, using what is referred to as a "Giant lock"
+ around the kernel.
+ For many interesting workloads, Giant-locked kernels give substantial
+ speed-up, as significant computation occurs in user
+ processes--especially for applications such as rendering and
+ compilation.
However, for kernel-intensive applications, such as intensive network
- or file system I/O, contention on the kernel lock results in little
- speed-up.
- The end goal of the SMPng Project is to decompose the Giant lock into a
- number of smaller locks, resulting in reduced contention (and improved
- SMP performance).
- However, important steps along the way include redesigning significant
- portions of the FreeBSD kernel architecture around the notion of
- ubiquitous parallelism: that at any moment, many processors might enter
- the kernel at the same time.
+ or file system I/O, contention on the kernel lock results in little or
+ no speed-up.
+ The goal of the SMPng Project has been to decompose the Giant lock into
+ a number of smaller locks, resulting in reduced contention (and
+ improved SMP performance).
+ However, important steps along the way have included red
+ signing significant portions of the FreeBSD kernel architecture around
+ the notion of ubiquitous parallelism: that at any moment, many
+ processors might enter the kernel at the same time.
This includes the introduction of more mature threading and
synchronization primitives, interrupt threads, cache-aware allocation
and scheduling, and topology-aware scheduling. SMPng debuted in FreeBSD 5.0-RELEASE in January of 2003, and involved
over five years of continuous development by a large number of members
- of the FreeBSD development team, as well as many external contributors.
+ of the FreeBSD development team as well as many external contributors.
Since 5.0, the implementation has substantially matured; in the 5.0
release, the basic architectural changes required to support SMPng were
complete, including new kernel memory allocators, synchronization
@@ -99,24 +100,24 @@
system, including large parts of Virtual Memory (VM), the Virtual File
System (VFS), UNIX File System (UFS), most parts of the network stack,
including IPv4, IPV6, FAST_IPSEC, UNIX domain sockets, and NetGraph,
- and also from additional inter-process communication primitives.
+ and also from inter-process communication primitives.
The SMP-aware kernel slab allocator is now used almost universally, and
- the focus has changed from "make it work", to "optimize it!".
+ the focus has changed from "make it work", to "optimize it".
Simultaneous work on KSE 1:1 and M:N threading has also allowed
applications to take advantage of new kernel parallelism.
The FreeBSD 5.3 kernel introduced Giant-free network stack execution
- for most relevant code paths, and the FreeBSD 6.x kernel introduces
+ for most relevant code paths, and the FreeBSD 6.0 kernel introduced
MPSAFE VFS, as well as wide-spread performance optimization. Continuing work on SMPng includes work sweeping up the "loose ends"
- that remain under Giant, such as parts of NFS, less widely used file
- systems such as NTFS, and less commonly used network stack components,
- such as SLIP.
- Another important focus is performance measurement and optimization,
- which build on and refine the SMPng architecture: the introduction of
- features such as the kernel trace facility (KTR), hardware performance
- monitor counters (hwpmc), lock profiling, and improved memory
- monitoring play important roles in this process.
+ Continuing work on SMPng in the 6.x branch has included work sweeping
+ up the "loose ends" that remain under Giant, such as parts of NFS, and
+ less commonly used network stack components. Throughout SMPng, an important focus is performance measurement and
+ optimization, which build on and refine the SMPng architecture: the
+ introduction of features such as the kernel trace facility (KTR),
+ hardware performance monitor counters (hwpmc), lock profiling, and
+ improved memory monitoring play important roles in this process.
Other important debugging and testing facilities include WITNESS, a
run-time kernel lock order verifier, and wide-spread use of lock
assertions and run-time invariants testing. This web page contains information relating to the SMPng effort;
- because of the large amount of work and rapid pace of development,
- it can fall a bit behind reality.Project Goal
- Project Plan
The task list below is not intended to be complete, but does represent a set of relevant and/or important components of the @@ -149,7 +153,7 @@
Locking down of individual device drivers is tracked at the busdma and - SMPng driver conversion webpage.
+ SMPng driver conversion web page.Network stack locking information is available at &a.rwatson;'s
netperf web
@@ -400,8 +404,8 @@
@@ -1702,8 +1706,8 @@
split "in interrupt context" and "in interrupt thread"
code so as to acknowledge interrupts faster. This will permit
lower latency in interrupt handling.
- NFS Server
&status.wip;
- 24 November 2004
- &a.rwatson;
+ 24 February 2007
+ &a.rwatson;, &a.jeff;