Re: Mem issues in 2.6.9 (ever since 2.6.9-rc3) and possible cause

Marcelo Tosatti
2004-10-28T14:51:32Z

On Mon, Oct 25, 2004 at 06:33:35PM -0400, Rik van Riel wrote:
> On Mon, 25 Oct 2004, Rik van Riel wrote:
> > On Mon, 25 Oct 2004, Andrew Morton wrote:
> > > Rik van Riel <riel@redhat.com> wrote:
> > > >
> > > > - if (referenced && page_mapping_inuse(page))
> > > > + if (referenced && sc->priority && page_mapping_inuse(page))
> > >
> > > Makes heaps of sense, but I'd like to exactly understand why people are
> > > getting oomings before doing something like this. I think we're still
> > > waiting for a testcase?
> >
> > I'm now running Yum on a (virtual) system with 96MB RAM and
> > 100MB swap. This used to get an OOM kill very quickly, but
> > still seems to be running now, after 20 minutes.
>
> It completed, without being OOM killed like before.

Barry,

Can you please test Rik's patch with your spurious OOM kill testcase?

===== mm/vmscan.c 1.231 vs edited =====
--- 1.231/mm/vmscan.c Sun Oct 17 01:07:24 2004
+++ edited/mm/vmscan.c Mon Oct 25 17:38:56 2004
@@ -379,7 +379,7 @@

referenced = page_referenced(page, 1);
/* In active use or really unfreeable? Activate it. */
- if (referenced && page_mapping_inuse(page))
+ if (referenced && sc->priority && page_mapping_inuse(page))
goto activate_locked;

#ifdef CONFIG_SWAP
@@ -715,7 +715,7 @@
if (page_mapped(page)) {
if (!reclaim_mapped ||
(total_swap_pages == 0 && PageAnon(page)) ||
- page_referenced(page, 0)) {
+ (page_referenced(page, 0) && sc->priority)) {
list_add(&page->lru, &l_active);
continue;
}