22210051
I want to write a book - probably a silly idea.
The book would be about Design Patterns used in the Linux Kernel. Maybe call it
Linux Kernel Patterns
The target audience would be programmers who want to understand the Linux kernel and be able to develop code for it. It should cover Patterns in the human development process as well as patterns in the code.
It might be divided into parts:
Development patterns
External interface patterns
Internal interface patterns
Locking patterns
Development patterns
subsystem maintainers and mailing lists
development/stable cycle
developer-own trees.
If you make an incompatable interface change, make sure old users wont compile.
External interface patterns
how to call userspace
ioctls
filehandles for everything (FUTEX)
internal interface patterns
Negative error numbers, in integers and pointers.
Switched interfaces / helper functions
operations structures with labels
locking patterns
cache update : test / allocate / test-and-insert
dec_and_lock
General
Make the common path fast, and the uncommon path just work.
Defensive: check all user input, rate limit warning, limit resources that can be consumed by the unprivileged.