MCPcopy Create free account
hub / github.com/F-Stack/f-stack / maxbcachebuf_adjust

Function maxbcachebuf_adjust

freebsd/kern/vfs_bio.c:989–1007  ·  view source on GitHub ↗

* Adjust the maxbcachbuf tunable. */

Source from the content-addressed store, hash-verified

987 * Adjust the maxbcachbuf tunable.
988 */
989static void
990maxbcachebuf_adjust(void)
991{
992 int i;
993
994 /*
995 * maxbcachebuf must be a power of 2 >= MAXBSIZE.
996 */
997 i = 2;
998 while (i * 2 <= maxbcachebuf)
999 i *= 2;
1000 maxbcachebuf = i;
1001 if (maxbcachebuf < MAXBSIZE)
1002 maxbcachebuf = MAXBSIZE;
1003 if (maxbcachebuf > maxphys)
1004 maxbcachebuf = maxphys;
1005 if (bootverbose != 0 && maxbcachebuf != MAXBCACHEBUF)
1006 printf("maxbcachebuf=%d\n", maxbcachebuf);
1007}
1008
1009/*
1010 * bd_speedup - speedup the buffer cache flushing code

Callers 1

Calls 1

printfFunction · 0.70

Tested by

no test coverage detected