CVSROOT:        /cvs
Module name:    src
Changes by:     b...@cvs.openbsd.org    2012/11/07 10:50:49

Modified files:
        sys/kern       : vfs_bio.c 
        sys/uvm        : uvm_pdaemon.c 

Log message:
Fix the buffer cache.

A long time ago (in vienna) the reserves for the cleaner and syncer were
removed. softdep and many things have not performed ths same ever since.
Follow on generations of buffer cache hackers assumed the exising code
was the reference and have been in frustrating state of coprophagia ever
since.

This commit

0) Brings back a (small) reserve allotment of buffer pages, and the kva to
map them, to allow the cleaner and syncer to run even when under intense
memory or kva pressure.
1) Fixes a lot of comments and variables to represent reality.
2) Simplifies and corrects how the buffer cache backs off down to the lowest
level.
3) Corrects how the page daemons asks the buffer cache to back off, ensuring
that uvmpd_scan is done to recover inactive pages in low memory situaitons
4) Adds a high water mark to the pool used to allocate struct buf's
5) Correct the cleaner and the sleep/wakeup cases in both low memory and low
kva situations. (including accounting for the cleaner/syncer reserve)

Tested by many, with very much helpful input from deraadt, miod, tobiasu,
kettenis and others.

ok kettenis@ deraadt@ jj@

Reply via email to