diff options
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 5a37b0b..19feecd 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -667,6 +667,10 @@ bd_speedup(void) mtx_unlock(&bdlock); } +#ifndef NSWBUF_MIN +#define NSWBUF_MIN 16 +#endif + #ifdef __i386__ #define TRANSIENT_DENOM 5 #else @@ -778,11 +782,10 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) * swbufs are used as temporary holders for I/O, such as paging I/O. * We have no less then 16 and no more then 256. */ - nswbuf = max(min(nbuf/4, 256), 16); -#ifdef NSWBUF_MIN + nswbuf = min(nbuf / 4, 256); + TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); if (nswbuf < NSWBUF_MIN) nswbuf = NSWBUF_MIN; -#endif /* * Reserve space for the buffer cache buffers |