Phase 2
Branches: yamt-idlelwp, vmlocking
Fewer side effects when using locks
Allow MT safe and unsafe code to coexist
VM system and VFS made MT safe

Area

Task

Responsible

Progress

Interrupts

Implement threaded soft interrupts.

ad

Complete

Primitives

Retire spinlockmgr().

ad

Complete

Make lockmgr() use mutexes for interlocking.

ad

Complete

Make callout_init() take a flags argument and push the kernel lock
acquire down into softclock().

ad

Complete

Implement a generic cross-call facility

ad

Complete

Scheduler

Increase the number of available priority levels, maybe defining:
user, system, real time and interrupt.

ad

Complete

Implement one idle LWP per CPU, and reduce cpu_switch() to cpu_switchto()

yamt, all

Complete

Remove MD setrunqueue()/remrunqueue().

yamt

Complete

Support per-CPU run queues to reduce contention and facilitate bound LWPs.

ad, rmind

Complete

Implement priority inheritance for turnstiles.

yamt

Complete

Device drivers

Put wrappers around the devsw entry points that will take the kernel lock for
MT unsafe drivers.

ad

Complete

Misc

Make x86 use MONITOR/MWAIT to obviate need for IPIs when waking other CPUs.

yamt

Complete

VM system

In UVM, replace simple_lock and lockmgr locks with mutexes and rwlocks.

ad

Complete

Profile and improve concurrency.

ad

Complete

Implement per-CPU caching allocator.

ad, yamt

Complete

Replace locks in other components, eg: pools, malloc, vmem.

ad

Complete

In the PMAP modules, replace simple_lock and lockmgr locks.

ad

Complete

Solve any documented races and and locking problems in UVM.

ad, yamt

Complete

VFS

Make the ufs/tmpfs/other file systems MT safe

ad

Complete

Push the kernel_lock back into VOP_ wrappers and file operation sets

ad

Complete

Update the VFS locking scheme to be more MT friendly where necessary

ad

Complete

Phase 3
Branches: HEAD

Work to complete before release of NetBSD 5.0

Area

Task

Responsible

Progress

Compat code

Nuke the stackgap

dsl

Complete

Update compat code to be MT safe, or nuke where appropriate

ad, dsl

Complete

Device drivers

Make kqueue MT safe

ad

Complete

Overhaul select/poll to use per thread state, and to cache state

ad, rmind

Complete

Networking

Remove kernel_lock from Unix domain sockets

ad

Complete

Allow network soft interrupt handlers to block.

ad

Complete

Process state

Join interrupt and process context locks, so that the only remaining interrupt context
locks are on objects intimately related to the scheduler (e.g. LWPs, run queues).
Requires threaded soft interrupts, and allowing network ISRs to block.

ad

Complete

Full per-LWP stats (eg rusage).

ad

Complete

POSIX threads

Implement adaptive mutexes

ad

Complete

VFS

Improve concurrency in the file system name cache

ad

Complete

Future work
Branches: HEAD

Area

Task

Responsible

Progress

Primitives

Replace uses of simple locks and lockmgr() locks throughout the kernel.