Messages in this thread | | | Date | Sat, 24 Oct 1998 22:57:15 -0400 | From | Billy Harvey <> | Subject | Re: [patch] my latest oom stuff |
| |
Linus Torvalds wrote: > > Btw, Andrea, if you find the CPU looping busily in "kswapd", could you try > to instrument it a bit more? > > The thing is, kswapd shouldn't even _allow_ that kind of endless looping. > It forces itself to sleep at regular intervals by doing > > current->state = TASK_INTERRUPTIBLE; > schedule(); > > inside its loop. So even if we're really low on memory, it should always > allow other processes to run for at least a fractional jiffy (after which > the timer tick will wake it up again). Certainly long enough for another > process to notice that it ran out of memory and kill itself.
Linus, FWIW in a non-measured case, I've noticed the kswapd occassionally take 90% CPU (with top) if I run without any swap (144M RAM), but if I add 128M swap, I never see it. In fact, with the swap active, it hardly ever gets used, but seems to really affect the system with none available.
Billy -- Billy.Harvey@thrillseeker.net
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |