[lkml]   [1998]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean