From 983c96c6a0fd6ae4c553ccbdf9e86fccedeb2b1c Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 24 Feb 2007 11:19:26 +0000 Subject: [PATCH] Push more of the SMPng page into the past tense. Update some descriptions and tasks. --- en/smp/index.sgml | 121 ++++++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/en/smp/index.sgml b/en/smp/index.sgml index 74aab8340c..5527f78450 100644 --- a/en/smp/index.sgml +++ b/en/smp/index.sgml @@ -1,7 +1,7 @@ - - + + @@ -39,26 +39,27 @@

Project Goal

-

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.

@@ -86,7 +87,7 @@

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.

@@ -125,8 +126,11 @@

Project Plan

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.

+ because of the immense scope of the work and rapid pace of development, + it captures only a subset of what has been done. As the base SMPng + Project, moving towards fine-grained locking, is complete, this + information is largely historical, and does not attempt to capture + more recent work on locking and multi-processor performance.

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 @@ NFS Server &status.wip; - 24 November 2004 - &a.rwatson; + 24 February 2007 + &a.rwatson;, &a.jeff; @@ -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. - &a.peter;, &a.scottl; - 1 July 2005 + &a.piso; + 24 February 2007 &status.wip; @@ -2244,6 +2248,20 @@ &status.done; + + Lock down netnatm. + &a.rwatson; + April 2006 + &status.done; + + + + Default to direct dispatch from ithreads + &a.rwatson; + 28 November 2006 + &status.done; + + @@ -2318,22 +2336,16 @@ - Lock down netnatm. - &a.rwatson; - 01 July 2005 - &status.wip; - - - Research and select options for inbound network stack parallelism. Direct dispatch is one option currently being considered. - &a.rwatson; + Locking for polling(4). + &a.pjd;, &a.glebius; 19 October 2005 &status.wip; - Locking for polling(4). - &a.pjd;, &a.glebius; - 19 October 2005 + BPF locking needs some cleanup, there are some race conditions there relating to interface removal. + &a.csjp; + 2 June 2006 &status.wip; @@ -2403,13 +2415,6 @@ &status.new; - - BPF locking needs some cleanup, there are some race conditions there relating to interface removal. -   - 19 October 2005 - &status.new; - - When interfaces are torn down, there are a number of races (not all associated with SMPng) that need to be thought about.