Re: Linux 2.4.10-pre11

Marcelo Tosatti (marcelo@conectiva.com.br)
Tue, 18 Sep 2001 16:18:34 -0300 (BRT)


On Tue, 18 Sep 2001, Marcelo Tosatti wrote:

>
>
> On Tue, 18 Sep 2001, Andrea Arcangeli wrote:
>
> > On Tue, Sep 18, 2001 at 02:02:37AM -0300, Marcelo Tosatti wrote:
> > > Try to run several memory hungry threads (thus hiding more pages).
> >
> > I did that indeed, not sure why I didn't reproduced (I guess the hogs
> > were sligthly different). (and of course they were killed but only after
> > the box was truly oom)
>
> Easy reproducible way:
>
> Boot with 64M, start 4 setiathome processes, then start mtest (from
> memtest suite) with a lot of threads (I'm using 40 readers and 4 writers
> in this case, and a 100MB heap)
>
> [root@matrix memtest-0.0.4]# ./mtest -m 100 -r 40 -w 4
> Starting test run with 100 megabyte heap.
> Setting up 25600 4096kB pages for test...
> done.
> Child 00 started with pid 00935, readonly
> Child 01 started with pid 00936, readonly
> Child 02 started with pid 00937, readonly
> Child 03 started with pid 00938, readonly
> Child 04 started with pid 00939, readonly
>
>
> Sep 18 14:28:31 matrix kernel: __alloc_pages: 0-order allocation failed
> (gfp=0x1d2/0) from c012c3be
> Sep 18 14:28:31 matrix kernel: VM: killing process setiathome

Andrea,

I still can reproduce the alloc pages failures with the following patch.

It should remove the "hidden pages" problem WRT ZONES. That is, a lot of
threads can still hide pages from each other independantly of the zone
hiding problem.

--- linux.orig/mm/vmscan.c Tue Sep 18 15:43:14 2001
+++ linux/mm/vmscan.c Tue Sep 18 16:37:52 2001
@@ -361,13 +361,19 @@
}

deactivate_page_nolock(page);
+
list_del(entry);
- list_add_tail(entry, &inactive_local_lru);

- if (__builtin_expect(!memclass(page->zone, classzone), 0))
+ if (__builtin_expect(!memclass(page->zone, classzone),
0)) {
+ list_add_tail(entry, &inactive_list);
+ __max_scan--;
continue;
+ }

__max_scan--;
+
+ list_add_tail(entry, &inactive_local_lru);
+

/* Racy check to avoid trylocking when not worthwhile */
if (!page->buffers && page_count(page) != 1) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/