Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_bio.c
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
#include <sys/kthread.h> | #include <sys/kthread.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/racct.h> | #include <sys/racct.h> | ||||
#include <sys/refcount.h> | #include <sys/refcount.h> | ||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/sysproto.h> | #include <sys/syscallsubr.h> | ||||
#include <sys/vmem.h> | #include <sys/vmem.h> | ||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <sys/watchdog.h> | #include <sys/watchdog.h> | ||||
#include <geom/geom.h> | #include <geom/geom.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/vm_kern.h> | #include <vm/vm_kern.h> | ||||
▲ Show 20 Lines • Show All 1,253 Lines • ▼ Show 20 Lines | |||||
#ifndef PREEMPTION | #ifndef PREEMPTION | ||||
int subiter; | int subiter; | ||||
#endif | #endif | ||||
/* | /* | ||||
* Sync filesystems for shutdown | * Sync filesystems for shutdown | ||||
*/ | */ | ||||
wdog_kern_pat(WD_LASTVAL); | wdog_kern_pat(WD_LASTVAL); | ||||
sys_sync(curthread, NULL); | kern_sync(curthread); | ||||
/* | /* | ||||
* With soft updates, some buffers that are | * With soft updates, some buffers that are | ||||
* written will be remarked as dirty until other | * written will be remarked as dirty until other | ||||
* buffers are written. | * buffers are written. | ||||
*/ | */ | ||||
for (iter = pbusy = 0; iter < 20; iter++) { | for (iter = pbusy = 0; iter < 20; iter++) { | ||||
nbusy = 0; | nbusy = 0; | ||||
Show All 10 Lines | if (first_buf_printf) { | ||||
first_buf_printf = 0; | first_buf_printf = 0; | ||||
} | } | ||||
printf("%d ", nbusy); | printf("%d ", nbusy); | ||||
if (nbusy < pbusy) | if (nbusy < pbusy) | ||||
iter = 0; | iter = 0; | ||||
pbusy = nbusy; | pbusy = nbusy; | ||||
wdog_kern_pat(WD_LASTVAL); | wdog_kern_pat(WD_LASTVAL); | ||||
sys_sync(curthread, NULL); | kern_sync(curthread); | ||||
#ifdef PREEMPTION | #ifdef PREEMPTION | ||||
/* | /* | ||||
* Spin for a while to allow interrupt threads to run. | * Spin for a while to allow interrupt threads to run. | ||||
*/ | */ | ||||
DELAY(50000 * iter); | DELAY(50000 * iter); | ||||
#else | #else | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 4,083 Lines • Show Last 20 Lines |