Re: HEADS UP: I broke swapping
On Tue, 22 May 2001, Peter Wemm wrote: > John Baldwin wrote: > > > If I have swap (i.e. I've run swapon on a swap partition) the program is kill > ed > > by the system fine. If I don't have swap, then both the memkill process adn > > the swapper process (proc0) are stuck in the "vmwait" wait channel used by > > VM_WAIT. Any ideas? > > This may not be a new problem. I have seen a lot of machines hit this > sort of thing at work. It can end up in the majority of processes on > the system in this state. des's adsp.c test program caused this here on a machine with 64MB RAM and 132MB swap. No progress was made killing `bigproc' because everything gets stuck on "vmwait". It is hard to see where the get stuck because the "vmwait" label is far from unique. It is used in both the vm_wait() and the vm_await() functions which are called from all over. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: HEADS UP: I broke swapping
John Baldwin wrote: > If I have swap (i.e. I've run swapon on a swap partition) the program is kill ed > by the system fine. If I don't have swap, then both the memkill process adn > the swapper process (proc0) are stuck in the "vmwait" wait channel used by > VM_WAIT. Any ideas? This may not be a new problem. I have seen a lot of machines hit this sort of thing at work. It can end up in the majority of processes on the system in this state. Cheers, -Peter -- Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: HEADS UP: I broke swapping
On 22-May-01 John Baldwin wrote: > > On 20-May-01 Alfred Perlstein wrote: >> I broke swapping with the vm mutex. >> >> Hopefully I should have this fixed up within a couple of days tops. >> >> No, I'm not heading off to Aruba or someplace after this intrusive >> change, I am working on it. Your kernel may panic, but I hope you >> all keep a level head about this and don't follow suit. :) >> >> Patches, suggestions and crashdumps would be helpful. >> >> Bruce has been giving me some helpful tracebacks that I'm planning >> to use to stabilize the system. > > I am currently running X on my laptop with a current kernel with the patch > http://www.FreeBSD.org/~jhb/patches/vm.patch. It is swapping, and I've > tested > out exhausting all the swap and mem at least which worked. Well, I've cleaned out all but one lock order reversal (the race between faultin() and swapout() needs to be fixed in a more proper fashion) and tried to push Giant back down some by re-enabling all the MPSAFE syscalls in Alfred's commit, but now I can deadlock (well, livelock actually) my laptop in single user via a simple memkill program that basically does this: for (;;) *(char *)malloc(1) = 1; If I have swap (i.e. I've run swapon on a swap partition) the program is killed by the system fine. If I don't have swap, then both the memkill process adn the swapper process (proc0) are stuck in the "vmwait" wait channel used by VM_WAIT. Any ideas? -- John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: HEADS UP: I broke swapping
On 22-May-01 John Baldwin wrote: > > On 20-May-01 Alfred Perlstein wrote: >> I broke swapping with the vm mutex. >> >> Hopefully I should have this fixed up within a couple of days tops. >> >> No, I'm not heading off to Aruba or someplace after this intrusive >> change, I am working on it. Your kernel may panic, but I hope you >> all keep a level head about this and don't follow suit. :) >> >> Patches, suggestions and crashdumps would be helpful. >> >> Bruce has been giving me some helpful tracebacks that I'm planning >> to use to stabilize the system. > > I am currently running X on my laptop with a current kernel with the patch > http://www.FreeBSD.org/~jhb/patches/vm.patch. It is swapping, and I've > tested > out exhausting all the swap and mem at least which worked. Also, to clarify a point here and vindicate Alfred some since some people are calling for his head: Alfred didn't entirely break swapping, I helped. Revision 1.112 #if 0'd out code to lock the vm_map of a process when we were swapping it out. At the time I thought that we locked the map and immediately released the lock. However, we also bumped the refcount on the vmspace, but didn't call vmspace_free() until later after swapout(). I #if 0'd out the bump of the refcount, but not the vmspace_free(), thus when swapping out processes, we would release a vmspace out from under a process giving vmdaemon a heart attack later on. I think we still leak a vmspace refcount if we fail the swap_idle_threadhold2 test in swapout_procs(), and I'm going to test out a fix for that as well. -- John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: HEADS UP: I broke swapping
On 20-May-01 Alfred Perlstein wrote: > I broke swapping with the vm mutex. > > Hopefully I should have this fixed up within a couple of days tops. > > No, I'm not heading off to Aruba or someplace after this intrusive > change, I am working on it. Your kernel may panic, but I hope you > all keep a level head about this and don't follow suit. :) > > Patches, suggestions and crashdumps would be helpful. > > Bruce has been giving me some helpful tracebacks that I'm planning > to use to stabilize the system. I am currently running X on my laptop with a current kernel with the patch http://www.FreeBSD.org/~jhb/patches/vm.patch. It is swapping, and I've tested out exhausting all the swap and mem at least which worked. > swapinfo Device 1K-blocks UsedAvail Capacity Type /dev/ad0s2b266112 16 266096 0%Interleaved > vmstat -s 659683 cpu context switches 547856 device interrupts 5289 software interrupts 269300 traps 1492219 system calls 26 kernel threads created 710 fork() calls 59 vfork() calls 0 rfork() calls 15 swap pager pageins 17 swap pager pages paged in 524 swap pager pageouts 7923 swap pager pages paged out 803 vnode pager pageins 6173 vnode pager pages paged in 0 vnode pager pageouts 0 vnode pager pages paged out 253 page daemon wakeups ... vm.vm_faults_no_vm_mtx: 209859 vm.vm_faults_no_giant: 0 vm.stats.vm.v_vm_faults: 227165 The patch still needs some cleanups, and there are some lock order reversals I still need to work on, but it might be worth testing. :) -- John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message