Date: Wed, 15 Oct 2014 19:46:50 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r273148 - stable/9/sys/kern Message-ID: <201410151946.s9FJkocX024301@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Oct 15 19:46:49 2014 New Revision: 273148 URL: https://svnweb.freebsd.org/changeset/base/273148 Log: Make kern.nswbuf tunable from loader. Modified: stable/9/sys/kern/vfs_bio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Wed Oct 15 19:41:51 2014 (r273147) +++ stable/9/sys/kern/vfs_bio.c Wed Oct 15 19:46:49 2014 (r273148) @@ -520,6 +520,10 @@ bd_speedup(void) mtx_unlock(&bdlock); } +#ifndef NSWBUF_MIN +#define NSWBUF_MIN 16 +#endif + #ifdef __i386__ #define TRANSIENT_DENOM 5 #else @@ -631,11 +635,10 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon * 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 #ifdef DIRECTIO ffs_rawread_setup(); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410151946.s9FJkocX024301>