Messages in this thread | | | Date | Sun, 25 Oct 1998 15:58:57 +0100 (CET) | From | Rik van Riel <> | Subject | Re: [patch] my latest oom stuff |
| |
On Sat, 24 Oct 1998, Andrea Arcangeli wrote:
> --- linux/mm/vmscan.c:1.1.1.3 Sat Oct 24 15:42:52 1998 > +++ linux/mm/vmscan.c Sat Oct 24 19:55:47 1998
> /* Give kswapd a realtime priority. */ > - current->policy = SCHED_FIFO; > current->rt_priority = 32; /* Fixme --- we need to standardise our
This effectively removes realtime priority from kswapd -- this is plain wrong because we need to rely on kswapd even in triple-digit loads...
> /* > + * Stop carefully if we could eat all CPU power. -arca > + */ > + if (!do_try_to_free_page(0)) > + break;
I wouldn't call this 'carefully' at all. The reason we do multiple tries in kswapd is because we _can't_ give up on the first failure. The rest of the system relies on us!
The danger in this patch might be masqueraded somewhat by all the added wake_up(&kswapd) calls, but it really isn't a sane thing to do...
It would be better to have kswapd figure out if it is failing because it is OOM (--> give up and kill something) or because all pages are aged high (--> continue because we will be able to find something).
You've seen my patch, you know that is trivial. There's not much of a reason to put this dangerous piece of code into the kernel...
Rik. +-------------------------------------------------------------------+ | Linux memory management tour guide. H.H.vanRiel@phys.uu.nl | | Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ | +-------------------------------------------------------------------+
- 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/
| |