Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_bio.c
Show First 20 Lines • Show All 1,162 Lines • ▼ Show 20 Lines | if (bio_transient_maxcnt == 0 && unmapped_buf_allowed) { | ||||
*/ | */ | ||||
if (bio_transient_maxcnt > 1024) | if (bio_transient_maxcnt > 1024) | ||||
bio_transient_maxcnt = 1024; | bio_transient_maxcnt = 1024; | ||||
if (tuned_nbuf) | if (tuned_nbuf) | ||||
nbuf = buf_sz / BKVASIZE; | nbuf = buf_sz / BKVASIZE; | ||||
} | } | ||||
if (nswbuf == 0) { | if (nswbuf == 0) { | ||||
nswbuf = min(nbuf / 4, 256); | /* | ||||
* Pager buffers are allocated for short periods, so scale the | |||||
* number of reserved buffers based on the number of CPUs rather | |||||
* than amount of memory. | |||||
*/ | |||||
nswbuf = min(nbuf / 4, 32 * mp_ncpus); | |||||
if (nswbuf < NSWBUF_MIN) | if (nswbuf < NSWBUF_MIN) | ||||
nswbuf = NSWBUF_MIN; | nswbuf = NSWBUF_MIN; | ||||
} | } | ||||
/* | /* | ||||
* Reserve space for the buffer cache buffers | * Reserve space for the buffer cache buffers | ||||
*/ | */ | ||||
buf = (char *)v; | buf = (char *)v; | ||||
▲ Show 20 Lines • Show All 4,428 Lines • Show Last 20 Lines |