vm6 016cc4a, vmcore.416 KDB: debugger backends: ddb KDB: current backend: ddb 524288K of memory above 4GB ignored Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-CURRENT #0 r202935+016cc4a-dirty: Mon Jan 25 13:22:04 CET 2010 pho@x4.osted.lan:/var/tmp/deviant2/sys/i386/compile/PHO i386 WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Phenom(tm) 9150e Quad-Core Processor (1799.99-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x100f23 Stepping = 3 Features=0x178bfbff Features2=0x802009 AMD Features=0xee500800 AMD Features2=0x7ff TSC: P-state invariant real memory = 4294967296 (4096 MB) avail memory = 3536150528 (3372 MB) : Trying to mount root from ufs:/dev/ad4s1a Entropy harvesting: interrupts ethernet point_to_point kickstart. /dev/ad4s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad4s1a: clean, 200645 free (1461 frags, 24898 blocks, 0.1% fragmentation) /dev/ad4s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad4s1e: clean, 49752772 free (2284 frags, 6218811 blocks, 0.0% fragmentation) /dev/ad4s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad4s1f: clean, 3935513 free (228585 frags, 463366 blocks, 1.0% fragmentation) /dev/ad4s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad4s1d: clean, 13114438 free (78534 frags, 1629488 blocks, 0.2% fragmentation) Additional TCP/IP options: rfc1323 extensions=NO no-ipv4-mapped-ipv6. re0: link state changed to DOWN Starting Network: lo0 re0 fwe0 fwip0. Starting Network: fwe0. Starting Network: fwip0. add net default: gateway 192.168.1.1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 add net fe80::: gateway ::1 add net ff02::: gateway ::1 Additional ABI support: linux. lock order reversal: 1st 0xe6cfd340 bufwait (bufwait) @ kern/vfs_bio.c:2559 2nd 0xc7427c00 dirhash (dirhash) @ ufs/ufs/ufs_dirhash.c:285 KDB: stack backtrace: db_trace_self_wrapper(c0ca7aa7,f6247864,c08d8775,c08c91bb,c0caaa58,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c91bb,c0caaa58,c6d2efc8,c6d32910,f62478c0,...) at kdb_backtrace+0x29 _witness_debugger(c0caaa58,c7427c00,c0ccd033,c6d32910,c0ccccc5,...) at _witness_debugger+0x25 witness_checkorder(c7427c00,9,c0ccccbc,11d,0,...) at witness_checkorder+0x839 _sx_xlock(c7427c00,0,c0ccccbc,11d,c761de0c,...) at _sx_xlock+0x85 ufsdirhash_acquire(e6cfd2e0,f6247a1c,ec,e72a7b24,f6247990,...) at ufsdirhash_acquire+0x48 ufsdirhash_add(c761de0c,f6247a1c,2b24,f624797c,f6247980,...) at ufsdirhash_add+0x13 ufs_direnter(c76182d0,c77dc168,f6247a1c,f6247c00,e6cfdb00,...) at ufs_direnter+0x779 ufs_mkdir(f6247c28,c0ce2b61,0,0,f6247b6c,...) at ufs_mkdir+0x92e VOP_MKDIR_APV(c0db3140,f6247c28,f6247c00,f6247b6c,0,...) at VOP_MKDIR_APV+0xc5 kern_mkdirat(c7757240,ffffff9c,bfbfef5a,0,1ff,...) at kern_mkdirat+0x21b kern_mkdir(c7757240,bfbfef5a,0,1ff,f6247d2c,...) at kern_mkdir+0x2e mkdir(c7757240,f6247cf8,c0cdfb9b,c0cab300,c77537f8,...) at mkdir+0x29 syscall(f6247d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (136, FreeBSD ELF32, mkdir), eip = 0x2816b9b3, esp = 0xbfbfed6c, ebp = 0xbfbfee38 --- Configuring syscons: keymap blanktime. Local package initialization:lock order reversal: 1st 0xc76185f8 ufs (ufs) @ kern/vfs_mount.c:1204 2nd 0xc7619058 devfs (devfs) @ ufs/ffs/ffs_softdep.c:1031 KDB: stack backtrace: db_trace_self_wrapper(c0ca7aa7,f61729dc,c08d8775,c08c91bb,c0caaa58,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c91bb,c0caaa58,c6d328a8,c6d32770,f6172a38,...) at kdb_backtrace+0x29 _witness_debugger(c0caaa58,c7619058,c0c98eca,c6d32770,c0ccae83,...) at _witness_debugger+0x25 witness_checkorder(c7619058,9,c0ccae7a,407,c76190c4,...) at witness_checkorder+0x839 __lockmgr_args(c7619058,80400,c76190c4,0,0,...) at __lockmgr_args+0x804 vop_stdlock(f6172b54,4,c0ca2cf1,80400,c7619000,...) at vop_stdlock+0x65 VOP_LOCK1_APV(c0d8d400,f6172b54,c0f7b004,c0dcdfc0,c7619000,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c7619000,80400,c0ccae7a,407,c76215a8,...) at _vn_lock+0x78 softdep_flushworklist(c76215a8,f6172c00,c741f6c0,553,c0cb267c,...) at softdep_flushworklist+0x47 ffs_sync(c76215a8,1,c0cb13e3,4f9,80,...) at ffs_sync+0x2fd dounmount(c76215a8,8000000,c741f6c0,47e,ff1ca3a5,...) at dounmount+0x44e unmount(c741f6c0,f6172cf8,c,c741f6c0,c7425000,...) at unmount+0x2ff syscall(f6172d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (22, FreeBSD ELF32, unmount), eip = 0x280da8cf, esp = 0xbfbfe68c, ebp = 0xbfbfe758 --- ** /dev/ad4s1e ** Last Mounted on /tmp ** Phase 1 - Check Blocks and Sizes lock order reversal: 1st 0xc74f3e68 syncer (syncer) @ kern/vfs_subr.c:1703 2nd 0xc7b09058 ufs (ufs) @ kern/vfs_subr.c:2093 KDB: stack backtrace: db_trace_self_wrapper(c0ca7aa7,f3f61a18,c08d8775,c08c91bb,c0caaa58,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c08c91bb,c0caaa58,c6d32978,c6d328a8,f3f61a74,...) at kdb_backtrace+0x29 _witness_debugger(c0caaa58,c7b09058,c0c9d00c,c6d328a8,c0cb1bee,...) at _witness_debugger+0x25 Expensive timeout(9) function: 0xc076f2e0(0xc0fcf860) 0.011781442 s witness_checkorder(c7b09058,9,c0cb1be5,82d,0,...) at witness_checkorder+0x839 __lockmgr_args(c7b09058,80500,c7b090c4,0,0,...) at __lockmgr_args+0x804 ffs_lock(f3f61b94,c08d851b,c0cb1bee,80500,c7b09000,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0db3140,f3f61b94,c70eabe4,c0dcdfc0,c7b09000,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c7b09000,80500,c0cb1be5,82d,4,...) at _vn_lock+0x78 vget(c7b09000,80500,c70eab40,c73,f3f61c20,...) at vget+0xbb vfs_msync(c76212d4,2,c0cb1be5,d6c,c76212d4,...) at vfs_msync+0xf5 sync_fsync(f3f61c7c,c0ce230c,c74f3ed4,f3f61c7c,c74f3e10,...) at sync_fsync+0x17b VOP_FSYNC_APV(c0da2ec0,f3f61c7c,c0cb1be5,6a7,c70eab40,...) at VOP_FSYNC_APV+0xc5 sync_vnode(c0f6f718,c0f6f704,3e8,6d6,4e20,...) at sync_vnode+0x16b sched_sync(0,f3f61d38,c0c9f939,343,c73977f8,...) at sched_sync+0x273 fork_exit(c0929af0,0,f3f61d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f61d70, ebp = 0 --- vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 16384 at 99520 Jan 25 16:44:39 x4 kernel: pid 18 (syncer), uid 0 inumber 212050 on /: filesystem full vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 187753 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 111391 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 204428 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 132579 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 225871 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 151856 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 245260 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 173641 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 102780 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 195410 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 122313 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 213366 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 141809 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 234831 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 163030 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 253898 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 181425 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 106799 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 199472 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 126762 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 218189 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 141301 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 234278 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 158843 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 250918 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 172010 ** Phase 2 - Check Pathnames vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 255647 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 169196 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 246551 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 158162 Jan 25 16:45:10 x4 last message repeated 30 times ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 237438 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 151961 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 231182 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 144465 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 222015 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 137630 50068 files, 1024303 used, 49752772 free (2284 frags, 6218811 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN ***** vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 212762 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 123135 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 194933 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 104664 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 177102 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 251596 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 159550 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 233286 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 142241 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 214877 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 125521 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 197573 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 107388 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 180116 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 254862 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 162565 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 236821 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 146194 : vnode_pager_putpages: residual I/O 65536 at 137305 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 209804 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 120460 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 192692 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 103618 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 176809 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 252084 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 160726 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 235453 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 145399 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 218497 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 128893 vnode_pager_putpages: I/O error 28 vnode_pager_putpages: residual I/O 65536 at 200753 ~KDB: enter: Line break on console [thread pid 11 tid 100005 ] Stopped at kdb_enter+0x3a: movl $0,kdb_why db> run pho db:0:pho> bt Tracing pid 11 tid 100005 td 0xc6d7a6c0 kdb_enter(c0c4cc09,c0c8d434,c0e0325c,c70d1080,0,...) at kdb_enter+0x3a uart_intr(c70d1000,c6d7a6c0,c6d588d0,c6d7e100,4,...) at uart_intr+0x126 intr_event_handle(c6d7e100,c6b30c2c,1,1f4,c6fc3000,...) at intr_event_handle+0x5c intr_execute_handlers(c6d588d0,c6b30c2c,1,c6b30c6c,c0bb33c4,...) at intr_execute_handlers+0x49 lapic_handle_intr(30,c6b30c2c) at lapic_handle_intr+0x4c Xapic_isr1() at Xapic_isr1+0x34 --- interrupt, eip = 0xc0ba77e5, esp = 0xc6b30c6c, ebp = 0xc6b30c6c --- acpi_cpu_c1(c0bb35df,c6b30cd4,1,ffffffff,c6b30cb4,...) at acpi_cpu_c1+0x5 acpi_cpu_idle(ffffffff,0,c6b30cb4,c0bbef9b,1,...) at acpi_cpu_idle+0x11c cpu_idle_amdc1e(1,c6b30cf8,c08b808e,1,c6b30cd4,...) at cpu_idle_amdc1e+0x56 cpu_idle(1,c6b30cd4,c0ca61b6,9fa,c6d7a6c0,...) at cpu_idle+0x1b sched_idletd(0,c6b30d38,c0c9f939,343,c6d78aa0,...) at sched_idletd+0x23e fork_exit(c08b7e50,0,c6b30d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b30d70, ebp = 0 --- db:0:bt> show allpcpu Current CPU: 1 cpuid = 0 dynamic pcpu = 0x656900 curthread = 0xc6d7a480: pid 11 "idle: cpu0" curpcb = 0xc6b33d90 fpcurthread = none idlethread = 0xc6d7a480: pid 11 "idle: cpu0" APIC ID = 0 currentldt = 0x50 spin locks held: cpuid = 1 dynamic pcpu = 0x5d3b900 curthread = 0xc6d7a6c0: pid 11 "idle: cpu1" curpcb = 0xc6b30d90 fpcurthread = none idlethread = 0xc6d7a6c0: pid 11 "idle: cpu1" APIC ID = 1 currentldt = 0x50 spin locks held: cpuid = 2 dynamic pcpu = 0x5d3e900 curthread = 0xc70eab40: pid 18 "syncer" curpcb = 0xf3f61d90 fpcurthread = none idlethread = 0xc6d7a900: pid 11 "idle: cpu2" APIC ID = 2 currentldt = 0x50 spin locks held: cpuid = 3 dynamic pcpu = 0x5d41900 curthread = 0xc6d7ab40: pid 11 "idle: cpu3" curpcb = 0xc6b2ad90 fpcurthread = none idlethread = 0xc6d7ab40: pid 11 "idle: cpu3" APIC ID = 3 currentldt = 0x50 spin locks held: db:0:allpcpu> show alllocks Process 8985 (ls) thread 0xc7757900 (100183) shared lockmgr ufs (ufs) r = 0 (0xc76185f8) locked @ kern/vfs_lookup.c:497 Process 8483 (sshd) thread 0xc7d24240 (100165) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc7cfc6fc) locked @ kern/uipc_sockbuf.c:148 Process 8317 (mount) thread 0xc7459480 (100083) shared lockmgr ufs (ufs) r = 0 (0xc7186e68) locked @ kern/vfs_lookup.c:497 Process 8276 (sshd) thread 0xc746e900 (100088) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc791e08c) locked @ kern/uipc_sockbuf.c:148 Process 8275 (sshd) thread 0xc7645480 (100111) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc791f6fc) locked @ kern/uipc_sockbuf.c:148 Process 8273 (sshd) thread 0xc746e000 (100118) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc764e898) locked @ kern/uipc_sockbuf.c:148 Process 8270 (rm) thread 0xc7420b40 (100150) shared lockmgr ufs (ufs) r = 0 (0xc76185f8) locked @ kern/vfs_subr.c:2093 Process 1280 (sshd) thread 0xc7645b40 (100108) exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc78a2228) locked @ kern/uipc_sockbuf.c:148 Process 18 (syncer) thread 0xc70eab40 (100072) exclusive lockmgr bufwait (bufwait) r = 0 (0xe6dde100) locked @ kern/vfs_bio.c:2559 exclusive lockmgr ufs (ufs) r = 0 (0xc76681c0) locked @ kern/vfs_subr.c:2093 exclusive lockmgr syncer (syncer) r = 0 (0xc7618a30) locked @ kern/vfs_subr.c:1703 db:0:alllocks> show lockedvnods Locked vnodes 0xc7186e10: tag ufs, type VDIR usecount 75, writecount 0, refcount 78 mountedhere 0 flags (VV_ROOT) v_object 0xc158faa0 ref 0 pages 1 lock type ufs: SHARED (count 1) #0 0xc087a782 at __lockmgr_args+0x592 #1 0xc0ad6741 at ffs_lock+0xa1 #2 0xc0be9e55 at VOP_LOCK1_APV+0xb5 #3 0xc0935088 at _vn_lock+0x78 #4 0xc091bc46 at lookup+0x106 #5 0xc091cfff at namei+0x57f #6 0xc092c6c2 at kern_statat_vnhook+0x72 #7 0xc092c81c at kern_statat+0x3c #8 0xc092c966 at kern_stat+0x36 #9 0xc092ca0f at stat+0x2f #10 0xc0bd0e90 at syscall+0x230 #11 0xc0bb3060 at Xint0x80_syscall+0x20 ino 2, on dev ad4s1a 0xc76189d8: tag syncer, type VNON usecount 1, writecount 0, refcount 2 mountedhere 0 flags () lock type syncer: EXCL by thread 0xc70eab40 (pid 18) #0 0xc087adee at __lockmgr_args+0xbfe #1 0xc09174f5 at vop_stdlock+0x65 #2 0xc0be9e55 at VOP_LOCK1_APV+0xb5 #3 0xc0935088 at _vn_lock+0x78 #4 0xc09299f2 at sync_vnode+0x142 #5 0xc0929d63 at sched_sync+0x273 #6 0xc0867ea8 at fork_exit+0xb8 #7 0xc0bb3070 at fork_trampoline+0x8 0xc76185a0: tag ufs, type VDIR usecount 4, writecount 0, refcount 8 mountedhere 0 flags () v_object 0xc7af1d48 ref 0 pages 1 lock type ufs: SHARED (count 2) with exclusive waiters pending #0 0xc087a782 at __lockmgr_args+0x592 #1 0xc0ad6741 at ffs_lock+0xa1 #2 0xc0be9e55 at VOP_LOCK1_APV+0xb5 #3 0xc0935088 at _vn_lock+0x78 #4 0xc091bc46 at lookup+0x106 #5 0xc091cfff at namei+0x57f #6 0xc092c6c2 at kern_statat_vnhook+0x72 #7 0xc092c81c at kern_statat+0x3c #8 0xc092c856 at kern_lstat+0x36 #9 0xc092c8ff at lstat+0x2f #10 0xc0bd0e90 at syscall+0x230 #11 0xc0bb3060 at Xint0x80_syscall+0x20 ino 211968, on dev ad4s1a 0xc7668168: tag ufs, type VREG usecount 1, writecount 0, refcount 7042 mountedhere 0 flags () v_object 0xc7af1550 ref 0 pages 262200 lock type ufs: EXCL by thread 0xc70eab40 (pid 18) with shared waiters pending #0 0xc087adee at __lockmgr_args+0xbfe #1 0xc0ad6741 at ffs_lock+0xa1 #2 0xc0be9e55 at VOP_LOCK1_APV+0xb5 #3 0xc0935088 at _vn_lock+0x78 #4 0xc092804b at vget+0xbb #5 0xc09294b5 at vfs_msync+0xf5 #6 0xc092978b at sync_fsync+0x17b #7 0xc0be7a55 at VOP_FSYNC_APV+0xc5 #8 0xc0929a1b at sync_vnode+0x16b #9 0xc0929d63 at sched_sync+0x273 #10 0xc0867ea8 at fork_exit+0xb8 #11 0xc0bb3070 at fork_trampoline+0x8 ino 212050, on dev ad4s1a db:0:lockedvnods> show mount 0xc73adb50 /dev/ad4s1a on / (ufs) 0xc73ae000 devfs on /dev (devfs) 0xc76212d4 /dev/ad4s1f on /usr (ufs) 0xc7621000 /dev/ad4s1d on /var (ufs) 0xc73aeb50 procfs on /proc (procfs) More info: show mount db:0:mount> ps pid ppid pgrp uid state wmesg wchan cmd 9137 8285 8283 1001 S nanslp 0xc0e031e4 sleep 8985 8492 8985 0 D+ ufs 0xc76681c0 ls 8492 8491 8492 0 S+ ttyin 0xc7cf9e70 csh 8491 8486 8491 1001 S+ wait 0xc7753d48 su 8486 8485 8486 1001 Ss+ wait 0xc77592a8 bash 8485 8483 8483 1001 S select 0xc7cf68e4 sshd 8483 1248 8483 0 Ss sbwait 0xc7cfc728 sshd 8317 1276 22 0 D+ ufs 0xc76185f8 mount 8286 8283 8283 1001 S piperd 0xc765b7a8 awk 8285 8283 8283 1001 S wait 0xc7754aa0 sh 8284 8281 8284 1001 Ss+ select 0xc7cf81e4 top 8283 8282 8283 1001 Ss wait 0xc763e550 sh 8282 8276 8276 1001 S select 0xc7cf7624 sshd 8281 8275 8275 1001 S select 0xc7cf7ce4 sshd 8280 8279 8280 1001 Ss kqread 0xc7622200 tail 8279 8273 8273 1001 S select 0xc76475a4 sshd 8276 1248 8276 0 Ss sbwait 0xc791e0b8 sshd 8275 1248 8275 0 Ss sbwait 0xc791f728 sshd 8273 1248 8273 0 Ss sbwait 0xc764e8c4 sshd 8270 1295 8270 1001 D+ ufs 0xc76681c0 rm 1295 1294 1295 1001 Ss+ wait 0xc7753000 bash 1294 1280 1280 1001 S select 0xc746b6e4 sshd 1280 1248 1280 0 Ss sbwait 0xc78a2254 sshd 1276 1275 22 0 S+ wait 0xc763f2a8 sh 1275 1271 22 0 S+ wait 0xc77542a8 sh 1271 22 22 0 S+ wait 0xc763f550 sh 1267 1 1267 0 Ss nanslp 0xc0e031e4 cron 1260 1 1260 25 Ss pause 0xc763e300 sendmail 1256 1 1256 0 Ss select 0xc7647e64 sendmail 1248 1 1248 0 Ss select 0xc7647224 sshd 1203 1 1203 0 Ss select 0xc7374e64 ntpd 1064 1 1064 0 Ss select 0xc7647664 moused 1031 1 1031 0 Ss rpcsvc 0xc73738d0 NLM: master 1024 1 1024 0 Ss select 0xc70f6064 rpc.statd 1017 1016 1016 0 S (threaded) nfsd 100149 S rpcsvc 0xc746da90 nfsd: service 100148 S rpcsvc 0xc73b3910 nfsd: service 100147 S rpcsvc 0xc746dad0 nfsd: service 100113 S rpcsvc 0xc7647010 nfsd: master 1016 1 1016 0 Ss select 0xc73b49a4 nfsd 1007 1 1007 0 Ss select 0xc73b3464 mountd 914 1 914 0 Ss select 0xc746bce4 rpcbind 880 1 880 0 Ss select 0xc70f60e4 syslogd 698 1 698 0 Ss select 0xc73735a4 devd 22 1 22 0 Ss+ wait 0xc6f48d48 sh 21 0 0 0 RL [flowcleaner] 20 0 0 0 DL sdflush 0xc0f7b060 [softdepflush] 19 0 0 0 DL vlruwt 0xc7397550 [vnlru] 18 0 0 0 RL CPU 2 [syncer] 17 0 0 0 DL psleep 0xc0f6f448 [bufdaemon] 16 0 0 0 DL pgzero 0xc0f7bedc [pagezero] 15 0 0 0 DL psleep 0xc0f7bac4 [vmdaemon] 9 0 0 0 DL writed 0xc0f7bea4 [writed] 8 0 0 0 DL psleep 0xc0f7ba8c [pagedaemon] 7 0 0 0 DL - 0xc6fc363c [fdc0] 6 0 0 0 SL - 0xc6ff7000 [fw0_probe] 14 0 0 0 DL (threaded) [usb] 100058 D - 0xc6fd8d0c [usbus5] 100057 D - 0xc6fd8cdc [usbus5] 100056 D - 0xc6fd8cac [usbus5] 100055 D - 0xc6fd8c7c [usbus5] 100053 D - 0xc6fc9b5c [usbus4] 100052 D - 0xc6fc9b2c [usbus4] 100051 D - 0xc6fc9afc [usbus4] 100050 D - 0xc6fc9acc [usbus4] 100049 D - 0xc6fc5b5c [usbus3] 100048 D - 0xc6fc5b2c [usbus3] 100047 D - 0xc6fc5afc [usbus3] 100046 D - 0xc6fc5acc [usbus3] 100045 D - 0xc6fbeb5c [usbus2] 100044 D - 0xc6fbeb2c [usbus2] 100043 D - 0xc6fbeafc [usbus2] 100042 D - 0xc6fbeacc [usbus2] 100040 D - 0xc6fb8b5c [usbus1] 100039 D - 0xc6fb8b2c [usbus1] 100038 D - 0xc6fb8afc [usbus1] 100037 D - 0xc6fb8acc [usbus1] 100035 D - 0xc6faab5c [usbus0] 100034 D - 0xc6faab2c [usbus0] 100033 D - 0xc6faaafc [usbus0] 100032 D - 0xc6faaacc [usbus0] 5 0 0 0 DL ccb_scan 0xc0dcf3d4 [xpt_thrd] 13 0 0 0 DL - 0xc0e03044 [yarrow] 4 0 0 0 DL - 0xc0e00de4 [g_down] 3 0 0 0 DL - 0xc0e00de0 [g_up] 2 0 0 0 DL - 0xc0e00dd8 [g_event] 12 0 0 0 RL (threaded) [intr] 100066 I [irq12: psm0] 100065 I [irq1: atkbd0] 100063 I [swi0: uart] 100060 I [irq20: fwohci0] 100059 I [irq14: ata0] 100054 I [irq19: ehci0] 100041 I [irq18: ohci2 ohci4] 100036 I [irq17: ohci1 ohci3] 100031 I [irq16: hdac1 ohci0] 100030 I [irq22: atapci0] 100029 I [irq256: hdac0] 100028 I [irq9: acpi0] 100023 I [swi2: cambio] 100021 I [swi6: task queue] 100020 I [swi6: Giant taskq] 100018 I [swi5: +] 100012 I [swi1: netisr 0] 100011 I [swi3: vm] 100010 I [swi4: clock] 100009 I [swi4: clock] 100008 I [swi4: clock] 100007 RunQ [swi4: clock] 11 0 0 0 RL (threaded) [idle] 100006 Run CPU 0 [idle: cpu0] 100005 Run CPU 1 [idle: cpu1] 100004 CanRun [idle: cpu2] 100003 Run CPU 3 [idle: cpu3] 1 0 1 0 SLs wait 0xc6d78d48 [init] 10 0 0 0 DL audit_wo 0xc0f7a980 [audit] 0 0 0 0 DLs (threaded) [kernel] 100061 D - 0xc6fa4900 [fw0_taskq] 100027 D - 0xc6f46040 [kqueue taskq] 100026 D - 0xc6f46080 [acpi_task_2] 100025 D - 0xc6f46080 [acpi_task_1] 100024 D - 0xc6f46080 [acpi_task_0] 100019 D - 0xc6f46300 [thread taskq] 100016 D - 0xc6d5fe40 [firmware taskq] 100000 D sched 0xc0e00ec0 [swapper] db:0:ps> allt Tracing command sleep pid 9137 tid 100174 td 0xc775cd80 sched_switch(c775cd80,0,104,191,77c7a2a4,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c775cd80,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(2711,c08cedc0,c775cd80,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0e031e4,5c,c0ca5867,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0e031e4,0,15c,c0ca5867,2711,...) at _sleep+0x31e kern_nanosleep(c775cd80,f6344c64,f6344c6c,a,0,...) at kern_nanosleep+0xc1 nanosleep(c775cd80,f6344cf8,c,c775cd80,c7d4a7f8,...) at nanosleep+0x6f syscall(f6344d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2815eed7, esp = 0xbfbfecbc, ebp = 0xbfbfecf8 --- Tracing command ls pid 8985 tid 100183 td 0xc7757900 sched_switch(c7757900,0,104,191,d93204c2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7757900,0,c0ca8bd1,260,c76681c0,...) at sleepq_switch+0x15f sleepq_wait(c76681c0,50,c0c9d00c,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c76681c0,200100,c766822c,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(f635f914,c08d851b,c0cb0a69,200100,c7668168,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0db3140,f635f914,c77579a4,c0dcdfc0,c7668168,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c7668168,200100,c0cb1be5,82d,0,...) at _vn_lock+0x78 vget(c7668168,200100,c7757900,231,0,...) at vget+0xbb cache_lookup(c76185a0,f635fb74,f635fb88,f635fb74,c73bcc80,...) at cache_lookup+0x67b vfs_cache_lookup(f635fa50,c0cb28f5,c0dcdc00,200000,f635fb5c,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0db3140,f635fa50,f635fb88,1f1,f635fb74,...) at VOP_LOOKUP_APV+0xe5 lookup(f635fb5c,c0cb11d7,ea,c5,ffffff9c,...) at lookup+0x67b namei(f635fb5c,f635fafc,60,0,c7757900,...) at namei+0x57f kern_statat_vnhook(c7757900,200,ffffff9c,2822e778,0,...) at kern_statat_vnhook+0x72 kern_statat(c7757900,200,ffffff9c,2822e778,0,...) at kern_statat+0x3c kern_lstat(c7757900,2822e778,0,f635fc18,62,...) at kern_lstat+0x36 lstat(c7757900,f635fcf8,c0cdfb9b,c0cab290,c7d49000,...) at lstat+0x2f syscall(f635fd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (190, FreeBSD ELF32, lstat), eip = 0x281be973, esp = 0xbfbfe38c, ebp = 0xbfbfe418 --- Tracing command csh pid 8492 tid 100086 td 0xc7459240 sched_switch(c7459240,0,104,191,7679921a,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7459240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7cf9e04,0,c0ca2cf1,c7459240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7cf9e70,0,f6182b0c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7cf9e70,c7cf9e04,c0cacb6f,511,0,...) at _cv_wait_sig+0x240 tty_wait(c7cf9e00,c7cf9e70,f6182c58,1,0,...) at tty_wait+0x71 ttydisc_read(c7cf9e00,f6182c58,0,9f,0,...) at ttydisc_read+0x22c ttydev_read(c7399300,f6182c58,0,0,1,...) at ttydev_read+0xaa devfs_read_f(c7923150,f6182c58,c73bcc80,0,c7459240,...) at devfs_read_f+0x7e dofileread(f6182c58,ffffffff,ffffffff,0,c7923150,...) at dofileread+0x96 kern_readv(c7459240,10,f6182c58,f6182c78,1,...) at kern_readv+0x58 read(c7459240,f6182cf8,c0cdfb9b,c0c8c22e,c74552a8,...) at read+0x4f syscall(f6182d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x282205c3, esp = 0xbfbfe6cc, ebp = 0xbfbfe6e8 --- Tracing command su pid 8491 tid 100125 td 0xc746ed80 sched_switch(c746ed80,0,104,191,96cf85c7,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c746ed80,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7753d48,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7753d48,c7753dd0,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c746ed80,212c,f6241c74,2,0,...) at kern_wait+0xb76 wait4(c746ed80,f6241cf8,c,c746ed80,c7753d48,...) at wait4+0x3b syscall(f6241d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2811f6bb, esp = 0xbfbfe62c, ebp = 0xbfbfe648 --- Tracing command bash pid 8486 tid 100155 td 0xc7b4c6c0 sched_switch(c7b4c6c0,0,104,191,54b97ab9,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7b4c6c0,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c77592a8,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c77592a8,c7759330,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c7b4c6c0,ffffffff,f630bc74,6,0,...) at kern_wait+0xb76 wait4(c7b4c6c0,f630bcf8,c0cdfb9b,c0cab2c4,c77592a8,...) at wait4+0x3b syscall(f630bd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x282bf6bb, esp = 0xbfbfe9ac, ebp = 0xbfbfe9c8 --- Tracing command sshd pid 8485 tid 100146 td 0xc7760240 sched_switch(c7760240,0,104,191,767c7694,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7760240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7cf68d0,0,c0ca2cf1,c7760240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7cf68e4,0,f6290a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7cf68e4,c7cf68d0,c0caae3b,603,c7401b98,...) at _cv_wait_sig+0x240 seltdwait(c7401b98,58,c7469b80,c7760240,200246,...) at seltdwait+0xa2 kern_select(c7760240,c,286030b8,286030dc,0,0,20,bfbfde60,0) at kern_select+0x4f4 select(c7760240,f6290cf8,c0cdfb9b,c0c8c22e,c775a2a8,...) at select+0x66 syscall(f6290d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 8483 tid 100165 td 0xc7d24240 sched_switch(c7d24240,0,104,191,7460084f,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c7d24240,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7cfc728,58,c0cae931,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7cfc728,c7cfc6e8,158,c0cae931,0) at _sleep+0x354 sbwait(c7cfc6c4,4,c0caea00,5c5,c7cfc6e8,...) at sbwait+0x76 soreceive_generic(c7cfc670,0,f6329c58,0,0,...) at soreceive_generic+0x3f0 soreceive(c7cfc670,0,f6329c58,0,0,0) at soreceive+0x38 soo_read(c7abf3b8,f6329c58,c7622a80,0,c7d24240,...) at soo_read+0x4e dofileread(f6329c58,ffffffff,ffffffff,0,c7abf3b8,...) at dofileread+0x96 kern_readv(c7d24240,5,f6329c58,f6329c78,1,...) at kern_readv+0x58 read(c7d24240,f6329cf8,c0cdfb9b,c0cc68ed,c7d1faa0,...) at read+0x4f syscall(f6329d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x283cd5c3, esp = 0xbfbfde4c, ebp = 0xbfbfde88 --- Tracing command mount pid 8317 tid 100083 td 0xc7459480 sched_switch(c7459480,0,104,191,d055ee23,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7459480,0,c0ca8bd1,260,50,...) at sleepq_switch+0x15f sleepq_wait(c76185f8,50,c0c9d00c,4,0,...) at sleepq_wait+0x63 __lockmgr_args(c76185f8,80100,c7618664,0,0,...) at __lockmgr_args+0xb1f ffs_lock(f6176850,c08d851b,c0cb0a69,80100,c76185a0,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0db3140,f6176850,c7459524,c0dcdfc0,c76185a0,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c76185a0,80100,c0cb1be5,82d,0,...) at _vn_lock+0x78 vget(c76185a0,80100,c7459480,231,0,...) at vget+0xbb cache_lookup(c7186e10,f6176be4,f6176bf8,f6176be4,c6d7e380,...) at cache_lookup+0x67b vfs_cache_lookup(f617698c,c0cb28f5,c0dcdc00,80000,f6176bcc,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0db3140,f617698c,f6176bf8,1f1,f6176be4,...) at VOP_LOOKUP_APV+0xe5 lookup(f6176bcc,c0cb11d7,ea,c5,c7455550,...) at lookup+0x67b namei(f6176bcc,c7459480,f6176c34,334,0,...) at namei+0x57f vfs_donmount(c7459480,0,c7921200,c7921200,bfbfde59,...) at vfs_donmount+0x8ed nmount(c7459480,f6176cf8,c,c7459480,c7455550,...) at nmount+0x75 syscall(f6176d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280e840b, esp = 0xbfbfde2c, ebp = 0xbfbfe388 --- Tracing command awk pid 8286 tid 100131 td 0xc7755900 sched_switch(c7755900,0,104,191,778f16d9,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c7755900,0,c0ca8bd1,1a0,4c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c765b7a8,4c,c0caafec,100,0,...) at sleepq_wait_sig+0x17 _sleep(c765b7a8,c765b918,14c,c0caafec,0,...) at _sleep+0x354 pipe_read(c79230a8,f6253c58,c749e480,0,c7755900,...) at pipe_read+0x417 dofileread(f6253c58,ffffffff,ffffffff,0,c79230a8,...) at dofileread+0x96 kern_readv(c7755900,0,f6253c58,f6253c78,1,...) at kern_readv+0x58 read(c7755900,f6253cf8,16,c7755900,c763fd48,...) at read+0x4f syscall(f6253d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x281b35c3, esp = 0xbfbfe96c, ebp = 0xbfbfe988 --- Tracing command sh pid 8285 tid 100120 td 0xc7644900 sched_switch(c7644900,0,104,191,779ed286,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7644900,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7754aa0,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7754aa0,c7754b28,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c7644900,ffffffff,f6232c74,2,0,...) at kern_wait+0xb76 wait4(c7644900,f6232cf8,c0cdfb9b,c0cab3b4,c7754aa0,...) at wait4+0x3b syscall(f6232d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfe96c, ebp = 0xbfbfe988 --- Tracing command top pid 8284 tid 100156 td 0xc7b4c480 sched_switch(c7b4c480,0,104,191,6e030650,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7b4c480,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f630ea4c,c08825da,c7cf81d0,0,c7b4c480,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c7cf81e4,0,f630ea7c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c7cf81e4,c7cf81d0,3e9,603,c74a10e0,...) at _cv_timedwait_sig+0x250 seltdwait(f630ec28,f630ec30,c7622500,c7b4c480,333b335b,...) at seltdwait+0x8a kern_select(c7b4c480,2,bfbfebdc,0,0,f630ec70,20,1,0) at kern_select+0x4f4 select(c7b4c480,f630ecf8,c0cdfb9b,c0c8c22e,c7759000,...) at select+0x66 syscall(f630ed38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x281e9543, esp = 0xbfbfeb7c, ebp = 0xbfbfecd8 --- Tracing command sh pid 8283 tid 100109 td 0xc7645900 sched_switch(c7645900,0,104,191,19d6cb0e,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7645900,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c763e550,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c763e550,c763e5d8,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c7645900,ffffffff,f61e9c74,2,0,...) at kern_wait+0xb76 wait4(c7645900,f61e9cf8,c,c7645900,c763e550,...) at wait4+0x3b syscall(f61e9d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfeb7c, ebp = 0xbfbfeb98 --- Tracing command sshd pid 8282 tid 100136 td 0xc74656c0 sched_switch(c74656c0,0,104,191,ab821a2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c74656c0,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7cf7610,0,c0ca2cf1,c74656c0,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7cf7624,0,f6265a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7cf7624,c7cf7610,c0caae3b,603,c74a13b8,...) at _cv_wait_sig+0x240 seltdwait(c74a13b8,58,c7623200,c74656c0,c76412b8,...) at seltdwait+0xa2 kern_select(c74656c0,c,286030b8,286030dc,0,0,20,bfbfde60,0) at kern_select+0x4f4 select(c74656c0,f6265cf8,c0cdfb9b,c0cc68ed,c7455d48,...) at select+0x66 syscall(f6265d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 8281 tid 100098 td 0xc7456240 sched_switch(c7456240,0,104,191,6e047c3d,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7456240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7cf7cd0,0,c0ca2cf1,c7456240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7cf7ce4,0,f61b2a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7cf7ce4,c7cf7cd0,c0caae3b,603,c74a10a8,...) at _cv_wait_sig+0x240 seltdwait(c74a10a8,58,c7622800,c7456240,200246,...) at seltdwait+0xa2 kern_select(c7456240,a,286030b8,286030dc,0,0,20,bfbfde60,0) at kern_select+0x4f4 select(c7456240,f61b2cf8,c0cdfb9b,c0c8c22e,c7454000,...) at select+0x66 syscall(f61b2d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command tail pid 8280 tid 100142 td 0xc7760b40 sched_switch(c7760b40,0,104,191,bd2a44d7,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c7760b40,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(3e9,c08cedc0,c7760b40,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c7622200,58,c0c9f583,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c7622200,c7622200,158,c0c9f583,3e9,...) at _sleep+0x31e kern_kevent(c7760b40,4,0,1,f6280c58,...) at kern_kevent+0x364 kevent(c7760b40,f6280cf8,c0cdfb9b,c0c8c22e,c775ad48,...) at kevent+0x19b syscall(f6280d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (363, FreeBSD ELF32, kevent), eip = 0x2816303b, esp = 0xbfbfeb5c, ebp = 0xbfbfec18 --- Tracing command sshd pid 8279 tid 100102 td 0xc741e6c0 sched_switch(c741e6c0,0,104,191,bd2d6015,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741e6c0,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7647590,0,c0ca2cf1,c741e6c0,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c76475a4,0,f61cda7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c76475a4,c7647590,c0caae3b,603,c74a1348,...) at _cv_wait_sig+0x240 seltdwait(c74a1348,58,c7921400,c741e6c0,200246,...) at seltdwait+0xa2 kern_select(c741e6c0,c,286030b8,286030dc,0,0,20,bfbfde60,0) at kern_select+0x4f4 select(c741e6c0,f61cdcf8,c0cdfb9b,c0c8c22e,c763f7f8,...) at select+0x66 syscall(f61cdd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 8276 tid 100088 td 0xc746e900 sched_switch(c746e900,0,104,191,a8d82dc,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c746e900,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c791e0b8,58,c0cae931,100,0,...) at sleepq_wait_sig+0x17 _sleep(c791e0b8,c791e078,158,c0cae931,0) at _sleep+0x354 sbwait(c791e054,4,c0caea00,5c5,c791e078,...) at sbwait+0x76 soreceive_generic(c791e000,0,f618ac58,0,0,...) at soreceive_generic+0x3f0 soreceive(c791e000,0,f618ac58,0,0,0) at soreceive+0x38 soo_read(c7415bd0,f618ac58,c7469780,0,c746e900,...) at soo_read+0x4e dofileread(f618ac58,ffffffff,ffffffff,0,c7415bd0,...) at dofileread+0x96 kern_readv(c746e900,5,f618ac58,f618ac78,1,...) at kern_readv+0x58 read(c746e900,f618acf8,c,c746e900,c74642a8,...) at read+0x4f syscall(f618ad38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x283cd5c3, esp = 0xbfbfde4c, ebp = 0xbfbfde88 --- Tracing command sshd pid 8275 tid 100111 td 0xc7645480 sched_switch(c7645480,0,104,191,d5e7d2d,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c7645480,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c791f728,58,c0cae931,100,0,...) at sleepq_wait_sig+0x17 _sleep(c791f728,c791f6e8,158,c0cae931,0) at _sleep+0x354 sbwait(c791f6c4,4,c0caea00,5c5,c791f6e8,...) at sbwait+0x76 soreceive_generic(c791f670,0,f61f1c58,0,0,...) at soreceive_generic+0x3f0 soreceive(c791f670,0,f61f1c58,0,0,0) at soreceive+0x38 soo_read(c7415658,f61f1c58,c7469400,0,c7645480,...) at soo_read+0x4e dofileread(f61f1c58,ffffffff,ffffffff,0,c7415658,...) at dofileread+0x96 kern_readv(c7645480,5,f61f1c58,f61f1c78,1,...) at kern_readv+0x58 read(c7645480,f61f1cf8,c,c7645480,c763e000,...) at read+0x4f syscall(f61f1d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x283cd5c3, esp = 0xbfbfde4c, ebp = 0xbfbfde88 --- Tracing command sshd pid 8273 tid 100118 td 0xc746e000 sched_switch(c746e000,0,104,191,5f87da2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c746e000,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c764e8c4,58,c0cae931,100,0,...) at sleepq_wait_sig+0x17 _sleep(c764e8c4,c764e884,158,c0cae931,0) at _sleep+0x354 sbwait(c764e860,4,c0caea00,5c5,c764e884,...) at sbwait+0x76 soreceive_generic(c764e80c,0,f622bc58,0,0,...) at soreceive_generic+0x3f0 soreceive(c764e80c,0,f622bc58,0,0,0) at soreceive+0x38 soo_read(c7401888,f622bc58,c7656880,0,c746e000,...) at soo_read+0x4e dofileread(f622bc58,ffffffff,ffffffff,0,c7401888,...) at dofileread+0x96 kern_readv(c746e000,5,f622bc58,f622bc78,1,...) at kern_readv+0x58 read(c746e000,f622bcf8,c,c746e000,c74607f8,...) at read+0x4f syscall(f622bd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x283cd5c3, esp = 0xbfbfde4c, ebp = 0xbfbfde88 --- Tracing command rm pid 8270 tid 100150 td 0xc7420b40 sched_switch(c7420b40,0,104,191,28dbfd92,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,50,...) at mi_switch+0x200 sleepq_switch(c7420b40,0,c0ca8bd1,260,c76681c0,...) at sleepq_switch+0x15f sleepq_wait(c76681c0,50,c0c9d00c,4,1,...) at sleepq_wait+0x63 __lockmgr_args(c76681c0,200100,c766822c,0,0,...) at __lockmgr_args+0x4b5 ffs_lock(f62fc914,c08d851b,c0cb0a69,200100,c7668168,...) at ffs_lock+0xa1 VOP_LOCK1_APV(c0db3140,f62fc914,c7420be4,c0dcdfc0,c7668168,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c7668168,200100,c0cb1be5,82d,0,...) at _vn_lock+0x78 vget(c7668168,200100,c7420b40,231,0,...) at vget+0xbb cache_lookup(c76185a0,f62fcb74,f62fcb88,f62fcb74,c7657b00,...) at cache_lookup+0x67b vfs_cache_lookup(f62fca50,c0cb28f5,c0dcdc00,200000,f62fcb5c,...) at vfs_cache_lookup+0xad VOP_LOOKUP_APV(c0db3140,f62fca50,f62fcb88,1f1,f62fcb74,...) at VOP_LOOKUP_APV+0xe5 lookup(f62fcb5c,c0cb11d7,ea,c5,c775a000,...) at lookup+0x67b namei(f62fcb5c,0,c0cced45,3ad,5,...) at namei+0x57f kern_statat_vnhook(c7420b40,200,ffffff9c,bfbfecb7,0,...) at kern_statat_vnhook+0x72 kern_statat(c7420b40,200,ffffff9c,bfbfecb7,0,...) at kern_statat+0x3c kern_lstat(c7420b40,bfbfecb7,0,f62fcc18,c7420be4,...) at kern_lstat+0x36 lstat(c7420b40,f62fccf8,c,c7420b40,c775a000,...) at lstat+0x2f syscall(f62fcd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (190, FreeBSD ELF32, lstat), eip = 0x2816d973, esp = 0xbfbfea9c, ebp = 0xbfbfeb18 --- Tracing command bash pid 1295 tid 100130 td 0xc7755b40 sched_switch(c7755b40,0,104,191,28a52429,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7755b40,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7753000,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c7753000,c7753088,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c7755b40,ffffffff,f6250c74,6,0,...) at kern_wait+0xb76 wait4(c7755b40,f6250cf8,c0cdfb9b,c0cab2c4,c7753000,...) at wait4+0x3b syscall(f6250d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x282bf6bb, esp = 0xbfbfe9ac, ebp = 0xbfbfe9c8 --- Tracing command sshd pid 1294 tid 100126 td 0xc7757480 sched_switch(c7757480,0,104,191,a6b4368e,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7757480,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c746b6d0,0,c0ca2cf1,c7757480,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c746b6e4,0,f6244a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c746b6e4,c746b6d0,c0caae3b,603,c7923690,...) at _cv_wait_sig+0x240 seltdwait(c7923690,58,c73bca00,c7757480,200246,...) at seltdwait+0xa2 kern_select(c7757480,c,286030b8,286030dc,0,0,20,bfbfde60,0) at kern_select+0x4f4 select(c7757480,f6244cf8,c0cdfb9b,c0c8c22e,c7753aa0,...) at select+0x66 syscall(f6244d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfde5c, ebp = 0xbfbfdea8 --- Tracing command sshd pid 1280 tid 100108 td 0xc7645b40 sched_switch(c7645b40,0,104,191,ffc36fe3,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,58,...) at mi_switch+0x200 sleepq_switch(c7645b40,0,c0ca8bd1,1a0,58,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c78a2254,58,c0cae931,100,0,...) at sleepq_wait_sig+0x17 _sleep(c78a2254,c78a2214,158,c0cae931,0) at _sleep+0x354 sbwait(c78a21f0,4,c0caea00,5c5,c78a2214,...) at sbwait+0x76 soreceive_generic(c78a219c,0,f61e5c58,0,0,...) at soreceive_generic+0x3f0 soreceive(c78a219c,0,f61e5c58,0,0,0) at soreceive+0x38 soo_read(c74a1c08,f61e5c58,c7622100,0,c7645b40,...) at soo_read+0x4e dofileread(f61e5c58,ffffffff,ffffffff,0,c74a1c08,...) at dofileread+0x96 kern_readv(c7645b40,5,f61e5c58,f61e5c78,1,...) at kern_readv+0x58 read(c7645b40,f61e5cf8,c0cdfb9b,c0cc68ed,c763e7f8,...) at read+0x4f syscall(f61e5d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, FreeBSD ELF32, read), eip = 0x283cd5c3, esp = 0xbfbfde4c, ebp = 0xbfbfde88 --- Tracing command sh pid 1276 tid 100104 td 0xc741e240 sched_switch(c741e240,0,104,191,d011ca4c,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c741e240,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c763f2a8,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c763f2a8,c763f330,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c741e240,ffffffff,f61d4c74,2,0,...) at kern_wait+0xb76 wait4(c741e240,f61d4cf8,c0cdfb9b,c0cab3b4,c763f2a8,...) at wait4+0x3b syscall(f61d4d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfea0c, ebp = 0xbfbfea28 --- Tracing command sh pid 1275 tid 100123 td 0xc7644240 sched_switch(c7644240,0,104,191,ebab09c0,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7644240,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c77542a8,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c77542a8,c7754330,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c7644240,ffffffff,f623bc74,2,0,...) at kern_wait+0xb76 wait4(c7644240,f623bcf8,c0cdfb9b,c0cab3b4,c77542a8,...) at wait4+0x3b syscall(f623bd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfd68c, ebp = 0xbfbfd6a8 --- Tracing command sh pid 1271 tid 100103 td 0xc741e480 sched_switch(c741e480,0,104,191,eb9e99a4,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c741e480,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c763f550,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c763f550,c763f5d8,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c741e480,ffffffff,f61d0c74,2,0,...) at kern_wait+0xb76 wait4(c741e480,f61d0cf8,c0cdfb9b,c0cab3b4,c763f550,...) at wait4+0x3b syscall(f61d0d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfd83c, ebp = 0xbfbfd858 --- Tracing command cron pid 1267 tid 100107 td 0xc7645d80 sched_switch(c7645d80,0,104,191,7c613d9c,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c7645d80,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(e679,c08cedc0,c7645d80,1,100,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c0e031e4,5c,c0ca5867,100,0,...) at sleepq_timedwait_sig+0x1a _sleep(c0e031e4,0,15c,c0ca5867,e679,...) at _sleep+0x31e kern_nanosleep(c7645d80,f61e2c64,f61e2c6c,3b,0,...) at kern_nanosleep+0xc1 nanosleep(c7645d80,f61e2cf8,c0cdfb9b,c0cab889,c763eaa0,...) at nanosleep+0x6f syscall(f61e2d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (240, FreeBSD ELF32, nanosleep), eip = 0x2817aed7, esp = 0xbfbfec8c, ebp = 0xbfbfecb8 --- Tracing command sendmail pid 1260 tid 100110 td 0xc76456c0 sched_switch(c76456c0,0,104,191,df799797,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,68,...) at mi_switch+0x200 sleepq_switch(c76456c0,0,c0ca8bd1,1a0,68,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c763e300,68,c0c57b3d,100,0,...) at sleepq_wait_sig+0x17 _sleep(c763e300,c763e330,168,c0c57b3d,0,...) at _sleep+0x354 kern_sigsuspend(c76456c0,0,0,0,0,...) at kern_sigsuspend+0xae sigsuspend(c76456c0,f61eccf8,c0cdfb9b,c0cab2c4,c763e2a8,...) at sigsuspend+0x4d syscall(f61ecd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2833268b, esp = 0xbfbfcf8c, ebp = 0xbfbfcfb8 --- Tracing command sendmail pid 1256 tid 100084 td 0xc741f480 sched_switch(c741f480,0,104,191,d88c18e2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741f480,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f617aa4c,c08825da,c7647e50,0,c741f480,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c7647e64,0,f617aa7c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c7647e64,c7647e50,1389,603,c7400070,...) at _cv_timedwait_sig+0x250 seltdwait(f617ac28,f617ac30,c7385180,c741f480,c15b1014,...) at seltdwait+0x8a kern_select(c741f480,5,bfbfc510,0,0,f617ac70,20,5,0) at kern_select+0x4f4 select(c741f480,f617acf8,c0cdfb9b,c0cab7e8,c7424d48,...) at select+0x66 syscall(f617ad38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283d7543, esp = 0xbfbfc47c, ebp = 0xbfbfcfa8 --- Tracing command sshd pid 1248 tid 100080 td 0xc741fb40 sched_switch(c741fb40,0,104,191,731260d5,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741fb40,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7647210,0,c0ca2cf1,c741fb40,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7647224,0,f616aa7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7647224,c7647210,c0caae3b,603,c7abf070,...) at _cv_wait_sig+0x240 seltdwait(c7abf070,58,c7385000,c741fb40,c6d7f910,...) at seltdwait+0xa2 kern_select(c741fb40,5,286090b0,0,0,0,20,bfbfdf20,a) at kern_select+0x4f4 select(c741fb40,f616acf8,c,c741fb40,c7425550,...) at select+0x66 syscall(f616ad38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x283cd543, esp = 0xbfbfdf1c, ebp = 0xbfbfee38 --- Tracing command ntpd pid 1203 tid 100085 td 0xc741f240 sched_switch(c741f240,0,104,191,8316750a,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741f240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7374e50,0,c0ca2cf1,c741f240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7374e64,0,f617ea7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7374e64,c7374e50,c0caae3b,603,c745f118,...) at _cv_wait_sig+0x240 seltdwait(c745f118,58,c6d7e380,c741f240,0,...) at seltdwait+0xa2 kern_select(c741f240,1c,bfbfed28,0,0,0,20,bfbfed00,0) at kern_select+0x4f4 select(c741f240,f617ecf8,16,c741f240,c7424aa0,...) at select+0x66 syscall(f617ed38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28355543, esp = 0xbfbfecfc, ebp = 0xbfbfedc8 --- Tracing command moused pid 1064 tid 100094 td 0xc7456900 sched_switch(c7456900,0,104,191,1553fd2f,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7456900,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7647650,0,c0ca2cf1,c7456900,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c7647664,0,f61a2a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c7647664,c7647650,c0caae3b,603,c74a1ab8,...) at _cv_wait_sig+0x240 seltdwait(c74a1ab8,58,c6d7e380,c7456900,0,...) at seltdwait+0xa2 kern_select(c7456900,6,bfbfea34,0,0,0,20,bfbfe9c0,1) at kern_select+0x4f4 select(c7456900,f61a2cf8,c0cdfb9b,c0cbca7a,c74547f8,...) at select+0x66 syscall(f61a2d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x281ab543, esp = 0xbfbfe9bc, ebp = 0xbfbfeb58 --- Tracing command rpc.lockd pid 1031 tid 100090 td 0xc7456d80 sched_switch(c7456d80,0,104,191,7e0e3db2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7456d80,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f61929fc,c08825da,c7921c80,0,c7456d80,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c73738d0,0,f6192a2c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c73738d0,c7921c80,1388,3af,c7290400,...) at _cv_timedwait_sig+0x250 svc_run_internal(c7456ee8,14,c0cc8074,c0cc7769,f6192b8c,...) at svc_run_internal+0x356 svc_run(c7921c80,0,4,c0a7d3c0,f6192b8c,...) at svc_run+0x7f nlm_syscall(c7456d80,f6192cf8,c0cdfb9b,c0cabc28,c7454d48,...) at nlm_syscall+0x77d syscall(f6192d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (154, FreeBSD ELF32, nlm_syscall), eip = 0x280fa28b, esp = 0xbfbfed4c, ebp = 0xbfbfee18 --- Tracing command rpc.statd pid 1024 tid 100091 td 0xc741f000 sched_switch(c741f000,0,104,191,71a58136,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741f000,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f6196a4c,c08825da,c70f6050,0,c741f000,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c70f6064,0,f6196a7c,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c70f6064,c70f6050,7531,603,c7401150,...) at _cv_timedwait_sig+0x250 seltdwait(f6196c28,f6196c30,c6d7e380,c741f000,c772be00,...) at seltdwait+0x8a kern_select(c741f000,8,bfbfed34,0,0,f6196c70,20,1e,0) at kern_select+0x4f4 select(c741f000,f6196cf8,c0cdfb9b,c0cab512,c74247f8,...) at select+0x66 syscall(f6196d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28188543, esp = 0xbfbfec8c, ebp = 0xbfbfedc8 --- Tracing command nfsd pid 1017 tid 100149 td 0xc7755000 sched_switch(c7755000,0,104,191,1a615d0d,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7755000,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f62b2bf8,c08825da,c7258a80,0,c7755000,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c746da90,0,f62b2c28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c746da90,c7258a80,1388,3af,0,...) at _cv_timedwait_sig+0x250 svc_run_internal(f62b2d24,c0867ea8,c7258a80,f62b2d38,c0c9f939,...) at svc_run_internal+0x356 svc_thread_start(c7258a80,f62b2d38,c0c9f939,343,c7464aa0,...) at svc_thread_start+0x10 fork_exit(c0a8b410,c7258a80,f62b2d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 1017 tid 100148 td 0xc7755240 sched_switch(c7755240,0,104,191,2f4d5581,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7755240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f62afbf8,c08825da,c7258a80,0,c7755240,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c73b3910,0,f62afc28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c73b3910,c7258a80,1388,3ea,28312e2b,...) at _cv_timedwait_sig+0x250 svc_run_internal(f62afd24,c0867ea8,c7258a80,f62afd38,c0c9f939,...) at svc_run_internal+0x356 svc_thread_start(c7258a80,f62afd38,c0c9f939,343,c7464aa0,...) at svc_thread_start+0x10 fork_exit(c0a8b410,c7258a80,f62afd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 1017 tid 100147 td 0xc7755480 sched_switch(c7755480,0,104,191,1b3d07b6,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7755480,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f62acbf8,c08825da,c7258a80,0,c7755480,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c746dad0,0,f62acc28,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c746dad0,c7258a80,1388,3af,0,...) at _cv_timedwait_sig+0x250 svc_run_internal(f62acd24,c0867ea8,c7258a80,f62acd38,c0c9f939,...) at svc_run_internal+0x356 svc_thread_start(c7258a80,f62acd38,c0c9f939,343,c7464aa0,...) at svc_thread_start+0x10 fork_exit(c0a8b410,c7258a80,f62acd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0x2e, eip = 0xc, esp = 0x33, ebp = 0 --- Tracing command nfsd pid 1017 tid 100113 td 0xc7645000 sched_switch(c7645000,0,104,191,50c6e162,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7645000,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f61ffae8,c08825da,c7258a80,0,c7645000,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c7647010,0,f61ffb18,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c7647010,c7258a80,1388,3af,f61ffb60,...) at _cv_timedwait_sig+0x250 svc_run_internal(c7645168,14,c0cc8074,c0cc6b28,f61ffc3c,...) at svc_run_internal+0x356 svc_run(c7258a80,0,c0cc6e2c,1fb,0,...) at svc_run+0x7f nfssvc_nfsd(bfbfe8b0,f61ffc3c,c,c6d7e380,f61ffc50,...) at nfssvc_nfsd+0xad nfssvc_nfsserver(c7645000,f61ffcf8,bfbfe8b0,c7645000,0,...) at nfssvc_nfsserver+0x24f nfssvc(c7645000,f61ffcf8,c0cdfb9b,c0cab7e8,c7464aa0,...) at nfssvc+0x83 syscall(f61ffd38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (155, FreeBSD ELF32, nfssvc), eip = 0x280db26b, esp = 0xbfbfe86c, ebp = 0xbfbfead8 --- Tracing command nfsd pid 1016 tid 100097 td 0xc7456480 sched_switch(c7456480,0,104,191,fcb6f47b,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7456480,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c73b4990,0,c0ca2cf1,c7456480,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c73b49a4,0,f61aea7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c73b49a4,c73b4990,c0caae3b,603,c745fd58,...) at _cv_wait_sig+0x240 seltdwait(c745fd58,58,c6d7e380,c7456480,c6d7f0e8,...) at seltdwait+0xa2 kern_select(c7456480,5,bfbfece0,0,0,0,20,bfbfeae0,1) at kern_select+0x4f4 select(c7456480,f61aecf8,c,c7456480,c74542a8,...) at select+0x66 syscall(f61aed38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x2817f543, esp = 0xbfbfeadc, ebp = 0xbfbfee18 --- Tracing command mountd pid 1007 tid 100127 td 0xc7757240 sched_switch(c7757240,0,104,191,f638f074,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7757240,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c73b3450,0,c0ca2cf1,c7757240,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c73b3464,0,f6247a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c73b3464,c73b3450,c0caae3b,603,c7400b98,...) at _cv_wait_sig+0x240 seltdwait(c7400b98,58,c6d7e380,c7757240,c0f42368,...) at seltdwait+0xa2 kern_select(c7757240,9,bfbfed7c,0,0,0,20,bfbfed50,bfbfed7c) at kern_select+0x4f4 select(c7757240,f6247cf8,c0cdfb9b,c0cc68ed,c77537f8,...) at select+0x66 syscall(f6247d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28192543, esp = 0xbfbfed4c, ebp = 0xbfbfee18 --- Tracing command rpcbind pid 914 tid 100105 td 0xc741e000 sched_switch(c741e000,0,104,191,19d41826,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c741e000,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(f61d7aa8,c08825da,c746bcd0,0,c741e000,...) at sleepq_catch_signals+0xb7 sleepq_timedwait_sig(c746bce4,0,f61d7ad8,101,0,...) at sleepq_timedwait_sig+0x1a _cv_timedwait_sig(c746bce4,c746bcd0,7531,603,f61d7b8c,...) at _cv_timedwait_sig+0x250 seltdwait(f61d7c5c,f61d7c64,511,c741e000,f61d7b5c,...) at seltdwait+0x8a poll(c741e000,f61d7cf8,c0cdfb9b,c0cab512,c763f000,...) at poll+0x300 syscall(f61d7d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (209, FreeBSD ELF32, poll), eip = 0x28140abf, esp = 0xbfbfcc0c, ebp = 0xbfbfedd8 --- Tracing command syslogd pid 880 tid 100092 td 0xc7456b40 sched_switch(c7456b40,0,104,191,bd288d70,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7456b40,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c70f60d0,0,c0ca2cf1,c7456b40,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c70f60e4,0,f619aa7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c70f60e4,c70f60d0,c0caae3b,603,c74015e8,...) at _cv_wait_sig+0x240 seltdwait(c74015e8,58,c6d7e380,c7456b40,c775d200,...) at seltdwait+0xa2 kern_select(c7456b40,9,282290ac,0,0,0,20,bfbfe2b0,0) at kern_select+0x4f4 select(c7456b40,f619acf8,c0cdfb9b,c0ccb661,c7454aa0,...) at select+0x66 syscall(f619ad38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x28191543, esp = 0xbfbfe2ac, ebp = 0xbfbfee18 --- Tracing command devd pid 698 tid 100114 td 0xc7644d80 sched_switch(c7644d80,0,104,191,74173b71,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c7644d80,0,c0ca8bd1,1a0,0,...) at sleepq_switch+0x15f sleepq_catch_signals(c08825da,c7373590,0,c0ca2cf1,c7644d80,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c73735a4,0,f6203a7c,101,0,...) at sleepq_wait_sig+0x17 _cv_wait_sig(c73735a4,c7373590,c0caae3b,603,c7400498,...) at _cv_wait_sig+0x240 seltdwait(c7400498,58,c6d7e380,c7644d80,c0c9c3ec,...) at seltdwait+0xa2 kern_select(c7644d80,6,bfbfe9a0,0,0,0,20,bfbfe970,10) at kern_select+0x4f4 select(c7644d80,f6203cf8,c0cdfb9b,c0c43250,c74647f8,...) at select+0x66 syscall(f6203d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (93, FreeBSD ELF32, select), eip = 0x8088c03, esp = 0xbfbfe96c, ebp = 0xbfbfee48 --- Tracing command sh pid 22 tid 100076 td 0xc70ea240 sched_switch(c70ea240,0,104,191,e9ddbf79,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c70ea240,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c6f48d48,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c6f48d48,c6f48dd0,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c70ea240,ffffffff,f615ac74,2,0,...) at kern_wait+0xb76 wait4(c70ea240,f615acf8,c0cdfb9b,c0cab3b4,c6f48d48,...) at wait4+0x3b syscall(f615ad38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x2815f6bb, esp = 0xbfbfe97c, ebp = 0xbfbfe998 --- Tracing command flowcleaner pid 21 tid 100075 td 0xc70ea480 sched_switch(c70ea480,0,100,18c,8680af44,...) at sched_switch+0x36a mi_switch(100,0,c0ca61b6,97d,1,...) at mi_switch+0x200 sched_bind(c70ea480,2,c0cb38f6,3c7,0,...) at sched_bind+0x8a flowtable_cleaner(0,f3f6ad38,c0c9f939,343,c7397000,...) at flowtable_cleaner+0x99 fork_exit(c093e9a0,0,f3f6ad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f6ad70, ebp = 0 --- Tracing command softdepflush pid 20 tid 100074 td 0xc70ea6c0 sched_switch(c70ea6c0,0,104,191,b39487ac,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,44,...) at mi_switch+0x200 sleepq_switch(c70ea6c0,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f7b060,44,c0ccbbda,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f7b060,c0f7b004,44,c0ccbbda,3e8,...) at _sleep+0x339 softdep_flush(0,f3f67d38,c0c9f939,343,c73972a8,...) at softdep_flush+0x244 fork_exit(c0acc5a0,0,f3f67d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f67d70, ebp = 0 --- Tracing command vnlru pid 19 tid 100073 td 0xc70ea900 sched_switch(c70ea900,0,104,191,ab1a755a,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,50,...) at mi_switch+0x200 sleepq_switch(c70ea900,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c7397550,50,c0cb2bc6,0,0,...) at sleepq_timedwait+0x6b _sleep(c7397550,c0f6f6d8,250,c0cb2bc6,3e8,...) at _sleep+0x339 vnlru_proc(0,f3f64d38,c0c9f939,343,c7397550,...) at vnlru_proc+0xe7 fork_exit(c092a6c0,0,f3f64d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f64d70, ebp = 0 --- Tracing command syncer pid 18 tid 100072 td 0xc70eab40 cpustop_handler(4,f3f614b8,c0bd1116,4,c0ca2cf1,...) at cpustop_handler+0x32 ipi_nmi_handler(4,c0ca2cf1,df,c7668260,c73977f8,...) at ipi_nmi_handler+0x2f trap(f3f614c4) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc0938ad2, esp = 0xf3f61504, ebp = 0xf3f6150c --- strncmp(c0caf7e2,c0c9c3ec,3,c6d2f5e0,f3f61548,...) at strncmp+0x32 fixup_filename(c0cc9d0d,c0caf7e8,dc,c0cc9d04,c7af1550,...) at fixup_filename+0x2b witness_lock(c7af1550,8,c0caf7df,513,0,...) at witness_lock+0x53 _mtx_lock_flags(c7af1550,0,c0caf7df,513,0,...) at _mtx_lock_flags+0x113 brelse(e6dde0a0,cfe2,0,e5b58,0,...) at brelse+0x246 ffs_balloc_ufs2(c7668168,33f8a000,0,2000,c6d65600,...) at ffs_balloc_ufs2+0x17d9 ffs_write(f3f618f0,c0ce2c5d,f3f61848,0,c0e078c0,...) at ffs_write+0x372 VOP_WRITE_APV(c0db3140,f3f618f0,4,0,10000,...) at VOP_WRITE_APV+0x136 vnode_pager_generic_putpages(c7668168,f3f61a50,10000,8,f3f619c0,...) at vnode_pager_generic_putpages+0x227 vop_stdputpages(f3f6196c,c0ce28aa,c7668168,c7668168,8,...) at vop_stdputpages+0x30 VOP_PUTPAGES_APV(c0db3140,f3f6196c,c0cd2070,412,c0dce120,...) at VOP_PUTPAGES_APV+0xd6 vnode_pager_putpages(c7af1550,f3f61a50,10,8,f3f619c0,...) at vnode_pager_putpages+0x92 vm_pageout_flush(f3f61a50,10,8,3b9,c08821b4,...) at vm_pageout_flush+0x174 vm_object_page_collect_flush(8,33f8a,0,318,4,...) at vm_object_page_collect_flush+0x300 vm_object_page_clean(c7af1550,0,0,0,0,...) at vm_object_page_clean+0x373 vfs_msync(c73adb50,2,c0cb1be5,d6c,c73adb50,...) at vfs_msync+0x19a sync_fsync(f3f61c7c,c0ce230c,c7618a9c,f3f61c7c,c76189d8,...) at sync_fsync+0x17b VOP_FSYNC_APV(c0da2ec0,f3f61c7c,c0cb1be5,6a7,c70eab40,...) at VOP_FSYNC_APV+0xc5 sync_vnode(c0f6f718,c0f6f704,3e8,6d6,4e20,...) at sync_vnode+0x16b sched_sync(0,f3f61d38,c0c9f939,343,c73977f8,...) at sched_sync+0x273 fork_exit(c0929af0,0,f3f61d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f61d70, ebp = 0 --- Tracing command bufdaemon pid 17 tid 100071 td 0xc70ead80 sched_switch(c70ead80,0,104,191,b341ca1a,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,44,...) at mi_switch+0x200 sleepq_switch(c70ead80,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f6f448,44,c0cb0123,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f6f448,c0f6f44c,44,c0cb0123,3e8,...) at _sleep+0x339 buf_daemon(0,f3f5ed38,c0c9f939,343,c7397aa0,...) at buf_daemon+0x138 fork_exit(c0911680,0,f3f5ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f5ed70, ebp = 0 --- Tracing command pagezero pid 16 tid 100070 td 0xc70ec000 sched_switch(c70ec000,0,104,191,36780364,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c70ec000,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f7bedc,0,c0cd201c,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f7bedc,c0f7b980,0,c0cd201c,493e0,...) at _sleep+0x339 vm_pagezero(0,f3f5bd38,c0c9f939,343,c7397d48,...) at vm_pagezero+0xdc fork_exit(c0b0efb0,0,f3f5bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f5bd70, ebp = 0 --- Tracing command vmdaemon pid 15 tid 100069 td 0xc70ec240 sched_switch(c70ec240,0,104,191,15f2dcb7,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,68,...) at mi_switch+0x200 sleepq_switch(c70ec240,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0f7bac4,68,c0cb0123,0,0,...) at sleepq_wait+0x63 _sleep(c0f7bac4,c0f7bac8,68,c0cb0123,0,...) at _sleep+0x36b vm_daemon(0,f3f58d38,c0c9f939,343,c6d792a8,...) at vm_daemon+0x59 fork_exit(c0b06c90,0,f3f58d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f58d70, ebp = 0 --- Tracing command writed pid 9 tid 100068 td 0xc70ec480 sched_switch(c70ec480,0,104,191,be74ea82,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c70ec480,0,c0ca8bd1,260,c70ec480,...) at sleepq_switch+0x15f sleepq_wait(c0f7bea4,0,f3f55cc4,1,0,...) at sleepq_wait+0x63 _cv_wait(c0f7bea4,c0f7ba00,c0cd168a,153,0,...) at _cv_wait+0x240 vnode_writedirty_daemon(0,f3f55d38,c0c9f939,343,c6d79550,...) at vnode_writedirty_daemon+0x6a fork_exit(c0b0bdb0,0,f3f55d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f55d70, ebp = 0 --- Tracing command pagedaemon pid 8 tid 100067 td 0xc70ec6c0 sched_switch(c70ec6c0,0,104,191,85fab058,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,44,...) at mi_switch+0x200 sleepq_switch(c70ec6c0,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0f7ba8c,44,c0cb0123,0,0,...) at sleepq_timedwait+0x6b _sleep(c0f7ba8c,c0f7b980,44,c0cb0123,1388,...) at _sleep+0x339 vm_pageout(0,f3f52d38,c0c9f939,343,c6d797f8,...) at vm_pageout+0x2c7 fork_exit(c0b07b70,0,f3f52d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3f52d70, ebp = 0 --- Tracing command fdc0 pid 7 tid 100064 td 0xc70ecd80 sched_switch(c70ecd80,0,104,191,8b05887b,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c70ecd80,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c6fc363c,4c,c0c99d7b,0,0,...) at sleepq_timedwait+0x6b _sleep(c6fc363c,c6fc36f0,4c,c0c99d7b,3e8,...) at _sleep+0x339 fdc_thread(c6fc3600,f3ee9d38,c0c9f939,343,c6d79aa0,...) at fdc_thread+0x27d fork_exit(c0b8c610,c6fc3600,f3ee9d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ee9d70, ebp = 0 --- Tracing command fw0_probe pid 6 tid 100062 td 0xc6fbd480 sched_switch(c6fbd480,0,104,191,5d9fa1ad,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c6fbd480,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c6ff7000,5c,c0c99d7b,100,0,...) at sleepq_wait_sig+0x17 _sleep(c6ff7000,c6ffb488,15c,c0c99d7b,0,...) at _sleep+0x354 fw_bus_probe_thread(c6ff7000,f3ed9d38,c0c9f939,343,c6d79d48,...) at fw_bus_probe_thread+0xa08 fork_exit(c065c170,c6ff7000,f3ed9d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ed9d70, ebp = 0 --- Tracing command usb pid 14 tid 100058 td 0xc6fbdd80 sched_switch(c6fbdd80,0,104,191,f36b7399,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbdd80,0,c0ca8bd1,260,c6fbdd80,...) at sleepq_switch+0x15f sleepq_wait(c6fd8d0c,0,f3ec2cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fd8d0c,c6fd8dac,c0c92a6b,6c,c6fd8d14,...) at _cv_wait+0x240 usb_process(c6fd8d04,f3ec2d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fd8d04,f3ec2d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ec2d70, ebp = 0 --- Tracing command usb pid 14 tid 100057 td 0xc6fd0000 sched_switch(c6fd0000,0,104,191,1a79bb24,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0000,0,c0ca8bd1,260,c6fd0000,...) at sleepq_switch+0x15f sleepq_wait(c6fd8cdc,0,f3ebfcbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fd8cdc,c6fd8dac,c0c92a6b,6c,c6fd8ce4,...) at _cv_wait+0x240 usb_process(c6fd8cd4,f3ebfd38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fd8cd4,f3ebfd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ebfd70, ebp = 0 --- Tracing command usb pid 14 tid 100056 td 0xc6fd0240 sched_switch(c6fd0240,0,104,191,f30552d2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0240,0,c0ca8bd1,260,c6fd0240,...) at sleepq_switch+0x15f sleepq_wait(c6fd8cac,0,f3ebccbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fd8cac,c6fd8dac,c0c92a6b,6c,c6fd8cb4,...) at _cv_wait+0x240 usb_process(c6fd8ca4,f3ebcd38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fd8ca4,f3ebcd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ebcd70, ebp = 0 --- Tracing command usb pid 14 tid 100055 td 0xc6fd0480 sched_switch(c6fd0480,0,104,191,f3053f57,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0480,0,c0ca8bd1,260,c6fd0480,...) at sleepq_switch+0x15f sleepq_wait(c6fd8c7c,0,f3eb9cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fd8c7c,c6fd8dac,c0c92a6b,6c,c6fd8c84,...) at _cv_wait+0x240 usb_process(c6fd8c74,f3eb9d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fd8c74,f3eb9d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3eb9d70, ebp = 0 --- Tracing command usb pid 14 tid 100053 td 0xc6fd0900 sched_switch(c6fd0900,0,104,191,f3052c67,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0900,0,c0ca8bd1,260,c6fd0900,...) at sleepq_switch+0x15f sleepq_wait(c6fc9b5c,0,f3eb1cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc9b5c,c6fc9bfc,c0c92a6b,6c,c6fc9b64,...) at _cv_wait+0x240 usb_process(c6fc9b54,f3eb1d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc9b54,f3eb1d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3eb1d70, ebp = 0 --- Tracing command usb pid 14 tid 100052 td 0xc6fd0b40 sched_switch(c6fd0b40,0,104,191,11e3eb1d,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0b40,0,c0ca8bd1,260,c6fd0b40,...) at sleepq_switch+0x15f sleepq_wait(c6fc9b2c,0,f3eaecbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc9b2c,c6fc9bfc,c0c92a6b,6c,c6fc9b34,...) at _cv_wait+0x240 usb_process(c6fc9b24,f3eaed38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc9b24,f3eaed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3eaed70, ebp = 0 --- Tracing command usb pid 14 tid 100051 td 0xc6fd0d80 sched_switch(c6fd0d80,0,104,191,f2a14a84,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fd0d80,0,c0ca8bd1,260,c6fd0d80,...) at sleepq_switch+0x15f sleepq_wait(c6fc9afc,0,f3eabcbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc9afc,c6fc9bfc,c0c92a6b,6c,c6fc9b04,...) at _cv_wait+0x240 usb_process(c6fc9af4,f3eabd38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc9af4,f3eabd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3eabd70, ebp = 0 --- Tracing command usb pid 14 tid 100050 td 0xc6f6f6c0 sched_switch(c6f6f6c0,0,104,191,f2a1399e,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6f6c0,0,c0ca8bd1,260,c6f6f6c0,...) at sleepq_switch+0x15f sleepq_wait(c6fc9acc,0,f3ea8cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc9acc,c6fc9bfc,c0c92a6b,6c,c6fc9ad4,...) at _cv_wait+0x240 usb_process(c6fc9ac4,f3ea8d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc9ac4,f3ea8d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ea8d70, ebp = 0 --- Tracing command usb pid 14 tid 100049 td 0xc6f6f900 sched_switch(c6f6f900,0,104,191,f2a12718,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6f900,0,c0ca8bd1,260,c6f6f900,...) at sleepq_switch+0x15f sleepq_wait(c6fc5b5c,0,f3ea4cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc5b5c,c6fc5bfc,c0c92a6b,6c,c6fc5b64,...) at _cv_wait+0x240 usb_process(c6fc5b54,f3ea4d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc5b54,f3ea4d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ea4d70, ebp = 0 --- Tracing command usb pid 14 tid 100048 td 0xc6f6fb40 sched_switch(c6f6fb40,0,104,191,115a8af2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6fb40,0,c0ca8bd1,260,c6f6fb40,...) at sleepq_switch+0x15f sleepq_wait(c6fc5b2c,0,f3ea1cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc5b2c,c6fc5bfc,c0c92a6b,6c,c6fc5b34,...) at _cv_wait+0x240 usb_process(c6fc5b24,f3ea1d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc5b24,f3ea1d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ea1d70, ebp = 0 --- Tracing command usb pid 14 tid 100047 td 0xc6f6fd80 sched_switch(c6f6fd80,0,104,191,f23d77f4,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6fd80,0,c0ca8bd1,260,c6f6fd80,...) at sleepq_switch+0x15f sleepq_wait(c6fc5afc,0,f3e9ecbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc5afc,c6fc5bfc,c0c92a6b,6c,c6fc5b04,...) at _cv_wait+0x240 usb_process(c6fc5af4,f3e9ed38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc5af4,f3e9ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e9ed70, ebp = 0 --- Tracing command usb pid 14 tid 100046 td 0xc6fbc000 sched_switch(c6fbc000,0,104,191,f23d66d8,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbc000,0,c0ca8bd1,260,c6fbc000,...) at sleepq_switch+0x15f sleepq_wait(c6fc5acc,0,f3e9bcbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fc5acc,c6fc5bfc,c0c92a6b,6c,c6fc5ad4,...) at _cv_wait+0x240 usb_process(c6fc5ac4,f3e9bd38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fc5ac4,f3e9bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e9bd70, ebp = 0 --- Tracing command usb pid 14 tid 100045 td 0xc6fbc240 sched_switch(c6fbc240,0,104,191,f23d53c7,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbc240,0,c0ca8bd1,260,c6fbc240,...) at sleepq_switch+0x15f sleepq_wait(c6fbeb5c,0,f3e97cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fbeb5c,c6fbebfc,c0c92a6b,6c,c6fbeb64,...) at _cv_wait+0x240 usb_process(c6fbeb54,f3e97d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fbeb54,f3e97d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e97d70, ebp = 0 --- Tracing command usb pid 14 tid 100044 td 0xc6fbc480 sched_switch(c6fbc480,0,104,191,10d4a1f3,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbc480,0,c0ca8bd1,260,c6fbc480,...) at sleepq_switch+0x15f sleepq_wait(c6fbeb2c,0,f3e94cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fbeb2c,c6fbebfc,c0c92a6b,6c,c6fbeb34,...) at _cv_wait+0x240 usb_process(c6fbeb24,f3e94d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fbeb24,f3e94d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e94d70, ebp = 0 --- Tracing command usb pid 14 tid 100043 td 0xc6fbc6c0 sched_switch(c6fbc6c0,0,104,191,f1d97560,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbc6c0,0,c0ca8bd1,260,c6fbc6c0,...) at sleepq_switch+0x15f sleepq_wait(c6fbeafc,0,f3e91cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fbeafc,c6fbebfc,c0c92a6b,6c,c6fbeb04,...) at _cv_wait+0x240 usb_process(c6fbeaf4,f3e91d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fbeaf4,f3e91d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e91d70, ebp = 0 --- Tracing command usb pid 14 tid 100042 td 0xc6fbc900 sched_switch(c6fbc900,0,104,191,f1d962fa,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbc900,0,c0ca8bd1,260,c6fbc900,...) at sleepq_switch+0x15f sleepq_wait(c6fbeacc,0,f3e8ecbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fbeacc,c6fbebfc,c0c92a6b,6c,c6fbead4,...) at _cv_wait+0x240 usb_process(c6fbeac4,f3e8ed38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fbeac4,f3e8ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e8ed70, ebp = 0 --- Tracing command usb pid 14 tid 100040 td 0xc6fbcd80 sched_switch(c6fbcd80,0,104,191,f1d94f3c,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbcd80,0,c0ca8bd1,260,c6fbcd80,...) at sleepq_switch+0x15f sleepq_wait(c6fb8b5c,0,f3e87cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fb8b5c,c6fb8bfc,c0c92a6b,6c,c6fb8b64,...) at _cv_wait+0x240 usb_process(c6fb8b54,f3e87d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fb8b54,f3e87d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e87d70, ebp = 0 --- Tracing command usb pid 14 tid 100039 td 0xc6fbd000 sched_switch(c6fbd000,0,104,191,1047e32c,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbd000,0,c0ca8bd1,260,c6fbd000,...) at sleepq_switch+0x15f sleepq_wait(c6fb8b2c,0,f3e84cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fb8b2c,c6fb8bfc,c0c92a6b,6c,c6fb8b34,...) at _cv_wait+0x240 usb_process(c6fb8b24,f3e84d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fb8b24,f3e84d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e84d70, ebp = 0 --- Tracing command usb pid 14 tid 100038 td 0xc6f52d80 sched_switch(c6f52d80,0,104,191,f17587e2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f52d80,0,c0ca8bd1,260,c6f52d80,...) at sleepq_switch+0x15f sleepq_wait(c6fb8afc,0,f3e81cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fb8afc,c6fb8bfc,c0c92a6b,6c,c6fb8b04,...) at _cv_wait+0x240 usb_process(c6fb8af4,f3e81d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fb8af4,f3e81d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e81d70, ebp = 0 --- Tracing command usb pid 14 tid 100037 td 0xc6f6d000 sched_switch(c6f6d000,0,104,191,f1757576,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6d000,0,c0ca8bd1,260,c6f6d000,...) at sleepq_switch+0x15f sleepq_wait(c6fb8acc,0,f3e7ecbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6fb8acc,c6fb8bfc,c0c92a6b,6c,c6fb8ad4,...) at _cv_wait+0x240 usb_process(c6fb8ac4,f3e7ed38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6fb8ac4,f3e7ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e7ed70, ebp = 0 --- Tracing command usb pid 14 tid 100035 td 0xc6f6d480 sched_switch(c6f6d480,0,104,191,f175601d,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6d480,0,c0ca8bd1,260,c6f6d480,...) at sleepq_switch+0x15f sleepq_wait(c6faab5c,0,f3e77cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6faab5c,c6faabfc,c0c92a6b,6c,c6faab64,...) at _cv_wait+0x240 usb_process(c6faab54,f3e77d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6faab54,f3e77d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e77d70, ebp = 0 --- Tracing command usb pid 14 tid 100034 td 0xc6f6d6c0 sched_switch(c6f6d6c0,0,104,191,fbe9049,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6d6c0,0,c0ca8bd1,260,c6f6d6c0,...) at sleepq_switch+0x15f sleepq_wait(c6faab2c,0,f3e74cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6faab2c,c6faabfc,c0c92a6b,6c,c6faab34,...) at _cv_wait+0x240 usb_process(c6faab24,f3e74d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6faab24,f3e74d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e74d70, ebp = 0 --- Tracing command usb pid 14 tid 100033 td 0xc6f6d900 sched_switch(c6f6d900,0,104,191,f10b61f1,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6d900,0,c0ca8bd1,260,c6f6d900,...) at sleepq_switch+0x15f sleepq_wait(c6faaafc,0,f3e71cbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6faaafc,c6faabfc,c0c92a6b,6c,c6faab04,...) at _cv_wait+0x240 usb_process(c6faaaf4,f3e71d38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6faaaf4,f3e71d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e71d70, ebp = 0 --- Tracing command usb pid 14 tid 100032 td 0xc6f6db40 sched_switch(c6f6db40,0,104,191,f10b4f89,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f6db40,0,c0ca8bd1,260,c6f6db40,...) at sleepq_switch+0x15f sleepq_wait(c6faaacc,0,f3e6ecbc,1,0,...) at sleepq_wait+0x63 _cv_wait(c6faaacc,c6faabfc,c0c92a6b,6c,c6faaad4,...) at _cv_wait+0x240 usb_process(c6faaac4,f3e6ed38,c0c9f939,343,c6f48000,...) at usb_process+0x193 fork_exit(c07c2940,c6faaac4,f3e6ed38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e6ed70, ebp = 0 --- Tracing command xpt_thrd pid 5 tid 100022 td 0xc6f52240 sched_switch(c6f52240,0,104,191,f10b390f,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c6f52240,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0dcf3d4,4c,c0c3e3fa,0,0,...) at sleepq_wait+0x63 _sleep(c0dcf3d4,c0dcf3ec,4c,c0c3e3fa,0,...) at _sleep+0x36b xpt_scanner_thread(0,c6b64d38,c0c9f939,343,c6f482a8,...) at xpt_scanner_thread+0x4a fork_exit(c0484a40,0,c6b64d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b64d70, ebp = 0 --- Tracing command yarrow pid 13 tid 100017 td 0xc6d7c240 sched_switch(c6d7c240,0,104,191,ba7224c2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6d7c240,0,c0ca8bd1,283,2,...) at sleepq_switch+0x15f sleepq_timedwait(c0e03044,0,c0c99d7b,2,0,...) at sleepq_timedwait+0x6b _sleep(c0e03044,0,0,c0c99d7b,64,...) at _sleep+0x339 pause(c0c99d7b,64,c0c86766,111,0,...) at pause+0x47 random_kthread(0,c6b55d38,c0c9f939,343,c6f48550,...) at random_kthread+0x1ef fork_exit(c0739410,0,c6b55d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b55d70, ebp = 0 --- Tracing command g_down pid 4 tid 100015 td 0xc6d7c6c0 sched_switch(c6d7c6c0,0,104,191,bd1ab912,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c6d7c6c0,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0e00de4,4c,c0c99d7b,0,0,...) at sleepq_wait+0x63 _sleep(c0e00de4,c0e00d48,24c,c0c99d7b,0,...) at _sleep+0x36b g_io_schedule_down(c6d7c6c0,0,c0c9b487,74,0,...) at g_io_schedule_down+0x56 g_down_procbody(0,c6b4fd38,c0c9f939,343,c6d78000,...) at g_down_procbody+0x8d fork_exit(c082eeb0,0,c6b4fd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b4fd70, ebp = 0 --- Tracing command g_up pid 3 tid 100014 td 0xc6d7c900 sched_switch(c6d7c900,0,104,191,bd280d86,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c6d7c900,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c0e00de0,4c,c0c99d7b,0,0,...) at sleepq_wait+0x63 _sleep(c0e00de0,c0e00d68,24c,c0c99d7b,0,...) at _sleep+0x36b g_io_schedule_up(c6d7c900,0,c0c9b487,5d,0,...) at g_io_schedule_up+0x11e g_up_procbody(0,c6b4cd38,c0c9f939,343,c6d782a8,...) at g_up_procbody+0x8d fork_exit(c082ef40,0,c6b4cd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b4cd70, ebp = 0 --- Tracing command g_event pid 2 tid 100013 td 0xc6d7cb40 sched_switch(c6d7cb40,0,104,191,b4549428,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,4c,...) at mi_switch+0x200 sleepq_switch(c6d7cb40,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0e00dd8,4c,c0c99d7b,0,0,...) at sleepq_timedwait+0x6b _sleep(c0e00dd8,0,4c,c0c99d7b,64,...) at _sleep+0x339 g_event_procbody(0,c6b49d38,c0c9f939,343,c6d78550,...) at g_event_procbody+0xcb fork_exit(c082efd0,0,c6b49d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b49d70, ebp = 0 --- Tracing command intr pid 12 tid 100066 td 0xc70ec900 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100065 td 0xc70ecb40 sched_switch(c70ecb40,0,109,191,f1070ad0,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7e2f0,...) at mi_switch+0x200 ithread_loop(c70e3ae0,f3eecd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c70e3ae0,f3eecd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3eecd70, ebp = 0 --- Tracing command intr pid 12 tid 100063 td 0xc6fbd240 sched_switch(c6fbd240,0,109,191,b5b892b7,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c70ddaf0,...) at mi_switch+0x200 ithread_loop(c70e34e0,f3edcd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c70e34e0,f3edcd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3edcd70, ebp = 0 --- Tracing command intr pid 12 tid 100060 td 0xc6fbd900 sched_switch(c6fbd900,0,109,191,f0cd3779,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d870,...) at mi_switch+0x200 ithread_loop(c6feebf0,f3ed0d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6feebf0,f3ed0d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ed0d70, ebp = 0 --- Tracing command intr pid 12 tid 100059 td 0xc6fbdb40 sched_switch(c6fbdb40,0,109,191,603e5b07,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7db70,...) at mi_switch+0x200 ithread_loop(c6fee450,f3ec8d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6fee450,f3ec8d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ec8d70, ebp = 0 --- Tracing command intr pid 12 tid 100054 td 0xc6fd06c0 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100041 td 0xc6fbcb40 sched_switch(c6fbcb40,0,109,191,15a1dd49,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d970,...) at mi_switch+0x200 ithread_loop(c6fa2730,f3e8bd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6fa2730,f3e8bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e8bd70, ebp = 0 --- Tracing command intr pid 12 tid 100036 td 0xc6f6d240 sched_switch(c6f6d240,0,109,191,14e14b68,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d9f0,...) at mi_switch+0x200 ithread_loop(c6fa2a40,f3e7bd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6fa2a40,f3e7bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e7bd70, ebp = 0 --- Tracing command intr pid 12 tid 100031 td 0xc6f6dd80 sched_switch(c6f6dd80,0,109,191,6c269bfe,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7da70,...) at mi_switch+0x200 ithread_loop(c6faf110,f3e6bd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6faf110,f3e6bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3e6bd70, ebp = 0 --- Tracing command intr pid 12 tid 100030 td 0xc6f6f000 sched_switch(c6f6f000,0,109,191,bd272f5a,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d770,...) at mi_switch+0x200 ithread_loop(c6fa2500,f3d5cd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6fa2500,f3d5cd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3d5cd70, ebp = 0 --- Tracing command intr pid 12 tid 100029 td 0xc6f6f240 sched_switch(c6f6f240,0,109,191,6533e763,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6f58570,...) at mi_switch+0x200 ithread_loop(c6f8e8d0,c6ba7d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6f8e8d0,c6ba7d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6ba7d70, ebp = 0 --- Tracing command intr pid 12 tid 100028 td 0xc6f6f480 sched_switch(c6f6f480,0,109,191,f107a8b6,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7ddf0,...) at mi_switch+0x200 ithread_loop(c6d77600,c6b9dd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d77600,c6b9dd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b9dd70, ebp = 0 --- Tracing command intr pid 12 tid 100023 td 0xc6f52000 sched_switch(c6f52000,0,109,191,147f26ac,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7e8f0,...) at mi_switch+0x200 ithread_loop(c6d773a0,c6b67d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d773a0,c6b67d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b67d70, ebp = 0 --- Tracing command intr pid 12 tid 100021 td 0xc6f52480 sched_switch(c6f52480,0,109,191,885ee38f,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7ea70,...) at mi_switch+0x200 ithread_loop(c6d0da10,c6b61d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d0da10,c6b61d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b61d70, ebp = 0 --- Tracing command intr pid 12 tid 100020 td 0xc6f526c0 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100018 td 0xc6f52b40 sched_switch(c6f52b40,0,109,191,bd2db15e,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7eef0,...) at mi_switch+0x200 ithread_loop(c6d0da40,c6b58d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d0da40,c6b58d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b58d70, ebp = 0 --- Tracing command intr pid 12 tid 100012 td 0xc6d7cd80 sched_switch(c6d7cd80,0,109,191,59fd3ac,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d070,...) at mi_switch+0x200 ithread_loop(c6d771b0,c6b46d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d771b0,c6b46d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b46d70, ebp = 0 --- Tracing command intr pid 12 tid 100011 td 0xc6e00000 fork_trampoline() at fork_trampoline Tracing command intr pid 12 tid 100010 td 0xc6e00240 sched_switch(c6e00240,0,109,191,dcc3c456,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d170,...) at mi_switch+0x200 ithread_loop(c6d771d0,c6b40d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d771d0,c6b40d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b40d70, ebp = 0 --- Tracing command intr pid 12 tid 100009 td 0xc6e00480 sched_switch(c6e00480,0,109,191,7e0e2aff,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d570,...) at mi_switch+0x200 ithread_loop(c6d771e0,c6b3dd38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d771e0,c6b3dd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b3dd70, ebp = 0 --- Tracing command intr pid 12 tid 100008 td 0xc6d7a000 sched_switch(c6d7a000,0,109,191,bca54716,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d5f0,...) at mi_switch+0x200 ithread_loop(c6d771f0,c6b3ad38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d771f0,c6b3ad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b3ad70, ebp = 0 --- Tracing command intr pid 12 tid 100007 td 0xc6d7a240 sched_switch(c6d7a240,0,109,191,be17cde7,...) at sched_switch+0x36a mi_switch(109,0,c0c9fbb8,52d,c6d7d670,...) at mi_switch+0x200 ithread_loop(c6d77200,c6b37d38,c0c9f939,343,c6d787f8,...) at ithread_loop+0x1f6 fork_exit(c086ae90,c6d77200,c6b37d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b37d70, ebp = 0 --- Tracing command idle pid 11 tid 100006 td 0xc6d7a480 cpustop_handler(1,c6b33c20,c0bd1116,c6b33bd8,c089f4e8,...) at cpustop_handler+0x32 ipi_nmi_handler(c6b33bd8,c089f4e8,f88e302e,80012242,c6d78aa0,...) at ipi_nmi_handler+0x2f trap(c6b33c2c) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc0ba77e5, esp = 0xc6b33c6c, ebp = 0xc6b33c6c --- acpi_cpu_c1(0,c6b33cd4,0,ffffffff,c6b33cb4,...) at acpi_cpu_c1+0x5 acpi_cpu_idle(ffffffff,0,c6b33cb4,c0bbef9b,0,...) at acpi_cpu_idle+0x11c cpu_idle_amdc1e(0,c6b33cf8,c08b808e,0,c6b33cd4,...) at cpu_idle_amdc1e+0x56 cpu_idle(0,c6b33cd4,c0ca61b6,9fa,c6d7a480,...) at cpu_idle+0x1b sched_idletd(0,c6b33d38,c0c9f939,343,c6d78aa0,...) at sched_idletd+0x23e fork_exit(c08b7e50,0,c6b33d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b33d70, ebp = 0 --- Tracing command idle pid 11 tid 100005 td 0xc6d7a6c0 kdb_enter(c0c4cc09,c0c8d434,c0e0325c,c70d1080,0,...) at kdb_enter+0x3a uart_intr(c70d1000,c6d7a6c0,c6d588d0,c6d7e100,4,...) at uart_intr+0x126 intr_event_handle(c6d7e100,c6b30c2c,1,1f4,c6fc3000,...) at intr_event_handle+0x5c intr_execute_handlers(c6d588d0,c6b30c2c,1,c6b30c6c,c0bb33c4,...) at intr_execute_handlers+0x49 lapic_handle_intr(30,c6b30c2c) at lapic_handle_intr+0x4c Xapic_isr1() at Xapic_isr1+0x34 --- interrupt, eip = 0xc0ba77e5, esp = 0xc6b30c6c, ebp = 0xc6b30c6c --- acpi_cpu_c1(c0bb35df,c6b30cd4,1,ffffffff,c6b30cb4,...) at acpi_cpu_c1+0x5 acpi_cpu_idle(ffffffff,0,c6b30cb4,c0bbef9b,1,...) at acpi_cpu_idle+0x11c cpu_idle_amdc1e(1,c6b30cf8,c08b808e,1,c6b30cd4,...) at cpu_idle_amdc1e+0x56 cpu_idle(1,c6b30cd4,c0ca61b6,9fa,c6d7a6c0,...) at cpu_idle+0x1b sched_idletd(0,c6b30d38,c0c9f939,343,c6d78aa0,...) at sched_idletd+0x23e fork_exit(c08b7e50,0,c6b30d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b30d70, ebp = 0 --- Tracing command idle pid 11 tid 100004 td 0xc6d7a900 sched_switch(c6d7a900,0,108,18c,76fda2d8,...) at sched_switch+0x36a mi_switch(108,0,c0ca61b6,3ad,c6d7a900,...) at mi_switch+0x200 sched_idletd(0,c6b2dd38,c0c9f939,343,c6d78aa0,...) at sched_idletd+0x19b fork_exit(c08b7e50,0,c6b2dd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b2dd70, ebp = 0 --- Tracing command idle pid 11 tid 100003 td 0xc6d7ab40 cpustop_handler(8,c6b2ac20,c0bd1116,c0e032d4,c6b2abb4,...) at cpustop_handler+0x32 ipi_nmi_handler(c0e032d4,c6b2abb4,c08821b4,c0e032d4,c6d78aa0,...) at ipi_nmi_handler+0x2f trap(c6b2ac2c) at trap+0x36 calltrap() at calltrap+0x6 --- trap 0x13, eip = 0xc0ba77e5, esp = 0xc6b2ac6c, ebp = 0xc6b2ac6c --- acpi_cpu_c1(3,c6b2acd4,3,ffffffff,c6b2acb4,...) at acpi_cpu_c1+0x5 acpi_cpu_idle(ffffffff,0,c6b2acb4,c0bbef9b,0,...) at acpi_cpu_idle+0x11c cpu_idle_amdc1e(0,c6b2acf8,c08b808e,0,c6b2acd4,...) at cpu_idle_amdc1e+0x56 cpu_idle(0,c6b2acd4,c0ca61b6,3af,c6d7ab40,...) at cpu_idle+0x1b sched_idletd(0,c6b2ad38,c0c9f939,343,c6d78aa0,...) at sched_idletd+0x23e fork_exit(c08b7e50,0,c6b2ad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b2ad70, ebp = 0 --- Tracing command init pid 1 tid 100002 td 0xc6d7ad80 sched_switch(c6d7ad80,0,104,191,c97b8179,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,5c,...) at mi_switch+0x200 sleepq_switch(c6d7ad80,0,c0ca8bd1,1a0,5c,...) at sleepq_switch+0x15f sleepq_catch_signals(c0ca8bd1,160,0,100,100,...) at sleepq_catch_signals+0xb7 sleepq_wait_sig(c6d78d48,5c,c0cd1949,100,0,...) at sleepq_wait_sig+0x17 _sleep(c6d78d48,c6d78dd0,15c,c0cd1949,0,...) at _sleep+0x354 kern_wait(c6d7ad80,ffffffff,c6b26c74,2,0,...) at kern_wait+0xb76 wait4(c6d7ad80,c6b26cf8,c0cdfb9b,c0cab205,c6d78d48,...) at wait4+0x3b syscall(c6b26d38) at syscall+0x230 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (7, FreeBSD ELF32, wait4), eip = 0x80555cf, esp = 0xbfbfe79c, ebp = 0xbfbfe7b8 --- Tracing command audit pid 10 tid 100001 td 0xc6d7c000 sched_switch(c6d7c000,0,104,191,f108fc89,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6d7c000,0,c0ca8bd1,260,c6d7c000,...) at sleepq_switch+0x15f sleepq_wait(c0f7a980,0,c6b23c9c,1,0,...) at sleepq_wait+0x63 _cv_wait(c0f7a980,c0f7a964,c0cc8ddb,194,0,...) at _cv_wait+0x240 audit_worker(0,c6b23d38,c0c9f939,343,c6d79000,...) at audit_worker+0x84 fork_exit(c0a9b540,0,c6b23d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b23d70, ebp = 0 --- Tracing command kernel pid 0 tid 100061 td 0xc6fbd6c0 sched_switch(c6fbd6c0,0,104,191,bd05e3b9,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6fbd6c0,0,c0ca8bd1,260,c6fbd6c0,...) at sleepq_switch+0x15f sleepq_wait(c6fa4900,0,c0ca51af,c0c99d7b,0,...) at sleepq_wait+0x63 msleep_spin(c6fa4900,c6fa4918,c0c99d7b,0,c0ca2cf1,...) at msleep_spin+0x21d taskqueue_thread_loop(c6ffb49c,f3ed6d38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0x94 fork_exit(c08d1860,c6ffb49c,f3ed6d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xf3ed6d70, ebp = 0 --- Tracing command kernel pid 0 tid 100027 td 0xc6e006c0 sched_switch(c6e006c0,0,104,191,5daadbd1,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6e006c0,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c6f46040,0,c0c99d7b,0,0,...) at sleepq_wait+0x63 _sleep(c6f46040,c6f46058,0,c0c99d7b,0,...) at _sleep+0x36b taskqueue_thread_loop(c0e01758,c6b73d38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0xba fork_exit(c08d1860,c0e01758,c6b73d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b73d70, ebp = 0 --- Tracing command kernel pid 0 tid 100026 td 0xc6e00900 sched_switch(c6e00900,0,104,191,5daacab4,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6e00900,0,c0ca8bd1,260,c6e00900,...) at sleepq_switch+0x15f sleepq_wait(c6f46080,0,c0ca51af,c0c99d7b,0,...) at sleepq_wait+0x63 msleep_spin(c6f46080,c6f46098,c0c99d7b,0,c0ca2cf1,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dd2220,c6b70d38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0x94 fork_exit(c08d1860,c0dd2220,c6b70d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b70d70, ebp = 0 --- Tracing command kernel pid 0 tid 100025 td 0xc6e00b40 sched_switch(c6e00b40,0,104,191,5daabde2,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6e00b40,0,c0ca8bd1,260,c6e00b40,...) at sleepq_switch+0x15f sleepq_wait(c6f46080,0,c0ca51af,c0c99d7b,0,...) at sleepq_wait+0x63 msleep_spin(c6f46080,c6f46098,c0c99d7b,0,c0ca2cf1,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dd2220,c6b6dd38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0x94 fork_exit(c08d1860,c0dd2220,c6b6dd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b6dd70, ebp = 0 --- Tracing command kernel pid 0 tid 100024 td 0xc6e00d80 sched_switch(c6e00d80,0,104,191,5daaac72,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6e00d80,0,c0ca8bd1,260,c6e00d80,...) at sleepq_switch+0x15f sleepq_wait(c6f46080,0,c0ca51af,c0c99d7b,0,...) at sleepq_wait+0x63 msleep_spin(c6f46080,c6f46098,c0c99d7b,0,c0ca2cf1,...) at msleep_spin+0x21d taskqueue_thread_loop(c0dd2220,c6b6ad38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0x94 fork_exit(c08d1860,c0dd2220,c6b6ad38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b6ad70, ebp = 0 --- Tracing command kernel pid 0 tid 100019 td 0xc6f52900 sched_switch(c6f52900,0,104,191,1481165a,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6f52900,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c6f46300,0,c0c99d7b,0,0,...) at sleepq_wait+0x63 _sleep(c6f46300,c6f46318,0,c0c99d7b,0,...) at _sleep+0x36b taskqueue_thread_loop(c0e15648,c6b5bd38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0xba fork_exit(c08d1860,c0e15648,c6b5bd38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b5bd70, ebp = 0 --- Tracing command kernel pid 0 tid 100016 td 0xc6d7c480 sched_switch(c6d7c480,0,104,191,1a815419,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,0,...) at mi_switch+0x200 sleepq_switch(c6d7c480,0,c0ca8bd1,260,0,...) at sleepq_switch+0x15f sleepq_wait(c6d5fe40,0,c0c99d7b,0,0,...) at sleepq_wait+0x63 _sleep(c6d5fe40,c6d5fe58,0,c0c99d7b,0,...) at _sleep+0x36b taskqueue_thread_loop(c0e140e0,c6b52d38,c0c9f939,343,c0e00ec0,...) at taskqueue_thread_loop+0xba fork_exit(c08d1860,c0e140e0,c6b52d38) at fork_exit+0xb8 fork_trampoline() at fork_trampoline+0x8 --- trap 0, eip = 0, esp = 0xc6b52d70, ebp = 0 --- Tracing command kernel pid 0 tid 100000 td 0xc0e01170 sched_switch(c0e01170,0,104,191,c5bacbd3,...) at sched_switch+0x36a mi_switch(104,0,c0ca8bd1,1eb,44,...) at mi_switch+0x200 sleepq_switch(c0e01170,0,c0ca8bd1,283,0,...) at sleepq_switch+0x15f sleepq_timedwait(c0e00ec0,44,c0ca6a2b,0,0,...) at sleepq_timedwait+0x6b _sleep(c0e00ec0,0,44,c0ca6a2b,2710,...) at _sleep+0x339 scheduler(0,141ec00,141ec00,141e000,1425000,...) at scheduler+0x23e mi_startup() at mi_startup+0x96 begin() at begin+0x2c db:0:allt> call doadump Physical memory: 3439 MB Dumping 246 MB: 231 215 199 183 167 151 135 119 103 87 71 55 39 23 7 Dump complete = 0xf db:0:doadump> reset cpu_reset: Restarting BSP cpu_reset_proxy: Stopped CPU 1 \|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|//boot/kernel/kernel text=0x8e8c5c -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|data=0xe5714+0x200fa0 /-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-syms=[0x4+0xa04d0\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-+0x4+0xdb351\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/] -\|/-\|/-\|/-\|/-\|/-\|/-\|//boot/kernel/snd_hda.ko text=0x1873c -\|/-\data=0x3c4+0x4 syms=[0x4+0x12c0+0x4+0x1562] loading required module 'sound' |/-\|/-\|/-\|/-\|/-\|/-\|/-\/boot/kernel/sound.ko text=0x4b7cc |/-\|/-\|/-\|/-\|/-data=0xa4a4+0x164 \|/syms=[0x4+0x53a0-+0x4+0x6079\|] /-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/- ______ | ____| __ ___ ___  | |__ | '__/ _ \/ _ \ | __|| | | __/ __/ | | | | | | | |_| |_| \___|\___| ____ _____ _____ | _ \ / ____| __ \ | |_) | (___ | | | | | _ < \___ \| | | | | |_) |____) | |__| | | | | | |____/|_____/|_____/³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÚÀ¿ÙWelcome to FreeBSD!1 . Boot FreeBSD [default]2 . Boot FreeBSD with ACPI disabled3 . Boot FreeBSD in Safe Mode4 . Boot FreeBSD in single user mode5 . Boot FreeBSD with verbose logging6 . Escape to loader prompt7 . RebootSelect option, [Enter] for defaultor [Space] to pause timer 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \|/-\|/GDB: no debug ports present git diff master diff --git a/sys/conf/files b/sys/conf/files index 82408d6..dcf4462 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2040,6 +2040,7 @@ kern/kern_poll.c optional device_polling kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_prot.c standard +kern/kern_rangelock.c standard kern/kern_resource.c standard kern/kern_rmlock.c standard kern/kern_rwlock.c standard @@ -2731,6 +2732,7 @@ vm/vm_page.c standard vm/vm_pageout.c standard vm/vm_pager.c standard vm/vm_phys.c standard +vm/vm_readwrite.c standard vm/vm_reserv.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 2006099..d3eb99d 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include @@ -587,7 +588,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp) { struct sf_buf *sf; int rv, offs, len, lastend; - vm_pindex_t i, lastp; + vm_pindex_t i, firstp, lastp; vm_page_t m; u_char *p; @@ -610,18 +611,26 @@ mdstart_swap(struct md_s *sc, struct bio *bp) * we're operating on complete aligned pages). */ offs = bp->bio_offset % PAGE_SIZE; + firstp = bp->bio_offset / PAGE_SIZE; lastp = (bp->bio_offset + bp->bio_length - 1) / PAGE_SIZE; lastend = (bp->bio_offset + bp->bio_length - 1) % PAGE_SIZE + 1; + vm_page_t ma[lastp - firstp + 1]; + rv = VM_PAGER_OK; VM_OBJECT_LOCK(sc->object); vm_object_pip_add(sc->object, 1); - for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) { + for (i = firstp; i <= lastp; i++) { len = ((i == lastp) ? lastend : PAGE_SIZE) - offs; - m = vm_page_grab(sc->object, i, - VM_ALLOC_NORMAL|VM_ALLOC_RETRY); + /* + * Write cleans pages of the buffer, give it a + * priority. + */ + m = vm_page_grab(sc->object, i, (bp->bio_cmd == BIO_WRITE ? + VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_RETRY); VM_OBJECT_UNLOCK(sc->object); + ma[i - firstp] = m; sched_pin(); sf = sf_buf_alloc(m, SFB_CPUPRIVATE); VM_OBJECT_LOCK(sc->object); @@ -683,6 +692,12 @@ printf("wire_count %d busy %d flags %x hold_count %d act_count %d queue %d valid } vm_object_pip_subtract(sc->object, 1); vm_object_set_writeable_dirty(sc->object); + if (rv != VM_PAGER_ERROR && bp->bio_cmd == BIO_WRITE && + vm_page_count_severe()) { + vm_page_lock_queues(); + vm_pageout_flush(ma, lastp - firstp + 1, IO_SYNC); + vm_page_unlock_queues(); + } VM_OBJECT_UNLOCK(sc->object); return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); } diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c new file mode 100644 index 0000000..86f0869 --- /dev/null +++ b/sys/kern/kern_rangelock.c @@ -0,0 +1,186 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +uma_zone_t rl_entry_zone; + +static void +rangelock_sys_init(void) +{ + + rl_entry_zone = uma_zcreate("rl_entry", sizeof(struct rl_q_entry), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); +} +SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, rangelock_sys_init, NULL); + +void +rangelock_init(struct rangelock *lock) +{ + + TAILQ_INIT(&lock->rl_waiters); + lock->rl_currdep = NULL; +} + +void +rangelock_destroy(struct rangelock *lock) +{ + + KASSERT(TAILQ_EMPTY(&lock->rl_waiters), ("Dangling waiters")); +} + +static int +rangelock_incompatible(const struct rl_q_entry *e1, + const struct rl_q_entry *e2) +{ + + if ((e1->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ && + (e2->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ) + return (0); +#define IN_RANGE(a, e) (a >= e->rl_q_start && a < e->rl_q_end) + if (IN_RANGE(e1->rl_q_start, e2) || IN_RANGE(e2->rl_q_start, e1) || + IN_RANGE(e1->rl_q_end, e2) || IN_RANGE(e2->rl_q_end, e1)) + return (1); +#undef IN_RANGE + return (0); +} + +static void +rangelock_calc_block(struct rangelock *lock) +{ + struct rl_q_entry *entry, *entry1, *whead; + + if (lock->rl_currdep == TAILQ_FIRST(&lock->rl_waiters) && + lock->rl_currdep != NULL) + lock->rl_currdep = TAILQ_NEXT(lock->rl_currdep, rl_q_link); + for (entry = lock->rl_currdep; entry; + entry = TAILQ_NEXT(entry, rl_q_link)) { + TAILQ_FOREACH(entry1, &lock->rl_waiters, rl_q_link) { + if (rangelock_incompatible(entry, entry1)) + goto out; + if (entry1 == entry) + break; + } + } +out: + lock->rl_currdep = entry; + TAILQ_FOREACH(whead, &lock->rl_waiters, rl_q_link) { + if (whead == lock->rl_currdep) + break; + if (!(whead->rl_q_flags & RL_LOCK_GRANTED)) { + whead->rl_q_flags |= RL_LOCK_GRANTED; + wakeup(whead); + } + } +} + +static void +rangelock_unlock_vp_locked(struct vnode *vp, struct rl_q_entry *entry) +{ + + ASSERT_VI_LOCKED(vp, "rangelock"); + KASSERT(entry != vp->v_rl.rl_currdep, ("stuck currdep")); + TAILQ_REMOVE(&vp->v_rl.rl_waiters, entry, rl_q_link); + rangelock_calc_block(&vp->v_rl); + VI_UNLOCK(vp); + uma_zfree(rl_entry_zone, entry); +} + +void +rangelock_unlock(struct vnode *vp, void *cookie) +{ + struct rl_q_entry *entry; + + entry = cookie; + VI_LOCK(vp); + rangelock_unlock_vp_locked(vp, entry); +} + +void * +rangelock_unlock_range(struct vnode *vp, void *cookie, off_t base, size_t len) +{ + struct rl_q_entry *entry; + + entry = cookie; + VI_LOCK(vp); + KASSERT(entry->rl_q_flags & RL_LOCK_GRANTED, ("XXX")); + KASSERT(entry->rl_q_start == base, ("XXX")); + KASSERT(entry->rl_q_end >= base + len, ("XXX")); + if (entry->rl_q_end == base + len) { + rangelock_unlock_vp_locked(vp, cookie); + return (NULL); + } + entry->rl_q_end = base + len; + rangelock_calc_block(&vp->v_rl); + VI_UNLOCK(vp); + return (cookie); +} + +static void * +rangelock_enqueue(struct vnode *vp, struct rl_q_entry *entry) +{ + + VI_LOCK(vp); + TAILQ_INSERT_TAIL(&vp->v_rl.rl_waiters, entry, rl_q_link); + if (vp->v_rl.rl_currdep == NULL) + vp->v_rl.rl_currdep = entry; + rangelock_calc_block(&vp->v_rl); + while (!(entry->rl_q_flags & RL_LOCK_GRANTED)) + msleep(entry, &vp->v_interlock, 0, "range", 0); + VI_UNLOCK(vp); + return (entry); +} + +void * +rangelock_rlock(struct vnode *vp, off_t base, size_t len) +{ + struct rl_q_entry *entry; + + entry = uma_zalloc(rl_entry_zone, M_WAITOK); + entry->rl_q_flags = RL_LOCK_READ; + entry->rl_q_start = base; + entry->rl_q_end = base + len; + return (rangelock_enqueue(vp, entry)); +} + +void * +rangelock_wlock(struct vnode *vp, off_t base, size_t len) +{ + struct rl_q_entry *entry; + + entry = uma_zalloc(rl_entry_zone, M_WAITOK); + entry->rl_q_flags = RL_LOCK_WRITE; + entry->rl_q_start = base; + entry->rl_q_end = base + len; + return (rangelock_enqueue(vp, entry)); +} diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 1ab263c..d249e44 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -71,8 +71,8 @@ static int write_behind = 1; SYSCTL_INT(_vfs, OID_AUTO, write_behind, CTLFLAG_RW, &write_behind, 0, "Cluster write-behind; 0: disable, 1: enable, 2: backed off"); -static int read_max = 8; -SYSCTL_INT(_vfs, OID_AUTO, read_max, CTLFLAG_RW, &read_max, 0, +int vfs_read_max = 8; +SYSCTL_INT(_vfs, OID_AUTO, read_max, CTLFLAG_RW, &vfs_read_max, 0, "Cluster read-ahead max block count"); /* Page expended to mark partially backed buffers */ @@ -109,7 +109,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp) */ racluster = vp->v_mount->mnt_iosize_max / size; maxra = seqcount; - maxra = min(read_max, maxra); + maxra = min(vfs_read_max, maxra); maxra = min(nbuf/8, maxra); if (((u_quad_t)(lblkno + maxra + 1) * size) > filesize) maxra = (filesize / size) - lblkno; @@ -803,7 +803,9 @@ cluster_wbuild(vp, size, start_lbn, len) (tbp->b_bcount != tbp->b_bufsize) || (tbp->b_bcount != size) || (len == 1) || - ((bp = getpbuf(&cluster_pbuf_freecnt)) == NULL)) { + ((bp = (vp->v_vflag & VV_MD) ? + trypbuf(&cluster_pbuf_freecnt) : + getpbuf(&cluster_pbuf_freecnt)) == NULL)) { totalwritten += tbp->b_bufsize; bawrite(tbp); ++start_lbn; diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index b80d03d..3636360 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -77,6 +77,8 @@ static int dirent_exists(struct vnode *vp, const char *dirname, #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) +static int vop_stdextend(struct vop_extend_args *ap); + /* * This vnode table stores what we want to do if the filesystem doesn't * implement a particular VOP. @@ -118,6 +120,7 @@ struct vop_vector default_vnodeops = { .vop_unlock = vop_stdunlock, .vop_vptocnp = vop_stdvptocnp, .vop_vptofh = vop_stdvptofh, + .vop_extend = vop_stdextend, }; /* @@ -825,6 +828,23 @@ out: return (error); } +static int +vop_stdextend(struct vop_extend_args *ap) +{ + struct vattr vattr, oattr; + int error; + + + error = VOP_GETATTR(ap->a_vp, &oattr, ap->a_cred); + if (error != 0) + return (error); + if (oattr.va_size >= ap->a_size) + return (0); + VATTR_NULL(&vattr); + vattr.va_size = ap->a_size; + return (VOP_SETATTR(ap->a_vp, &vattr, ap->a_cred)); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index daaa5b1..245d00e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -861,6 +861,7 @@ vdestroy(struct vnode *vp) /* XXX Elsewhere we can detect an already freed vnode via NULL v_op. */ vp->v_op = NULL; #endif + rangelock_destroy(&vp->v_rl); lockdestroy(vp->v_vnlock); mtx_destroy(&vp->v_interlock); mtx_destroy(BO_MTX(bo)); @@ -1015,6 +1016,7 @@ alloc: if ((mp->mnt_kern_flag & MNTK_NOKNOTE) != 0) vp->v_vflag |= VV_NOKNOTE; } + rangelock_init(&vp->v_rl); *vpp = vp; return (0); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index d0b713c..bc88b8a 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -37,12 +37,14 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include #include #include #include +#include #include #include #include @@ -62,6 +64,13 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + +static int vmio_enabled = 1; +SYSCTL_INT(_vfs, OID_AUTO, vmio_enabled, CTLFLAG_RW, &vmio_enabled, 0, + "Use vm pages copyin/out instead of vops for read/write"); + static fo_rdwr_t vn_read; static fo_rdwr_t vn_write; static fo_truncate_t vn_truncate; @@ -83,6 +92,9 @@ struct fileops vnops = { .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; +static int vn_write_chunk(struct vnode *, struct uio *, struct ucred *, + struct ucred *, int); + int vn_open(ndp, flagp, cmode, fp) struct nameidata *ndp; @@ -275,17 +287,14 @@ vn_writechk(vp) * Vnode close call */ int -vn_close(vp, flags, file_cred, td) - register struct vnode *vp; - int flags; - struct ucred *file_cred; - struct thread *td; +vn_close(struct vnode *vp, int flags, struct ucred *file_cred, + struct thread *td) { - struct mount *mp; + struct mount *mp, *mp1; int error, lock_flags; - if (!(flags & FWRITE) && vp->v_mount != NULL && - vp->v_mount->mnt_kern_flag & MNTK_EXTENDED_SHARED) + if (!(flags & FWRITE) && (mp1 = vp->v_mount) != NULL && + MNT_SHARED_WRITES(mp1)) lock_flags = LK_SHARED; else lock_flags = LK_EXCLUSIVE; @@ -333,7 +342,7 @@ sequential_heuristic(struct uio *uio, struct file *fp) * closely related to the best I/O size for real disks than * to any block size used by software. */ - fp->f_seqcount += howmany(uio->uio_resid, 16384); + fp->f_seqcount += howmany(uio->uio_resid, FRA_BLOCK_SZ); if (fp->f_seqcount > IO_SEQMAX) fp->f_seqcount = IO_SEQMAX; return (fp->f_seqcount << IO_SEQSHIFT); @@ -351,76 +360,71 @@ sequential_heuristic(struct uio *uio, struct file *fp) * Package up an I/O request on a vnode into a uio and do it. */ int -vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred, - aresid, td) - enum uio_rw rw; - struct vnode *vp; - void *base; - int len; - off_t offset; - enum uio_seg segflg; - int ioflg; - struct ucred *active_cred; - struct ucred *file_cred; - int *aresid; - struct thread *td; +vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, + enum uio_seg segflg, int ioflg, struct ucred *active_cred, + struct ucred *file_cred, int *aresid, struct thread *td) { struct uio auio; struct iovec aiov; struct mount *mp; struct ucred *cred; + void *rl_cookie; int error, lock_flags; VFS_ASSERT_GIANT(vp->v_mount); + auio.uio_iov = &aiov; + auio.uio_iovcnt = 1; + aiov.iov_base = base; + aiov.iov_len = len; + auio.uio_resid = len; + auio.uio_offset = offset; + auio.uio_segflg = segflg; + auio.uio_rw = rw; + auio.uio_td = td; + error = 0; + if ((ioflg & IO_NODELOCKED) == 0) { + if (rw == UIO_READ) + rl_cookie = rangelock_rlock(vp, offset, len); + else + rl_cookie = rangelock_wlock(vp, offset, len); mp = NULL; if (rw == UIO_WRITE) { if (vp->v_type != VCHR && (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) - return (error); + goto out; if (MNT_SHARED_WRITES(mp) || - ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) lock_flags = LK_SHARED; - } else { + else lock_flags = LK_EXCLUSIVE; - } - vn_lock(vp, lock_flags | LK_RETRY); } else - vn_lock(vp, LK_SHARED | LK_RETRY); + lock_flags = LK_SHARED; + vn_lock(vp, lock_flags | LK_RETRY); + } else + rl_cookie = NULL; - } ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); - auio.uio_iov = &aiov; - auio.uio_iovcnt = 1; - aiov.iov_base = base; - aiov.iov_len = len; - auio.uio_resid = len; - auio.uio_offset = offset; - auio.uio_segflg = segflg; - auio.uio_rw = rw; - auio.uio_td = td; - error = 0; #ifdef MAC if ((ioflg & IO_NOMACCHECK) == 0) { - if (rw == UIO_READ) - error = mac_vnode_check_read(active_cred, file_cred, - vp); - else + if (rw == UIO_WRITE) error = mac_vnode_check_write(active_cred, file_cred, vp); } #endif if (error == 0) { - if (file_cred) + if (file_cred != NULL) cred = file_cred; else cred = active_cred; if (rw == UIO_READ) - error = VOP_READ(vp, &auio, ioflg, cred); + error = vn_read_chunk(vp, &auio, active_cred, cred, + ioflg | IO_NODELOCKED); else - error = VOP_WRITE(vp, &auio, ioflg, cred); + error = vn_write_chunk(vp, &auio, active_cred, cred, + ioflg | IO_NODELOCKED); } if (aresid) *aresid = auio.uio_resid; @@ -428,10 +432,13 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred, if (auio.uio_resid && error == 0) error = EIO; if ((ioflg & IO_NODELOCKED) == 0) { - if (rw == UIO_WRITE && vp->v_type != VCHR) - vn_finished_write(mp); VOP_UNLOCK(vp, 0); + if (mp != NULL) + vn_finished_write(mp); } + out: + if (rl_cookie != NULL) + rangelock_unlock(vp, rl_cookie); return (error); } @@ -493,68 +500,148 @@ vn_rdwr_inchunks(rw, vp, base, len, offset, segflg, ioflg, active_cred, return (error); } +static struct mtx * +vn_lock_foffset(struct file *fp) +{ + struct mtx *mtxp; + + mtxp = mtx_pool_find(mtxpool_sleep, fp); + mtx_lock(mtxp); + while (fp->f_vnread_flags & FOFFSET_LOCKED) { + fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; + msleep(&fp->f_vnread_flags, mtxp, PUSER -1, + "vnread offlock", 0); + } + fp->f_vnread_flags |= FOFFSET_LOCKED; + mtx_unlock(mtxp); + return (mtxp); +} + +static void +vn_unlock_foffset(struct file *fp, struct mtx *mtxp) +{ + + mtx_lock(mtxp); + if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) + wakeup(&fp->f_vnread_flags); + fp->f_vnread_flags = 0; + mtx_unlock(mtxp); +} + +int +vn_read_chunk(struct vnode *vp, struct uio *uio, struct ucred *active_cred, + struct ucred *fcred, int ioflag) +{ + int error, vfslocked; + + error = 0; + vfslocked = 0; /* gcc */ + + if ((ioflag & IO_NODELOCKED) == 0) { + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + vn_lock(vp, LK_SHARED | LK_RETRY); + } + +#ifdef MAC + if ((ioflag & IO_NOMACCHECK) == 0) + error = mac_vnode_check_read(active_cred, fcred, vp); +#endif + if (error == 0) { + if (!vmio_enabled || + (error = vnode_pager_read(vp, uio, ioflag)) == EOPNOTSUPP) + error = VOP_READ(vp, uio, ioflag, fcred); + } + if ((ioflag & IO_NODELOCKED) == 0) { + VOP_UNLOCK(vp, 0); + VFS_UNLOCK_GIANT(vfslocked); + } + return (error); +} + /* * File table vnode read routine. */ static int -vn_read(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - struct thread *td; - int flags; +vn_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, + struct thread *td) { struct vnode *vp; - int error, ioflag; struct mtx *mtxp; - int vfslocked; + void *rl_cookie; + int ioflag; + int error; KASSERT(uio->uio_td == td, ("uio_td %p is not td %p", uio->uio_td, td)); - mtxp = NULL; - vp = fp->f_vnode; ioflag = 0; if (fp->f_flag & FNONBLOCK) ioflag |= IO_NDELAY; if (fp->f_flag & O_DIRECT) ioflag |= IO_DIRECT; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); + vp = fp->f_vnode; + /* * According to McKusick the vn lock was protecting f_offset here. * It is now protected by the FOFFSET_LOCKED flag. */ if ((flags & FOF_OFFSET) == 0) { - mtxp = mtx_pool_find(mtxpool_sleep, fp); - mtx_lock(mtxp); - while(fp->f_vnread_flags & FOFFSET_LOCKED) { - fp->f_vnread_flags |= FOFFSET_LOCK_WAITING; - msleep(&fp->f_vnread_flags, mtxp, PUSER -1, - "vnread offlock", 0); - } - fp->f_vnread_flags |= FOFFSET_LOCKED; - mtx_unlock(mtxp); - vn_lock(vp, LK_SHARED | LK_RETRY); + mtxp = vn_lock_foffset(fp); uio->uio_offset = fp->f_offset; } else - vn_lock(vp, LK_SHARED | LK_RETRY); - + mtxp = NULL; /* gcc */ + if (vp->v_type == VREG) + rl_cookie = rangelock_rlock(vp, uio->uio_offset, + uio->uio_resid); + else + rl_cookie = NULL; ioflag |= sequential_heuristic(uio, fp); + error = vn_read_chunk(vp, uio, active_cred, fp->f_cred, ioflag); + fp->f_nextoff = uio->uio_offset; + if (rl_cookie != NULL) + rangelock_unlock(vp, rl_cookie); + if ((flags & FOF_OFFSET) == 0) { + fp->f_offset = uio->uio_offset; + vn_unlock_foffset(fp, mtxp); + } + return (error); +} +static int +vn_write_chunk(struct vnode *vp, struct uio *uio, struct ucred *active_cred, + struct ucred *fcred, int ioflag) +{ + struct mount *mp, *mp1; + int error, lock_flags, vfslocked; + + mp = NULL; + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + if (vp->v_type == VREG) + bwillwrite(); + if (vp->v_type != VCHR && + (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) + goto unlock; + + if (MNT_SHARED_WRITES(mp) || + (mp == NULL && (mp1 = vp->v_mount) != NULL && + MNT_SHARED_WRITES(mp1))) + lock_flags = LK_SHARED; + else + lock_flags = LK_EXCLUSIVE; + vn_lock(vp, lock_flags | LK_RETRY); #ifdef MAC - error = mac_vnode_check_read(active_cred, fp->f_cred, vp); - if (error == 0) + error = mac_vnode_check_write(active_cred, fcred, vp); +#else + error = 0; #endif - error = VOP_READ(vp, uio, ioflag, fp->f_cred); - if ((flags & FOF_OFFSET) == 0) { - fp->f_offset = uio->uio_offset; - mtx_lock(mtxp); - if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING) - wakeup(&fp->f_vnread_flags); - fp->f_vnread_flags = 0; - mtx_unlock(mtxp); + if (error == 0) { + if (!vmio_enabled || + (error = vnode_pager_write(vp, uio, ioflag)) == EOPNOTSUPP) + error = VOP_WRITE(vp, uio, ioflag, fcred); } - fp->f_nextoff = uio->uio_offset; VOP_UNLOCK(vp, 0); + if (vp->v_type != VCHR) + vn_finished_write(mp); +unlock: VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -563,24 +650,17 @@ vn_read(fp, uio, active_cred, flags, td) * File table vnode write routine. */ static int -vn_write(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - struct thread *td; - int flags; +vn_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, + struct thread *td) { struct vnode *vp; - struct mount *mp; - int error, ioflag, lock_flags; - int vfslocked; + struct mtx *mtxp; + void *rl_cookie; + int error, ioflag; KASSERT(uio->uio_td == td, ("uio_td %p is not td %p", uio->uio_td, td)); vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - if (vp->v_type == VREG) - bwillwrite(); ioflag = IO_UNIT; if (vp->v_type == VREG && (fp->f_flag & O_APPEND)) ioflag |= IO_APPEND; @@ -591,36 +671,32 @@ vn_write(fp, uio, active_cred, flags, td) if ((fp->f_flag & O_FSYNC) || (vp->v_mount && (vp->v_mount->mnt_flag & MNT_SYNCHRONOUS))) ioflag |= IO_SYNC; - mp = NULL; - if (vp->v_type != VCHR && - (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) - goto unlock; - - if ((MNT_SHARED_WRITES(mp) || - ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) && - (flags & FOF_OFFSET) != 0) { - lock_flags = LK_SHARED; - } else { - lock_flags = LK_EXCLUSIVE; - } - - vn_lock(vp, lock_flags | LK_RETRY); - if ((flags & FOF_OFFSET) == 0) + if ((flags & FOF_OFFSET) == 0) { + mtxp = vn_lock_foffset(fp); uio->uio_offset = fp->f_offset; + } else + mtxp = NULL; /* gcc */ ioflag |= sequential_heuristic(uio, fp); -#ifdef MAC - error = mac_vnode_check_write(active_cred, fp->f_cred, vp); - if (error == 0) -#endif - error = VOP_WRITE(vp, uio, ioflag, fp->f_cred); - if ((flags & FOF_OFFSET) == 0) + if (vp->v_type == VREG) { + if ((ioflag & IO_APPEND) || !(flags & FOF_OFFSET)) + /* + * For appenders, punt and lock the whole + * range. It also protects f_offset. + */ + rl_cookie = rangelock_wlock(vp, 0, (size_t)-1); + else + rl_cookie = rangelock_wlock(vp, uio->uio_offset, + uio->uio_resid); + } else + rl_cookie = NULL; + error = vn_write_chunk(vp, uio, active_cred, fp->f_cred, ioflag); + if (rl_cookie != NULL) + rangelock_unlock(vp, rl_cookie); + if ((flags & FOF_OFFSET) == 0) { fp->f_offset = uio->uio_offset; + vn_unlock_foffset(fp, mtxp); + } fp->f_nextoff = uio->uio_offset; - VOP_UNLOCK(vp, 0); - if (vp->v_type != VCHR) - vn_finished_write(mp); -unlock: - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -628,25 +704,29 @@ unlock: * File table truncate routine. */ static int -vn_truncate(fp, length, active_cred, td) - struct file *fp; - off_t length; - struct ucred *active_cred; - struct thread *td; +vn_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) { struct vattr vattr; struct mount *mp; struct vnode *vp; + void *rl_cookie; int vfslocked; int error; vp = fp->f_vnode; + + /* + * Lock the range where the shortening take place. Increase of + * file size does not need rangelock, but it is faster to lock + * the range then call VOP_GETATTR to get the current size and + * deal with races. + */ + rl_cookie = rangelock_wlock(vp, length, -1); vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_start_write(vp, &mp, V_WAIT | PCATCH); - if (error) { - VFS_UNLOCK_GIANT(vfslocked); - return (error); - } + if (error) + goto out1; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_type == VDIR) { error = EISDIR; @@ -666,7 +746,9 @@ vn_truncate(fp, length, active_cred, td) out: VOP_UNLOCK(vp, 0); vn_finished_write(mp); +out1: VFS_UNLOCK_GIANT(vfslocked); + rangelock_unlock(vp, rl_cookie); return (error); } diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index c9f20e3..27e298c 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -611,3 +611,12 @@ vop_vptocnp { INOUT char *buf; INOUT int *buflen; }; + +%% extend vp L L L + +vop_extend { + IN struct vnode *vp; + IN struct ucred *cred; + IN u_quad_t size; + IN int flags; +}; diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 8f3b1b2..e6fdf7e 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -257,6 +257,8 @@ extern const char *buf_wmesg; /* Default buffer lock message */ #include /* XXX for curthread */ #include +extern int vfs_read_max; + /* * Initialize a lock. */ diff --git a/sys/sys/file.h b/sys/sys/file.h index 8ad30a5..b9f52ae 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -141,6 +141,8 @@ struct file { #define FOFFSET_LOCKED 0x1 #define FOFFSET_LOCK_WAITING 0x2 +#define FRA_BLOCK_SZ 16384 + #endif /* _KERNEL || _WANT_FILE */ /* diff --git a/sys/sys/proc.h b/sys/sys/proc.h index dd9efae..0ceab2e 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -354,7 +354,7 @@ do { \ #define TDP_COWINPROGRESS 0x00000010 /* Snapshot copy-on-write in progress. */ #define TDP_ALTSTACK 0x00000020 /* Have alternate signal stack. */ #define TDP_DEADLKTREAT 0x00000040 /* Lock aquisition - deadlock treatment. */ -#define TDP_UNUSED80 0x00000080 /* available. */ +#define TDP_VMIO 0x00000080 /* Busied pages for vnode_pager io. */ #define TDP_NOSLEEPING 0x00000100 /* Thread is not allowed to sleep on a sq. */ #define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */ #define TDP_ITHREAD 0x00000400 /* Thread is an interrupt thread. */ diff --git a/sys/sys/rangelock.h b/sys/sys/rangelock.h new file mode 100644 index 0000000..5ec6433 --- /dev/null +++ b/sys/sys/rangelock.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * All rights reserved. + * + * $FreeBSD$ + */ + +#ifndef _SYS_RANGELOCK_H +#define _SYS_RANGELOCK_H + +#include +#include +#include +#include +#include + +#ifdef _KERNEL + +struct vnode; + +struct rl_q_entry +{ + TAILQ_ENTRY(rl_q_entry) rl_q_link; + size_t rl_q_start, rl_q_end; + int rl_q_flags; +}; + +#define RL_LOCK_READ 0x0001 +#define RL_LOCK_WRITE 0x0002 +#define RL_LOCK_TYPE_MASK 0x0003 +#define RL_LOCK_GRANTED 0x0004 + +struct rangelock +{ + TAILQ_HEAD(, rl_q_entry) rl_waiters; + struct rl_q_entry *rl_currdep; +}; + +void rangelock_init(struct rangelock *lock); +void rangelock_destroy(struct rangelock *lock); +void rangelock_unlock(struct vnode *vp, void *cookie); +void *rangelock_unlock_range(struct vnode *vp, void *cookie, off_t base, + size_t len); +void *rangelock_rlock(struct vnode *vp, off_t base, size_t len); +void *rangelock_wlock(struct vnode *vp, off_t base, size_t len); +#endif + +#endif diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 4c84ea3..6ed52ef 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -168,7 +169,8 @@ struct vnode { */ struct vpollinfo *v_pollinfo; /* G Poll events, p for *v_pi */ struct label *v_label; /* MAC label for vnode */ - struct lockf *v_lockf; /* Byte-level lock list */ + struct lockf *v_lockf; /* Byte-level adv lock list */ + struct rangelock v_rl; /* Byte-range lock */ }; #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ @@ -655,6 +657,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, off_t offset, enum uio_seg segflg, int ioflg, struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, struct thread *td); +int vn_read_chunk(struct vnode *vp, struct uio *uio, + struct ucred *active_cred, struct ucred *f_cred, int ioflag); int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred, struct ucred *file_cred, struct thread *td); int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index a12f96e..9aca6c1 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -634,7 +634,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, if (lastlbn < NDADDR && lastlbn < lbn) { nb = lastlbn; osize = blksize(fs, ip, nb); - if (osize < fs->fs_bsize && osize > 0) { + if (osize < fs->fs_bsize && osize > 0 && dp->di_db[nb] != 0) { UFS_LOCK(ump); error = ffs_realloccg(ip, nb, dp->di_db[nb], ffs_blkpref_ufs2(ip, lastlbn, (int)nb, @@ -701,9 +701,17 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, nsize, osize, bp); } } else { - if (ip->i_size < smalllblktosize(fs, lbn + 1)) + if (ip->i_size < smalllblktosize(fs, lbn)) nsize = fragroundup(fs, size); - else + else if (ip->i_size < smalllblktosize(fs, lbn + 1)) { + /* + * Allocate entire tail of the file. + * Write may cover subpart of the extended + * area. + */ + nsize = fragroundup(fs, max(size, + blkoff(fs, ip->i_size))); + } else nsize = fs->fs_bsize; UFS_LOCK(ump); error = ffs_alloc(ip, lbn, diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 4d652c1..a3e890e 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1651,7 +1651,7 @@ softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp) ufs2_daddr_t newblkno; /* disk block number being added */ ufs2_daddr_t oldblkno; /* previous block number, 0 unless frag */ long newsize; /* size of new block */ - long oldsize; /* size of new block */ + long oldsize; /* size of old block */ struct buf *bp; /* bp for allocated block */ { struct allocdirect *adp, *oldadp; @@ -1765,8 +1765,8 @@ allocdirect_merge(adphead, newadp, oldadp) if (newadp->ad_oldblkno != oldadp->ad_newblkno || newadp->ad_oldsize != oldadp->ad_newsize || newadp->ad_lbn >= NDADDR) - panic("%s %jd != new %jd || old size %ld != new %ld", - "allocdirect_merge: old blkno", + panic("allocdirect_merge: old blkno" + " %jd != new %jd || old size %ld != new %ld", (intmax_t)newadp->ad_oldblkno, (intmax_t)oldadp->ad_newblkno, newadp->ad_oldsize, oldadp->ad_newsize); @@ -2813,7 +2813,11 @@ handle_workitem_freeblocks(freeblks, flags) #ifdef INVARIANTS if (freeblks->fb_chkcnt != blocksreleased && ((fs->fs_flags & FS_UNCLEAN) == 0 || (flags & LK_NOWAIT) != 0)) - printf("handle_workitem_freeblocks: block count\n"); + printf("handle_workitem_freeblocks: ino %jd block count " + "check %jd real %jd diff %jd\n", + (intmax_t)freeblks->fb_previousinum, + (intmax_t)freeblks->fb_chkcnt, (intmax_t)blocksreleased, + (intmax_t)(freeblks->fb_chkcnt - blocksreleased)); if (allerror) softdep_error("handle_workitem_freeblks", allerror); #endif /* INVARIANTS */ diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 464a761..e864692 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -119,7 +119,7 @@ static vop_listextattr_t ffs_listextattr; static vop_openextattr_t ffs_openextattr; static vop_setextattr_t ffs_setextattr; static vop_vptofh_t ffs_vptofh; - +static vop_extend_t ffs_extend; /* Global vfs data structures for ufs. */ struct vop_vector ffs_vnodeops1 = { @@ -131,6 +131,7 @@ struct vop_vector ffs_vnodeops1 = { .vop_reallocblks = ffs_reallocblks, .vop_write = ffs_write, .vop_vptofh = ffs_vptofh, + .vop_extend = ffs_extend, }; struct vop_vector ffs_fifoops1 = { @@ -156,6 +157,7 @@ struct vop_vector ffs_vnodeops2 = { .vop_openextattr = ffs_openextattr, .vop_setextattr = ffs_setextattr, .vop_vptofh = ffs_vptofh, + .vop_extend = ffs_extend, }; struct vop_vector ffs_fifoops2 = { @@ -1783,3 +1785,66 @@ vop_vptofh { ufhp->ufid_gen = ip->i_gen; return (0); } + +static int +ffs_extend(struct vop_extend_args *ap) +{ + struct vnode *vp; + struct inode *ip; + struct buf *bp; + struct fs *fs; + off_t osize, xosize; + u_quad_t size; + ufs_lbn_t lastlbn; + ufs2_daddr_t nb; + int error, flags; + + vp = ap->a_vp; + ip = VTOI(vp); + size = ap->a_size; + osize = ip->i_size; + if (osize >= size) + return (0); + + vnode_pager_setsize(vp, size); + fs = ip->i_fs; + flags = ap->a_flags & IO_SYNC; + if (flags != 0) + goto slow; + + lastlbn = lblkno(fs, osize); + if (lastlbn < NDADDR) { + xosize = fragroundup(fs, blkoff(fs, osize)); + if (xosize < fs->fs_bsize && xosize > 0) { + if (ip->i_ump->um_fstype == UFS1) + nb = ip->i_din1->di_db[lastlbn]; + else + nb = ip->i_din2->di_db[lastlbn]; + /* Need to extend fragment */ + if (nb != 0) + goto slow; + } + } + ip->i_size = size; + DIP_SET(ip, i_size, size); + ip->i_flag |= IN_CHANGE | IN_UPDATE; + return (0); + + slow: + error = UFS_BALLOC(vp, size - 1, 1, ap->a_cred, flags|BA_CLRBUF, &bp); + if (error) { + vnode_pager_setsize(vp, osize); + return (error); + } + ip->i_size = size; + DIP_SET(ip, i_size, size); + ip->i_flag |= IN_CHANGE | IN_UPDATE; + if (bp->b_bufsize == fs->fs_bsize) + bp->b_flags |= B_CLUSTEROK; + if (flags & IO_SYNC) { + bwrite(bp); + error = ffs_update(vp, 1); + } else + bawrite(bp); + return (error); +} diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 9d4d93d..52c08f6 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2072,7 +2072,8 @@ ufs_readdir(ap) uio->uio_iov->iov_len = count; # if (BYTE_ORDER == LITTLE_ENDIAN) if (ap->a_vp->v_mount->mnt_maxsymlinklen > 0) { - error = VOP_READ(ap->a_vp, uio, 0, ap->a_cred); + error = vn_read_chunk(ap->a_vp, uio, ap->a_cred, + ap->a_cred, IO_NODELOCKED); } else { struct dirent *dp, *edp; struct uio auio; @@ -2088,7 +2089,8 @@ ufs_readdir(ap) aiov.iov_len = count; dirbuf = malloc(count, M_TEMP, M_WAITOK); aiov.iov_base = dirbuf; - error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred); + error = vn_read_chunk(ap->a_vp, &auio, ap->a_cred, + ap->a_cred, IO_NODELOCKED); if (error == 0) { readcnt = count - auio.uio_resid; edp = (struct dirent *)&dirbuf[readcnt]; @@ -2110,7 +2112,8 @@ ufs_readdir(ap) free(dirbuf, M_TEMP); } # else - error = VOP_READ(ap->a_vp, uio, 0, ap->a_cred); + error = vn_read_chunk(ap->a_vp, uio, ap->a_cred, + ap->a_cred, IO_NODELOCKED); # endif if (!error && ap->a_ncookies != NULL) { struct dirent* dpStart; diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index ad6087e..e24c62b 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -84,5 +84,8 @@ void vm_thread_dispose(struct thread *td); int vm_thread_new(struct thread *td, int pages); void vm_thread_swapin(struct thread *td); void vm_thread_swapout(struct thread *td); +int vnode_pager_read(struct vnode *vp, struct uio *uio, int ioflags); +int vnode_pager_write(struct vnode *vp, struct uio *uio, int ioflags); + #endif /* _KERNEL */ #endif /* !_VM_EXTERN_H_ */ diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 0a5a412..fca7d5a 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -157,18 +157,22 @@ static void unlock_and_deallocate(struct faultstate *fs) { - vm_object_pip_wakeup(fs->object); - VM_OBJECT_UNLOCK(fs->object); - if (fs->object != fs->first_object) { - VM_OBJECT_LOCK(fs->first_object); - vm_page_lock_queues(); - vm_page_free(fs->first_m); - vm_page_unlock_queues(); - vm_object_pip_wakeup(fs->first_object); - VM_OBJECT_UNLOCK(fs->first_object); - fs->first_m = NULL; + if (fs->object != NULL) { + vm_object_pip_wakeup(fs->object); + VM_OBJECT_UNLOCK(fs->object); + if (fs->object != fs->first_object && + fs->first_object != NULL) { + VM_OBJECT_LOCK(fs->first_object); + vm_page_lock_queues(); + vm_page_free(fs->first_m); + vm_page_unlock_queues(); + vm_object_pip_wakeup(fs->first_object); + VM_OBJECT_UNLOCK(fs->first_object); + fs->first_m = NULL; + } + vm_object_deallocate(fs->first_object); + fs->object = fs->first_object = NULL; } - vm_object_deallocate(fs->first_object); unlock_map(fs); if (fs->vp != NULL) { vput(fs->vp); @@ -219,14 +223,15 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int faultcount, ahead, behind; struct faultstate fs; struct vnode *vp; + struct thread *td; int locked, error; hardfault = 0; growstack = TRUE; PCPU_INC(cnt.v_vm_faults); - fs.vp = NULL; - fs.vfslocked = 0; + memset(&fs, 0, sizeof(fs)); faultcount = behind = 0; + td = curthread; RetryFault:; @@ -241,11 +246,14 @@ RetryFault:; if (growstack && result == KERN_INVALID_ADDRESS && map != kernel_map) { result = vm_map_growstack(curproc, vaddr); - if (result != KERN_SUCCESS) + if (result != KERN_SUCCESS) { + unlock_and_deallocate(&fs); return (KERN_FAILURE); + } growstack = FALSE; goto RetryFault; } + unlock_and_deallocate(&fs); return (result); } @@ -367,7 +375,8 @@ RetryFault:; */ vm_page_busy(fs.m); if (fs.m->valid != VM_PAGE_BITS_ALL && - fs.m->object != kernel_object && fs.m->object != kmem_object) { + fs.m->object != kernel_object && + fs.m->object != kmem_object) { goto readrest; } @@ -523,7 +532,7 @@ vnode_lock: locked = LK_SHARED; /* Do not sleep for vnode lock while fs.m is busy */ error = vget(vp, locked | LK_CANRECURSE | - LK_NOWAIT, curthread); + LK_NOWAIT, td); if (error != 0) { int vfslocked; @@ -533,7 +542,7 @@ vnode_lock: release_page(&fs); unlock_and_deallocate(&fs); error = vget(vp, locked | LK_RETRY | - LK_CANRECURSE, curthread); + LK_CANRECURSE, td); vdrop(vp); fs.vp = vp; fs.vfslocked = vfslocked; @@ -937,9 +946,9 @@ vnode_locked: */ unlock_and_deallocate(&fs); if (hardfault) - curthread->td_ru.ru_majflt++; + td->td_ru.ru_majflt++; else - curthread->td_ru.ru_minflt++; + td->td_ru.ru_minflt++; return (KERN_SUCCESS); } diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index c6bcfa0..04d1d1a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -731,6 +731,10 @@ vm_page_remove(vm_page_t m) m->oflags &= ~VPO_BUSY; vm_page_flash(m); } + if (m->flags & PG_WRITEDIRTY) { + m->flags &= ~PG_WRITEDIRTY; + vm_writedirty_cleaned(1); + } mtx_assert(&vm_page_queue_mtx, MA_OWNED); /* @@ -1188,6 +1192,19 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) return (m); } +void +vm_wait_queue_free(const char *wmsg) +{ + + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + if (!vm_pages_needed) { + vm_pages_needed = 1; + wakeup(&vm_pages_needed); + } + msleep(&cnt.v_free_count, &vm_page_queue_free_mtx, PDROP | PVM, wmsg, + 0); +} + /* * vm_wait: (also see VM_WAIT macro) * @@ -1203,14 +1220,8 @@ vm_wait(void) vm_pageout_pages_needed = 1; msleep(&vm_pageout_pages_needed, &vm_page_queue_free_mtx, PDROP | PSWP, "VMWait", 0); - } else { - if (!vm_pages_needed) { - vm_pages_needed = 1; - wakeup(&vm_pages_needed); - } - msleep(&cnt.v_free_count, &vm_page_queue_free_mtx, PDROP | PVM, - "vmwait", 0); - } + } else + vm_wait_queue_free("vmwait"); } /* diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 662af98..0d081e2 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -195,6 +195,7 @@ extern struct vpglocks vm_page_queue_free_lock; #define PG_WINATCFLS 0x0004 /* flush dirty page on inactive q */ #define PG_FICTITIOUS 0x0008 /* physical page doesn't exist (O) */ #define PG_WRITEABLE 0x0010 /* page is mapped writeable */ +#define PG_WRITEDIRTY 0x0020 /* dirtied by vmio write */ #define PG_ZERO 0x0040 /* page is zeroed */ #define PG_REFERENCED 0x0080 /* page has been referenced */ #define PG_UNMANAGED 0x0800 /* No PV management for page */ diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 723b14d..d8cbdf0 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -111,7 +111,6 @@ __FBSDID("$FreeBSD$"); /* the kernel process "vm_pageout"*/ static void vm_pageout(void); -static int vm_pageout_clean(vm_page_t); static void vm_pageout_scan(int pass); struct proc *pageproc; @@ -274,7 +273,7 @@ vm_pageout_fallback_object_lock(vm_page_t m, vm_page_t *next) * block. Note the careful timing, however, the busy bit isn't set till * late and we cannot do anything that will mess with the page. */ -static int +int vm_pageout_clean(m) vm_page_t m; { @@ -349,7 +348,7 @@ more: } vm_page_test_dirty(p); if (p->dirty == 0 || - p->queue != PQ_INACTIVE || + (p->queue != PQ_INACTIVE && p->queue != PQ_ACTIVE) || p->wire_count != 0 || /* may be held by buf cache */ p->hold_count != 0) { /* may be undergoing I/O */ ib = 0; @@ -377,7 +376,7 @@ more: } vm_page_test_dirty(p); if (p->dirty == 0 || - p->queue != PQ_INACTIVE || + (p->queue != PQ_INACTIVE && p->queue != PQ_ACTIVE) || p->wire_count != 0 || /* may be held by buf cache */ p->hold_count != 0) { /* may be undergoing I/O */ break; @@ -416,7 +415,7 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags) vm_object_t object = mc[0]->object; int pageout_status[count]; int numpagedout = 0; - int i; + int i, wd_cleaned; mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -442,6 +441,7 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags) vm_pager_put_pages(object, mc, count, flags, pageout_status); + wd_cleaned = 0; vm_page_lock_queues(); for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; @@ -484,10 +484,18 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags) if (pageout_status[i] != VM_PAGER_PEND) { vm_object_pip_wakeup(object); vm_page_io_finish(mt); - if (vm_page_count_severe()) + if (mt->queue == PQ_INACTIVE && vm_page_count_severe()) vm_page_try_to_cache(mt); + if ((mt->flags & PG_WRITEDIRTY) != 0 && + (pageout_status[i] == VM_PAGER_OK || + pageout_status[i] == VM_PAGER_BAD)) { + mt->flags &= ~PG_WRITEDIRTY; + wd_cleaned++; + } } } + if (wd_cleaned != 0) + vm_writedirty_cleaned(wd_cleaned); return numpagedout; } @@ -1180,7 +1188,6 @@ unlock_and_continue: vm_pageout_oom(VM_OOM_MEM); } - void vm_pageout_oom(int shortage) { @@ -1391,12 +1398,17 @@ vm_pageout() vm_pageout_page_count = 8; /* + * Try to allow not more then 1/4 of usable pages for write. + */ + vmio_max_writedirty = cnt.v_page_count / 4; + + /* * v_free_reserved needs to include enough for the largest * swap pager structures plus enough for any pv_entry structs * when paging. */ if (cnt.v_page_count > 1024) - cnt.v_free_min = 4 + (cnt.v_page_count - 1024) / 200; + cnt.v_free_min = 4 + (cnt.v_page_count - 1024) / 100; else cnt.v_free_min = 4; cnt.v_pageout_free_min = (2*MAXBSIZE)/PAGE_SIZE + diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 15ca570..a2111be 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -77,6 +77,8 @@ extern int vm_pageout_pages_needed; extern int vm_pageout_deficit; extern int vm_pageout_page_count; +extern long vmio_max_writedirty; + /* * Swap out requests */ @@ -94,15 +96,18 @@ extern int vm_pageout_page_count; * Signal pageout-daemon and wait for it. */ +#ifdef _KERNEL extern void pagedaemon_wakeup(void); #define VM_WAIT vm_wait() #define VM_WAITPFAULT vm_waitpfault() extern void vm_wait(void); extern void vm_waitpfault(void); +extern void vm_wait_queue_free(const char *); -#ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); int vm_pageout_flush(vm_page_t *, int, int); -void vm_pageout_oom(int shortage); +void vm_pageout_oom(int); +int vm_pageout_clean(vm_page_t); +void vm_writedirty_cleaned(int); #endif #endif /* _VM_VM_PAGEOUT_H_ */ diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index a245462..393f741 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -778,4 +778,24 @@ DB_SHOW_COMMAND(freepages, db_show_freepages) db_printf("\n"); } } + +DB_SHOW_COMMAND(vpo_dw, vpo_dw) +{ + struct vm_phys_seg *seg; + vm_page_t m; + int segind; + long npages, i; + + for (segind = 0; segind < vm_phys_nsegs; segind++) { + seg = &vm_phys_segs[segind]; + npages = seg->end - seg->start; + npages /= PAGE_SIZE; + m = seg->first_page; + for (i = 0; i < npages; i++, m++) { + if (m->flags & PG_WRITEDIRTY) + printf("%p\n", m); + } + } +} + #endif diff --git a/sys/vm/vm_readwrite.c b/sys/vm/vm_readwrite.c new file mode 100644 index 0000000..befa899 --- /dev/null +++ b/sys/vm/vm_readwrite.c @@ -0,0 +1,1072 @@ +/*- + * Copyright (c) 2008 Jeffrey Roberson + * Copyright (c) 2009 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_vm.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* + * XXXKIB TODO + * + * 1. Backpressure for writes + * 2. VOP_REALLOCBLKS + * 3. Unset setuid/setgid bits after write. + * + */ + +static SYSCTL_NODE(_vfs, OID_AUTO, vmio, CTLFLAG_RW, 0, "VFS VMIO leaf"); + +static int vmio_run = 0; +SYSCTL_INT(_vfs_vmio, OID_AUTO, run, CTLFLAG_RW, &vmio_run, 0, + "Calculate the max sequential run for vnode_pager_read_cluster"); +static int vmio_clrbuf = 1; +SYSCTL_INT(_vfs_vmio, OID_AUTO, clrbuf, CTLFLAG_RW, &vmio_clrbuf, 0, + ""); /* Intentionally undocumented */ +static int vmio_read_pack = 16; +SYSCTL_INT(_vfs_vmio, OID_AUTO, read_pack, CTLFLAG_RW, &vmio_read_pack, 0, + "Length of the page pack for read"); +static int vmio_write_pack = 16; +SYSCTL_INT(_vfs_vmio, OID_AUTO, write_pack, CTLFLAG_RW, &vmio_write_pack, + 0, + "Length of the page pack for write"); +static int vmio_rollbacks1; +SYSCTL_INT(_vfs_vmio, OID_AUTO, rollbacks1, CTLFLAG_RD, &vmio_rollbacks1, + 0, + "Count of times vnode size has to be rolled back for writes " + "while collecting pages"); +static int vmio_rollbacks2; +SYSCTL_INT(_vfs_vmio, OID_AUTO, rollbacks2, CTLFLAG_RD, &vmio_rollbacks2, + 0, + "Count of times vnode size has to be rolled back for writes " + "while reading pages"); +static int vmio_getpages_read; +SYSCTL_INT(_vfs_vmio, OID_AUTO, getpages_read, CTLFLAG_RD, + &vmio_getpages_read, 0, + "Count of times VOP_GETPAGES called for read"); +static int vmio_getpages_write; +SYSCTL_INT(_vfs_vmio, OID_AUTO, getpages_write, CTLFLAG_RD, + &vmio_getpages_write, 0, + "Count of times VOP_GETPAGES called for write"); +static int vmio_reserv_used; +SYSCTL_INT(_vfs_vmio, OID_AUTO, reserv_used, CTLFLAG_RD, + &vmio_reserv_used, 0, + "Count of times reserved page was used by vmio"); +static int vmio_alloc_wait; +SYSCTL_INT(_vfs_vmio, OID_AUTO, alloc_wait, CTLFLAG_RD, &vmio_alloc_wait, + 0, + "Count of times vmio reserved page allocation has to wait"); +static long vmio_writedirty; +SYSCTL_LONG(_vfs_vmio, OID_AUTO, writedirty, CTLFLAG_RD, &vmio_writedirty, + 0, + "Count of pages dirtied by vnode_pager_write"); +long vmio_max_writedirty; +SYSCTL_LONG(_vfs_vmio, OID_AUTO, max_writedirty, CTLFLAG_RW, + &vmio_max_writedirty, 0, + "Maximum allowed system-wide count of pages dirtied by vnode_pager_write"); +static int vmio_writed_wakeups; +SYSCTL_INT(_vfs_vmio, OID_AUTO, writed_wakeups, CTLFLAG_RD, + &vmio_writed_wakeups, 0, + "Count of times vmio write daemon was woken up"); +static int vmio_writed_inact; +SYSCTL_INT(_vfs_vmio, OID_AUTO, writed_inact, CTLFLAG_RD, + &vmio_writed_inact, 0, + "Count of times vmio write daemon cleaned inactive queue"); +static int vmio_writed_act; +SYSCTL_INT(_vfs_vmio, OID_AUTO, writed_act, CTLFLAG_RD, &vmio_writed_act, + 0, + "Count of times vmio write daemon cleaned active queue"); + +static u_int +io_page_bits(int i, vm_offset_t off, ssize_t size) +{ + int start, chunk; + + if (i == 0) { + start = off; + chunk = min(PAGE_SIZE - off, size); + } else if (i * PAGE_SIZE < off + size) { + start = 0; + chunk = PAGE_SIZE; + } else if ((i - 1) * PAGE_SIZE < off + size) { + start = 0; + chunk = (size - off) % PAGE_SIZE; + } else + return (0); + return (vm_page_bits(start, chunk)); +} + +/* + * Blocking allocator of the reserve page. Cannot be called with vnode + * or object lock held. + */ +static void +vnode_alloc_reserv(vm_page_t *reserv) +{ + + if (*reserv != NULL) + return; + while (*reserv == NULL) { + *reserv = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ); + if (*reserv == NULL) { + atomic_add_int(&vmio_alloc_wait, 1); + VM_WAIT; + } + } +} + + +static int +vm_pageout_wd_page(vm_page_t m, int queue, int *target, vm_page_t *next) +{ + vm_object_t object; + struct mount *mp; + struct vnode *vp; + struct vm_page marker; + int vfslocked, actcount; + + bzero(&marker, sizeof(marker)); + marker.flags = PG_FICTITIOUS | PG_MARKER; + marker.oflags = VPO_BUSY; + marker.queue = queue; + marker.wire_count = 1; + + if (VM_PAGE_GETQUEUE(m) != queue) + return (0); + *next = TAILQ_NEXT(m, pageq); + object = m->object; + + if (m->flags & PG_MARKER) + return (1); + if (m->hold_count) { + vm_page_requeue(m); + return (1); + } + if (!VM_OBJECT_TRYLOCK(object) && + (!vm_pageout_fallback_object_lock(m, next) || + m->hold_count != 0)) { + VM_OBJECT_UNLOCK(object); + return (1); + } + if (m->busy || (m->oflags & VPO_BUSY) || !(m->flags & PG_WRITEDIRTY)) { + VM_OBJECT_UNLOCK(object); + return (1); + } + if (object->ref_count == 0) { + vm_page_flag_clear(m, PG_REFERENCED); + KASSERT(!pmap_page_is_mapped(m), + ("vm_pageout_clean_writedirty: page %p is mapped", m)); + } else if (((m->flags & PG_REFERENCED) == 0) && + (actcount = pmap_ts_referenced(m))) { + vm_page_activate(m); + VM_OBJECT_UNLOCK(object); + m->act_count += (actcount + ACT_ADVANCE); + return (1); + } + + if ((m->flags & PG_REFERENCED) != 0) { + vm_page_flag_clear(m, PG_REFERENCED); + actcount = pmap_ts_referenced(m); + vm_page_activate(m); + VM_OBJECT_UNLOCK(object); + m->act_count += (actcount + ACT_ADVANCE + 1); + return (1); + } + + if (m->dirty != VM_PAGE_BITS_ALL && (m->flags & PG_WRITEABLE) != 0) { + if (pmap_is_modified(m)) + vm_page_dirty(m); + else if (m->dirty == 0) + pmap_remove_all(m); + } + + KASSERT(m->valid != 0, ("VPO_WRITEDIRTY and not valid %p", m)); + if (m->dirty == 0) { + m->flags &= ~PG_WRITEDIRTY; + vmio_writedirty--; + VM_OBJECT_UNLOCK(object); + return (1); + } + KASSERT(m->dirty != 0, ("VPO_WRITEDIRTY and not dirty %p", m)); + if (object->flags & OBJ_DEAD) { + VM_OBJECT_UNLOCK(object); + vm_page_requeue(m); + return (1); + } + KASSERT(object->type == OBJT_VNODE, ("VPO_WRITEDIRTY and not vnode")); + + TAILQ_INSERT_AFTER(&vm_page_queues[queue].pl, m, &marker, pageq); + vp = object->handle; + vfslocked = 0; + if (vp->v_type == VREG && vn_start_write(vp, &mp, V_NOWAIT) != 0) { + mp = NULL; + goto unlock_and_continue; + } + KASSERT(mp != NULL, ("vp %p with NULL v_mount", vp)); + vm_page_unlock_queues(); + vm_object_reference_locked(object); + VM_OBJECT_UNLOCK(object); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, curthread)) { + VM_OBJECT_LOCK(object); + vm_page_lock_queues(); + vp = NULL; + goto unlock_and_continue; + } + VM_OBJECT_LOCK(object); + vm_page_lock_queues(); + if (VM_PAGE_GETQUEUE(m) != queue || m->object != object || + TAILQ_NEXT(m, pageq) != &marker) + goto unlock_and_continue; + if (m->busy || (m->oflags & VPO_BUSY)) + goto unlock_and_continue; + if (m->hold_count) { + vm_page_requeue(m); + goto unlock_and_continue; + } + if (vm_pageout_clean(m) != 0) + (*target)--; + unlock_and_continue: + VM_OBJECT_UNLOCK(object); + if (mp != NULL) { + vm_page_unlock_queues(); + if (vp != NULL) + vput(vp); + VFS_UNLOCK_GIANT(vfslocked); + vm_object_deallocate(object); + vn_finished_write(mp); + vm_page_lock_queues(); + } + *next = TAILQ_NEXT(&marker, pageq); + TAILQ_REMOVE(&vm_page_queues[queue].pl, &marker, pageq); + return (1); +} + +static void +vm_pageout_clean_writedirty(int *target, int queue) +{ + vm_page_t m, next; + + vm_page_lock_queues(); + rescan0: + for (m = TAILQ_FIRST(&vm_page_queues[queue].pl); + m != NULL && *target > 0; m = next) { + if (!vm_pageout_wd_page(m, queue, target, &next)) + goto rescan0; + } + vm_page_unlock_queues(); +} + +static struct cv wd_speedup; +static struct cv wd_back; + +static void +vnode_writedirty_daemon(void) +{ + int target; + + cv_init(&wd_speedup, "writed"); + cv_init(&wd_back, "vnodeww"); + + vm_page_lock_queues(); + for (;;) { + cv_wait(&wd_speedup, &vm_page_queue_mtx); + target = vmio_writedirty - vmio_max_writedirty; + vm_page_unlock_queues(); + atomic_add_int(&vmio_writed_wakeups, 1); + if (target > 0) { + if (target > 0) { + bwillwrite(); + atomic_add_int(&vmio_writed_inact, 1); + vm_pageout_clean_writedirty(&target, + PQ_INACTIVE); + } + if (target > 0) { + bwillwrite(); + atomic_add_int(&vmio_writed_act, 1); + vm_pageout_clean_writedirty(&target, PQ_ACTIVE); + } + } + vm_page_lock_queues(); + vm_writedirty_cleaned(0); + } +} + +void +vm_writedirty_cleaned(int cnt) +{ + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vmio_writedirty -= cnt; + cv_broadcast(&wd_back); +} + +static struct proc *writedproc; +static struct kproc_desc writed_kp = { + .arg0 = "writed", + .func = vnode_writedirty_daemon, + .global_procpp = &writedproc +}; +SYSINIT(writed, SI_SUB_KTHREAD_PAGE, SI_ORDER_ANY, kproc_start, &writed_kp); + +/* + * Attempt to put backpressure on writes. + */ +static void +vnode_pager_wwait(void) +{ + + if (vmio_writedirty >= vmio_max_writedirty) { + vm_page_lock_queues(); + while (vmio_writedirty >= vmio_max_writedirty) { + cv_signal(&wd_speedup); + cv_wait(&wd_back, &vm_page_queue_mtx); + } + vm_page_unlock_queues(); + } +} + +#define VN_GRAB_NO_VMWAIT 0x0001 + +/* + * Grab a page, waiting until we are woken up due to the page + * changing state. We keep on waiting, if the page continues + * to be in the object. If the page doesn't exist allocate it. + * + * This routine may block, either waiting for busy vnode page, or for + * a page allocation. Later may be disabled with VN_GRAB_NO_VMWAIT + * flag, when vnode lock is held. To ensure progress, reserve page is + * used for ma[0] when wait is disabled and system cannot provide a + * page. + * + * Returns updated page run length in *wp, and filled in ma page + * array. + */ +static void +vnode_grab_pages(struct vnode *vp, vm_page_t *ma, int *wp, vm_pindex_t pindex, + int flags, vm_page_t *reserv) +{ + vm_object_t object; + vm_page_t m; + vm_pindex_t pi; + int i; + + KASSERT((flags & VN_GRAB_NO_VMWAIT) || reserv == NULL, + ("vnode_grab_pages: NO_VMWAIT and no reserve")); + + object = vp->v_object; + redo: + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + m = NULL; + for (i = 0, pi = pindex; i < *wp; ) { + if (i > 0) { + m = TAILQ_NEXT(ma[i - 1], listq); + if (m && m->pindex != pi) + m = NULL; + } + if (m == NULL) + m = vm_page_lookup(object, pi); + if (m != NULL) { + if (vm_page_sleep_if_busy(m, TRUE, "pgrnbwt")) + goto redo; + } else { + m = vm_page_alloc(object, pi, VM_ALLOC_NORMAL | + VM_ALLOC_NOBUSY); + } + if (m != NULL) { + ma[i] = m; + i++; + pi++; + continue; + } + if (flags & VN_GRAB_NO_VMWAIT) { + if (i == 0) { + m = *reserv; + *reserv = NULL; + atomic_add_int(&vmio_reserv_used, 1); + if (object->memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, + object->memattr); + vm_page_insert(m, object, pindex); + ma[i] = m; + i++; + } + break; + } + VM_OBJECT_UNLOCK(object); + atomic_add_int(&vmio_alloc_wait, 1); + VM_WAIT; + VM_OBJECT_LOCK(object); + goto redo; + } + *wp = i; +} + +/* + * Read a cluster starting at 'ma'. Note that we need to always redo + * page grab because our caller dropped object lock while not holding + * vnode lock. + */ +static int +vnode_pager_read_cluster(struct vnode *vp, vm_page_t ma[], vm_pindex_t idx, + int *maxrun, int flags, vm_page_t *reserv) +{ + vm_object_t obj; + daddr_t blkno; + int bsize; + int error; + int run; + int i; + + obj = vp->v_object; + bsize = vp->v_mount->mnt_stat.f_iosize; + error = 0; + blkno = 0; + + if (vmio_run) { + VM_OBJECT_UNLOCK(obj); + error = VOP_BMAP(vp, IDX_TO_OFF(idx)/bsize, NULL, &blkno, &run, + NULL); + VM_OBJECT_LOCK(obj); + run = MIN(run, *maxrun); + if (error || run == 0 || blkno == -1) { +/* printf("vnode_pager_read_cluster short\n"); */ + *maxrun = 1; + vnode_grab_pages(vp, ma, maxrun, idx, + VN_GRAB_NO_VMWAIT, reserv); + error = vm_pager_get_pages(obj, ma, 1, 0); + if (error != VM_PAGER_OK) + return (EIO); + return (0); + } + run = (run + 1) * bsize / PAGE_SIZE; + run = MIN(run, vp->v_mount->mnt_iosize_max / PAGE_SIZE); + } else { + if (*maxrun == 0) + *maxrun = 1; + run = MIN(*maxrun, vp->v_mount->mnt_iosize_max / PAGE_SIZE); + } + if (IDX_TO_OFF(idx) + run * PAGE_SIZE > obj->un_pager.vnp.vnp_size) { + run = (obj->un_pager.vnp.vnp_size - IDX_TO_OFF(idx)) / + PAGE_SIZE; + } + if (run == 0) + run = 1; + vnode_grab_pages(vp, ma, &run, idx, VN_GRAB_NO_VMWAIT, reserv); + for (i = 0; i < run; i++) { + if (i > 0 && ma[i]->valid != 0) { + run = i; + break; + } + vm_page_busy(ma[i]); + } + +/* printf("vnode_pager_read_cluster %d %p %p\n", run, ma, ma[0]); */ + error = vm_pager_get_pages(obj, ma, run, 0); + if (error != VM_PAGER_OK) { + vm_page_lock_queues(); + for (i = 0; i < run; i++) + vm_page_free(ma[i]); + vm_page_unlock_queues(); + return (EIO); + } + KASSERT(ma[0]->valid == VM_PAGE_BITS_ALL, + ("ma[0]->valid %x", ma[0]->valid)); + vm_page_wakeup(ma[0]); + for (i = 1; i < run; i++) { + if (ma[i]->object != obj || + ma[i]->pindex != ma[0]->pindex + i || + !ma[i]->valid) { +/* printf("run %d ma[%d]: obj %p %p pindex %jd p+i %jd valid %x\n", + run, i, obj, ma[i]->object, ma[i]->pindex, ma[0]->pindex + i, ma[i]->valid); */ + break; + } + } + *maxrun = i; + return (0); +} + +int +vnode_pager_read(struct vnode *vp, struct uio *uio, int ioflags) +{ + vm_object_t obj; + vm_offset_t off; + vm_pindex_t idx; + vm_page_t reserv; + ssize_t size; + int error, seqcount, wpmax, wp, i; + u_int bits; + struct thread *td; + + if (ioflags & (IO_EXT|IO_DIRECT)) + return (EOPNOTSUPP); + + ASSERT_VOP_LOCKED(vp, "vnode_pager_read"); + if (vp->v_iflag & VI_DOOMED) + return (EBADF); + + /* + * Ignore non-regular files. + */ + if (vp->v_type != VREG) + return (EOPNOTSUPP); + obj = vp->v_object; + if (obj == NULL) + return (EOPNOTSUPP); + + seqcount = (ioflags >> IO_SEQSHIFT) * FRA_BLOCK_SZ / PAGE_SIZE; + seqcount = min(vfs_read_max, seqcount); + seqcount = min(vp->v_mount->mnt_iosize_max / PAGE_SIZE, seqcount); + VOP_UNLOCK(vp, 0); + + wpmax = atomic_load_acq_int(&vmio_read_pack); + vm_page_t ma[wpmax + 1]; + + while (vm_page_count_severe()) { + atomic_add_int(&vm_pageout_deficit, MIN(wpmax + 1, + (uio->uio_resid + PAGE_SIZE - 1) >> PAGE_SHIFT)); + VM_WAIT; + } + + error = 0; + reserv = NULL; + td = uio->uio_td; + /* XXXKIB This should be disallowed. */ + if (td == NULL) + td = curthread; + + VM_OBJECT_LOCK(obj); + while (uio->uio_resid > 0) { + wp = wpmax; + + size = obj->un_pager.vnp.vnp_size - uio->uio_offset; + if (size <= 0) + break; + idx = OFF_TO_IDX(uio->uio_offset); + off = uio->uio_offset - IDX_TO_OFF(idx); + size = MIN(MIN(PAGE_SIZE * wp - off, uio->uio_resid), size); + + wp = (size + off + PAGE_SIZE - 1) / PAGE_SIZE; + vnode_grab_pages(vp, ma, &wp, idx, 0, NULL); + find_valid: + for (i = 0; i < wp; i++) { + bits = io_page_bits(i, off, size); + + /* + * Only do read if first page of array is not + * valid for us. We have to drop object lock + * to obtain vnode lock, that allows the pages + * to change identity or validity bits, and we + * can guarantee allocation of only one + * (reserved) page. + */ + if ((ma[i]->valid & bits) != bits) { + if (i != 0) { + wp = i; + break; + } + VM_OBJECT_UNLOCK(obj); + vnode_alloc_reserv(&reserv); + error = vn_lock(vp, LK_SHARED); + VM_OBJECT_LOCK(obj); + if (error != 0) { + error = EBADF; + break; + } + + /* + * Read page, honouring read-ahead settings + * for filedescriptor. + */ + atomic_add_int(&vmio_getpages_read, 1); + error = vnode_pager_read_cluster(vp, ma, idx, + &wp, VN_GRAB_NO_VMWAIT, &reserv); + VOP_UNLOCK(vp, 0); + if (error != 0) + break; + /* + * No need to redo size calculation. + * Despite both vnode and object locks + * were dropped, range lock and file + * descriptor reference shall keep + * file from truncation. + */ + goto find_valid; + } + } + if (error != 0) + break; + KASSERT(wp > 0, ("wp == 0")); +/* printf("vp %p wp %d size %d\n", vp, wp, size); */ + + /* + * Prevent object deallocation and pages swap-out. + */ + vm_object_pip_add(obj, 1); + vm_page_lock_queues(); + for (i = 0; i < wp; i++) + vm_page_hold(ma[i]); + vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(obj); + + /* + * Recalculate i/o size, since vnode_grab_pages() + * might shortened the page run. + */ + size = MIN(MIN(PAGE_SIZE * wp - off, uio->uio_resid), size); + + /* + * Access user map pages, vnode lock is dropped. + * Possible page fault is safe at this point. Vnode + * rangelock is held, protecting from parallel + * writers. + */ +/* printf("size %d %d %ju\n", size, uio->uio_resid, (uintmax_t)off); */ + KASSERT((td->td_pflags & TDP_VMIO) == 0, + ("Recursed vnode_pager_read")); + td->td_pflags |= TDP_VMIO; + error = uiomove_fromphys(ma, off, size, uio); + td->td_pflags &= ~TDP_VMIO; + + VM_OBJECT_LOCK(obj); + vm_page_lock_queues(); + for (i = 0; i < wp; i++) { + vm_page_unhold(ma[i]); + vm_page_activate(ma[i]); + } + vm_page_unlock_queues(); + vm_object_pip_wakeup(obj); + if (error != 0) + break; + } + VM_OBJECT_UNLOCK(obj); + if (reserv != NULL) + vm_page_free(reserv); + vn_lock(vp, LK_SHARED | LK_RETRY); + if (error == 0) + vfs_mark_atime(vp, td->td_ucred); + + return (error); +} + +int +vnode_pager_write(struct vnode *vp, struct uio *uio, int ioflags) +{ + vm_object_t obj; + vm_offset_t off; + vm_pindex_t idx, clean_start, clean_end; + vm_page_t reserv; + struct vattr vattr; + ssize_t size, size1, osize, osize1, resid, sresid; + int error, vn_locked, wpmax, wp, i; + u_int bits; + boolean_t vnode_locked; + struct thread *td; + + if (ioflags & (IO_EXT|IO_INVAL|IO_DIRECT)) + return (EOPNOTSUPP); + ASSERT_VOP_LOCKED(vp, "vnode_pager_write"); + if (vp->v_iflag & VI_DOOMED) + return (EBADF); + if (vp->v_type != VREG) + return (EOPNOTSUPP); + obj = vp->v_object; + if (obj == NULL) + return (EOPNOTSUPP); + vn_locked = VOP_ISLOCKED(vp); + vnode_locked = TRUE; + error = 0; + + wpmax = atomic_load_acq_int(&vmio_write_pack); + vm_page_t ma[wpmax + 1]; + + /* + * Try to ensure that enough pages is available in advance. + */ + while (vm_page_count_severe()) { + if (vnode_locked) { + VOP_UNLOCK(vp, 0); + vnode_locked = FALSE; + } + atomic_add_int(&vm_pageout_deficit, MIN(wpmax + 1, + (uio->uio_resid + PAGE_SIZE - 1) >> PAGE_SHIFT)); + VM_WAIT; + } + + /* + * Allocate first reserve page. + */ + for (reserv = NULL; reserv == NULL; ) { + reserv = vm_page_alloc(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ); + if (reserv == NULL) { + if (vnode_locked) { + VOP_UNLOCK(vp, 0); + vnode_locked = FALSE; + } + atomic_add_int(&vmio_alloc_wait, 1); + VM_WAIT; + } + } + if (!vnode_locked) { + /* + * Since vnode lock was dropped, we are under low free + * pages condition, so more write trottling is due. + */ + vnode_pager_wwait(); + + vn_lock(vp, vn_locked | LK_RETRY); + if (vp->v_iflag & VI_DOOMED) { + if (reserv != NULL) + vm_page_free(reserv); + return (EBADF); + } + vnode_locked = TRUE; + } + + if (ioflags & IO_APPEND) + uio->uio_offset = obj->un_pager.vnp.vnp_size; + + clean_start = OFF_TO_IDX(uio->uio_offset); + clean_end = OFF_TO_IDX(uio->uio_offset + uio->uio_resid + + PAGE_SIZE - 1); + + td = uio->uio_td; + if (td == NULL) + td = curthread; + + /* + * Enforce the RLIMIT_FSIZE there too. + * XXXKIB the check for the file type is kept on purpose. + */ + if (vp->v_type == VREG) { + PROC_LOCK(td->td_proc); + if (uio->uio_offset + uio->uio_resid > + lim_cur(td->td_proc, RLIMIT_FSIZE)) { + psignal(td->td_proc, SIGXFSZ); + PROC_UNLOCK(td->td_proc); + return (EFBIG); + } + PROC_UNLOCK(td->td_proc); + } + osize = osize1 = obj->un_pager.vnp.vnp_size; + resid = uio->uio_resid; + + io_loop: + while (uio->uio_resid > 0) { + wp = wpmax; + size = uio->uio_resid; + idx = OFF_TO_IDX(uio->uio_offset); + off = uio->uio_offset - IDX_TO_OFF(idx); + size = MIN(PAGE_SIZE * wp - off, uio->uio_resid); + if (!vnode_locked) { + error = vn_lock(vp, LK_EXCLUSIVE); + if (error != 0) { + error = EBADF; + break; + } + vnode_locked = TRUE; + } + osize1 = obj->un_pager.vnp.vnp_size; + + /* + * Extend the file if writing past end. + */ + if (osize1 < uio->uio_offset + size) { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + VOP_UNLOCK(vp, 0); + vnode_locked = FALSE; + } + if (!vnode_locked) { + error = vn_lock(vp, LK_EXCLUSIVE); + if (error != 0) { + error = EBADF; + break; + } + vnode_locked = TRUE; + } + vattr.va_size = uio->uio_offset + size; + error = VOP_EXTEND(vp, td->td_ucred, uio->uio_offset + + size, ioflags); + } + if (error != 0) + break; + + wp = (size + off + PAGE_SIZE - 1) / PAGE_SIZE; + VM_OBJECT_LOCK(obj); + + /* + * Use VN_GRAB_NO_VMWAIT since vnode lock is held. + */ + vnode_grab_pages(vp, ma, &wp, idx, VN_GRAB_NO_VMWAIT, &reserv); + find_valid: + for (i = 0; i < wp; i++) { + /* + * If the page falls into the newly-extended + * range, zero it and mark as valid. There is + * nothing VOP_GETPAGES can read from file. + */ + if (IDX_TO_OFF(ma[i]->pindex) >= osize1) { + if ((ma[i]->flags & PG_ZERO) == 0) + pmap_zero_page(ma[i]); + ma[i]->valid = VM_PAGE_BITS_ALL; + } + + /* + * Pages need to be fully valid, because we + * can only hold them during uiomove later. + * + * The page fault happening in other thread + * after uiomove finished but before valid + * bits are corrected below would cause lost + * of newly written data if page is not fully + * valid. + */ + if (ma[i]->valid == VM_PAGE_BITS_ALL) + continue; + if (!vmio_clrbuf) { + bits = io_page_bits(i, off, size); + if ((ma[i]->valid & ~bits) == (~bits & + VM_PAGE_BITS_ALL)) + continue; + } + if (i != 0) { + wp = i; + break; + } + if (reserv == NULL) + reserv = vm_page_alloc(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ); + if (reserv == NULL) { + VM_OBJECT_UNLOCK(obj); + + /* + * Truncate the file back to the + * original size to prevent mmap from + * seeing invalid pages. We are going + * to drop vnode lock. + */ + if (osize1 < uio->uio_offset + size) { + atomic_add_int(&vmio_rollbacks1, 1); + VATTR_NULL(&vattr); + vattr.va_size = osize1; + error = VOP_SETATTR(vp, &vattr, + td->td_ucred); + if (error != 0) + break; + } + KASSERT(vnode_locked, ("lost vnode lock 1")); + VOP_UNLOCK(vp, 0); + vnode_locked = FALSE; + vnode_pager_wwait(); + vnode_alloc_reserv(&reserv); + goto io_loop; + } + + atomic_add_int(&vmio_getpages_write, 1); + error = vnode_pager_read_cluster(vp, ma, idx, &wp, + VN_GRAB_NO_VMWAIT, &reserv); + if (error != 0) { + VM_OBJECT_UNLOCK(obj); + break; + } + goto find_valid; + } + /* Loop above is exited with unlocked obj if error != 0. */ + if (error != 0) + break; + KASSERT(wp > 0, ("wp == 0")); + + /* + * Prevent the object deallocation and hold the pages. + * Held page can be removed from object, but cannot be + * reused. Range lock taken in vn_truncate() prevents + * most typical race. + * + * XXXKIB Busying the pages there would cause deadlock + * with vm_object_page_remove() or self-lock with + * vm_fault(), but would allow to not require the + * pages to be fully valid before uiomove. + * + * The mmap could see zeroed pages that are inserted + * into extended area after we dropped object lock. + * This could be considered an application race. + */ + vm_object_pip_add(obj, 1); + vm_page_lock_queues(); + for (i = 0; i < wp; i++) + vm_page_hold(ma[i]); + vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(obj); + + /* + * Recalculate i/o size, since vnode_grab_pages() + * might have shortened the page run. Save previous + * resid to correctly mark written pages regions as + * dirty. + */ + sresid = uio->uio_resid; + size1 = MIN(MIN(PAGE_SIZE * wp - off, sresid), size); + + /* + * Shrunk file in case we allocated less pages then + * the estimation that was used to VOP_EXTEND. + */ + KASSERT(vnode_locked, ("lost vnode lock 2")); + if (size1 < size && osize1 < uio->uio_offset + size) { + atomic_add_int(&vmio_rollbacks2, 1); + VATTR_NULL(&vattr); + vattr.va_size = uio->uio_offset + size1; + error = VOP_SETATTR(vp, &vattr, td->td_ucred); + if (error != 0) { + VM_OBJECT_LOCK(obj); + vm_page_lock_queues(); + for (i = 0; i < wp; i++) { + vm_page_unhold(ma[i]); + vm_page_deactivate(ma[i]); + } + vm_page_unlock_queues(); + vm_object_pip_wakeup(obj); + VM_OBJECT_UNLOCK(obj); + break; + } + } + size = size1; + + VOP_UNLOCK(vp, 0); + vnode_locked = FALSE; + + KASSERT((td->td_pflags & TDP_VMIO) == 0, + ("Recursed vnode_pager_write")); +/* printf("W: vp %p off %jd %jd size %jd\n", + vp, (intmax_t)uio->uio_offset, (intmax_t)off, (intmax_t)size); */ + td->td_pflags |= TDP_VMIO; + error = uiomove_fromphys(ma, off, size, uio); + td->td_pflags &= ~TDP_VMIO; + + VM_OBJECT_LOCK(obj); + vm_page_lock_queues(); + for (i = 0; i < wp; i++) { + /* + * Note that the page is dirty regardeless of + * the possible error from uiomove. We must + * mark the pages that were touched by uiomove + * before fault occured. Since we do not + * record the progress of the uiomove till + * fault, just mark them all. + */ + ma[i]->dirty |= io_page_bits(i, off, sresid - + uio->uio_resid); + if ((ma[i]->flags & PG_WRITEDIRTY) == 0) { + ma[i]->flags |= PG_WRITEDIRTY; + vmio_writedirty++; + } + vm_page_unhold(ma[i]); + vm_page_activate(ma[i]); + } + vm_page_unlock_queues(); + /* See the comment above about page dirtiness. */ + vm_object_set_writeable_dirty(obj); + vm_object_pip_wakeup(obj); + VM_OBJECT_UNLOCK(obj); + if (error != 0) + break; + KASSERT(!vnode_locked, ("vnode leak 3")); + + vnode_pager_wwait(); + + /* + * Re-fill reserv while vnode lock is dropped. + */ + if (uio->uio_resid != 0) + vnode_alloc_reserv(&reserv); + } + + if (!vnode_locked) + vn_lock(vp, vn_locked | LK_RETRY); + if (reserv != NULL) + vm_page_free(reserv); + if (vp->v_iflag & VI_DOOMED) { + if (error == 0) + error = EBADF; + return (error); + } + if (error == 0) { + if (((ioflags & IO_SYNC) && (vp->v_vflag & VV_NOSYNC)) || + vm_page_count_severe()) { + VM_OBJECT_LOCK(obj); + vm_object_page_clean(obj, clean_start, clean_end, + OBJPC_SYNC); + VM_OBJECT_UNLOCK(obj); +#if 0 + /* + * XXXKIB The following call is commented out in + * vm_object_page_clean() in the same way. + */ + error = VOP_FSYNC(vp, MNT_WAIT, td); +#endif + } + } else { + /* + * Roll back on error if atomic write was requested. + */ + VATTR_NULL(&vattr); + vattr.va_size = (ioflags & IO_UNIT) ? osize : osize1; + VOP_SETATTR(vp, &vattr, td->td_ucred); + if (ioflags & IO_UNIT) { + uio->uio_offset -= resid - uio->uio_resid; + uio->uio_resid = resid; + } + } + + return (error); +} diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 179afbf..37fbe64 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -697,6 +697,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) object = vp->v_object; count = bytecount / PAGE_SIZE; +/* printf("vpgg: %p %jd %x %d\n", vp, m[0]->pindex, count, reqpage); */ KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, ("vnode_pager_generic_getpages does not support devices")); @@ -1081,6 +1082,7 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals) object = vp->v_object; count = bytecount / PAGE_SIZE; +/* printf("vpgp: %p %jd %x %d\n", vp, m[0]->pindex, m[0]->dirty, count); */ for (i = 0; i < count; i++) rtvals[i] = VM_PAGER_AGAIN; diff --git a/tools/regression/file/uio/uio.c b/tools/regression/file/uio/uio.c new file mode 100644 index 0000000..d857605 --- /dev/null +++ b/tools/regression/file/uio/uio.c @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int chunk_cnt = 1024; +int chunk_size = 1024; + +int +main(int argc, char *argv[]) +{ + struct iovec *wiov, *riov; + char **wdata, **rdata; + int fd, i; + ssize_t io_error; + + if (argc < 2) { + fprintf(stderr, "Usage: uio file [chunk count [chunk size]]\n"); + return (2); + } + fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (fd == -1) { + fprintf(stderr, "Failed to create %s: %s\n", + argv[1], strerror(errno)); + return (1); + } + + if (argc > 2) + chunk_cnt = atoi(argv[2]); + if (argc > 3) + chunk_size = atoi(argv[3]); + + wiov = calloc(chunk_cnt, sizeof(*wiov)); + wdata = calloc(chunk_cnt, sizeof(*wdata)); + + riov = calloc(chunk_cnt, sizeof(*riov)); + rdata = calloc(chunk_cnt, sizeof(*rdata)); + + for (i = 0; i < chunk_cnt; i++) { + rdata[i] = malloc(chunk_size); + riov[i].iov_base = rdata[i]; + riov[i].iov_len = chunk_size; + + wdata[i] = malloc(chunk_size); + memset(wdata[i], i, chunk_size); + wiov[i].iov_base = wdata[i]; + wiov[i].iov_len = chunk_size; + } + + io_error = writev(fd, wiov, chunk_cnt); + if (io_error == -1) { + fprintf(stderr, "write failed: %s\n", strerror(errno)); + return (1); + } else if (io_error != chunk_cnt * chunk_size) { + fprintf(stderr, "truncated write: %d %d\n", + io_error, chunk_cnt * chunk_size); + return (1); + } + + if (lseek(fd, 0, SEEK_SET) == -1) { + fprintf(stderr, "lseek failed: %s\n", strerror(errno)); + return (1); + } + + io_error = readv(fd, riov, chunk_cnt); + if (io_error == -1) { + fprintf(stderr, "read failed: %s\n", strerror(errno)); + return (1); + } else if (io_error != chunk_cnt * chunk_size) { + fprintf(stderr, "truncated read: %d %d\n", + io_error, chunk_cnt * chunk_size); + return (1); + } + + for (i = 0; i < chunk_cnt; i++) { + if (memcmp(rdata[i], wdata[i], chunk_size) != 0) { + fprintf(stderr, "chunk %d differs\n", i); + return (1); + } + } + + return (0); +} diff --git a/tools/regression/ufs/ba_clrbuf/ba_clrbuf.c b/tools/regression/ufs/ba_clrbuf/ba_clrbuf.c new file mode 100644 index 0000000..1b0acbe --- /dev/null +++ b/tools/regression/ufs/ba_clrbuf/ba_clrbuf.c @@ -0,0 +1,129 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const int blks = 2; + +static void +flush_buffers(int fd) +{ + struct stat st; + char *addr; + int error; + + printf("Flushing buffers\n"); + error = fstat(fd, &st); + if (error == -1) + err(2, "stat"); + fsync(fd); + addr = mmap(NULL, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (addr == (char *)-1) + err(2, "mmap"); + error = msync(addr, st.st_size, MS_SYNC | MS_INVALIDATE); + if (error == -1) + err(2, "msync"); + munmap(addr, st.st_size); +} + +int +main(int argc, char *argv[]) +{ + struct statfs fst; + char *data, *vrfy; + size_t sz; + int fd, i, error, ret; + + if (argc < 2) + errx(2, "Usage: ba_clrbuf file"); + + fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (fd == -1) + err(2, "Failed to create %s", argv[1]); + + if (fstatfs(fd, &fst) == -1) + err(2, "stat"); + + sz = fst.f_iosize * blks; + data = malloc(sz); + if (data == NULL) + err(2, "malloc"); + vrfy = malloc(sz); + if (vrfy == NULL) + err(2, "malloc"); + for (i = 0; i < (int)sz; i++) + data[i] = i; + error = write(fd, data, sz); + if (error == -1) + err(2, "write"); + else if (error != (int)sz) + errx(2, "Short write %d %d", error, sz); + + flush_buffers(fd); + + error = lseek(fd, 0, SEEK_SET); + if (error == -1) + err(2, "lseek 0"); + else if (error != 0) + errx(2, "lseek 0 returned %d", error); + error = write(fd, NULL, fst.f_iosize); + printf("faulty write, error %s\n", strerror(errno)); + + error = lseek(fd, 0, SEEK_SET); + if (error == -1) + err(2, "lseek 0/2"); + else if (error != 0) + errx(2, "lseek 0/2 returned %d", error); + error = read(fd, vrfy, sz); + if (error == -1) + err(2, "read"); + else if (error != (int)sz) + errx(2, "short read %d %d", error, sz); + + if (memcmp(data, vrfy, fst.f_iosize) != 0) { + printf("Zero block corrupted, byte at 0 is %x\n", + (unsigned char)vrfy[0]); + ret = 1; + } else { + printf("No corruption\n"); + ret = 0; + } + + return (ret); +}