Re: 2.0.31-pre5: Couldn't get a free page.....

Dr. Werner Fink (werner@suse.de)
Thu, 14 Aug 1997 21:25:11 +0200


>
> Hmm, shoot me If I'm horribly wrong here.

Ohh, ohh ... now it's really happen :-}

>
> I just wanted to test the different ncr8xx driver versions
> to see which performed best. Just running one 40 meg bonnie
> on my box (p5-100/32/64) triggered the debug message.

You have tried the old and the new ncr driver. Under which one
the message appears?

>
> I thought the MM changes had made these a thing of the past?
>
> Hmm, I have 64 128 512 in my /proc/sys/vm/freepages, do the
> recent MM changes require Thomases 128 256 1024 in order to
> perform as they were designed to?

This maybe will help but ....

> Let me know if you want me to do further testing or if you
> want more detailed information on my setup.

A simple patch is appended to this mail. I hate it but it seems
necessary for such a situation.

Ahhh ... you should play lottery :-)

-

Linus, maybe is a good(?) idea always to return even if the freed
page is a shared one ... or return if the priority is less than 4
to avoid freeing by kswapd.

Werner

-------------------------------------------------------------------
diff -urN linux-2.0.31-linus/mm/vmscan.c linux/mm/vmscan.c
--- linux-2.0.31-linus/mm/vmscan.c Thu Aug 14 15:50:45 1997
+++ linux/mm/vmscan.c Thu Aug 14 21:02:58 1997
@@ -286,7 +286,7 @@

static int swap_out(unsigned int priority, int dma, int wait)
{
- static int swap_task;
+ static int swap_task, spg=0;
int loop, counter, shfrv;
struct task_struct *p;

@@ -366,8 +366,17 @@
swap_task++;
break;
case 1:
+ spg=0;
return 1;
default:
+ spg++;
+ if (priority <= 1) {
+ /* Ohh ... return even if the freed page is a shared one */
+ printk("swap_out: %d shared but private pages freed\n", spg);
+ spg=0;
+ swap_task++;
+ return 1;
+ }
break;
}
}