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

Function init_param1

freebsd/kern/subr_param.c:169–240  ·  view source on GitHub ↗

* Boot time overrides that are not scaled against main memory */

Source from the content-addressed store, hash-verified

167 * Boot time overrides that are not scaled against main memory
168 */
169void
170init_param1(void)
171{
172
173#if !defined(__mips__) && !defined(__arm64__)
174 TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages);
175#endif
176 hz = -1;
177 TUNABLE_INT_FETCH("kern.hz", &hz);
178 if (hz == -1)
179 hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ;
180 tick = 1000000 / hz;
181 tick_sbt = SBT_1S / hz;
182 tick_bt = sbttobt(tick_sbt);
183
184 /*
185 * Arrange for ticks to wrap 10 minutes after boot to help catch
186 * sign problems sooner.
187 */
188#ifndef FSTACK
189 ticks = INT_MAX - (hz * 10 * 60);
190#endif
191 vn_lock_pair_pause_max = hz / 100;
192 if (vn_lock_pair_pause_max == 0)
193 vn_lock_pair_pause_max = 1;
194
195#ifdef VM_SWZONE_SIZE_MAX
196 maxswzone = VM_SWZONE_SIZE_MAX;
197#endif
198 TUNABLE_LONG_FETCH("kern.maxswzone", &maxswzone);
199#ifdef VM_BCACHE_SIZE_MAX
200 maxbcache = VM_BCACHE_SIZE_MAX;
201#endif
202 TUNABLE_LONG_FETCH("kern.maxbcache", &maxbcache);
203 msgbufsize = MSGBUF_SIZE;
204 TUNABLE_INT_FETCH("kern.msgbufsize", &msgbufsize);
205
206 maxtsiz = MAXTSIZ;
207 TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz);
208 dfldsiz = DFLDSIZ;
209 TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz);
210 maxdsiz = MAXDSIZ;
211 TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz);
212 dflssiz = DFLSSIZ;
213 TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz);
214 maxssiz = MAXSSIZ;
215 TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz);
216 sgrowsiz = SGROWSIZ;
217 TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz);
218
219 /*
220 * Let the administrator set {NGROUPS_MAX}, but disallow values
221 * less than NGROUPS_MAX which would violate POSIX.1-2008 or
222 * greater than INT_MAX-1 which would result in overflow.
223 */
224 ngroups_max = NGROUPS_MAX;
225 TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max);
226 if (ngroups_max < NGROUPS_MAX)

Callers 14

init386Function · 0.85
mips_initFunction · 0.85
platform_startFunction · 0.85
platform_startFunction · 0.85
platform_startFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
hammer_timeFunction · 0.85
initarmFunction · 0.85

Calls 1

sbttobtFunction · 0.85

Tested by

no test coverage detected