* Adjust the maxbcachbuf tunable. */
| 987 | * Adjust the maxbcachbuf tunable. |
| 988 | */ |
| 989 | static void |
| 990 | maxbcachebuf_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 |
no test coverage detected