Skip to contentSkip to conversation

__alloc_pages: 0-order allocation failed.

PATCH In review Martin MOKREJŠ 10 participants 29 messages Sep 4, 2001 – Sep 21, 2001

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

I hope it's not related to memory chunks allocated twice, so I think
it's another problem in 2.4.9, right?

Linux version 2.4.9 (user@host) (gcc version 2.95.2 20000220 (Debian GNU/Linux)) #4 SMP Thu Aug 30 15:10:26 CEST 2001 BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
BIOS-e820: 000000000009f400 - 000000000009f800 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 0000000040000000 (usable)
BIOS-e820: 00000000fec00000 - 00000000fec02000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
128MB HIGHMEM available.
Scan SMP from c0000000 for 1024 bytes.
Scan SMP from c009fc00 for 1024 bytes.
Scan SMP from c00f0000 for 65536 bytes.
found SMP MP-table at 000ff780
hm, page 000ff000 reserved twice.
hm, page 00100000 reserved twice.
hm, page 000f0000 reserved twice.
hm, page 000f1000 reserved twice.
On node 0 totalpages: 262144
zone(0): 4096 pages.
zone(1): 225280 pages.
zone(2): 32768 pages.

shell$ free
total used free shared buffers cached

Mem:       1028480     992840      35640          0      20832     821524
-/+ buffers/cache:     150484     877996
Swap:      2097136     100868    1996268

The machine is running apache 1.3.20 and mysql-3.23.41 only, and is
not loaded yet. :( Any ideas? Thanks.

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#1 lore raw
Quoted 6 lines · Martin MOKREJ?

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

Try 2.4.10-pre4.

Quoted 1 line

I hope it's not related to memory chunks allocated twice,

It's not

Quoted 1 line

so I think it's another problem in 2.4.9, right?

Yep. Most probably bounce buffers, patch by Marcelo already in Linus's tree.

--
Daniel

#2 lore raw

On Tue, 4 Sep 2001, Daniel Phillips wrote:

Hi,

Quoted 9 lines · Martin MOKREJ?
Quoted 6 lines

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

Try 2.4.10-pre4.

Hmm, so after a day of run we got it again:
__alloc_pages: 0-order allocation failed (gfp=0x70/1).

Quoted 4 lines
Quoted 1 line

so I think it's another problem in 2.4.9, right?

Yep. Most probably bounce buffers, patch by Marcelo already in Linus's tree.

So it did not fix it? But the output now has extra "(gfp=0x70/1)" string appended.

Any ideas?

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#3 lore raw
In reply to Daniel Phillips
Quoted 9 lines · Daniel Phillips
Quoted 6 lines · Martin MOKREJ?

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

Try 2.4.10-pre4.

Wow, I've just now realized that I get two types of error message:
__alloc_pages: 0-order allocatiocation failed (gfp=0x70/1). __alloc_pages: 0-order allocation failed (gfp=0x70/1).

We are using LVM and ReiserFS, HIGMEM kernel.

Maybe it helps to track it down. Any ideas?

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#4 lore raw
Quoted 13 lines · Martin MOKREJ?
Quoted 9 lines · Daniel Phillips
Quoted 6 lines · Martin MOKREJ?

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

Try 2.4.10-pre4.

Quoted 7 lines

Wow, I've just now realized that I get two types of error message:
__alloc_pages: 0-order allocatiocation failed (gfp=0x70/1). __alloc_pages: 0-order allocation failed (gfp=0x70/1).

We are using LVM and ReiserFS, HIGMEM kernel.

Maybe it helps to track it down. Any ideas?

printk has a limited amount of space for buffering messages, a ring buffer (sort of) and will start dropping text when the buffer fills up, so as not to slow the kernel down and/or interfere with interrupts. So that is why two lines of output got combined above, they are all the same message.

The gfp=0x70/1 identifies the failure as GFP_NOIO, PF_MEMALLOC, which by process of eliminate, comes from alloc_bounce_page. Marcelo's patch for bounce buffer allocation is *not* in 2.4.10-pre4, so we haven't proved anything yet.

You can get the patch from Marcelo's post on lkml on Aug 22 under the subject "Re: With Daniel Phillips Patch (was: aic7xxx with 2.4.9 on 7899P)". Note the correction posted in his next message in the thread. It applies to 2.4.9. Please try it and see if these failures go away.

This patch *should* be in the main tree soon. Some testing by you would help a lot.

--
Daniel

#5 lore raw
In reply to Martin MOKREJŠ
Quoted 32 lines · Daniel Phillips
Quoted 13 lines · Martin MOKREJ?
Quoted 9 lines · Daniel Phillips
Quoted 6 lines · Martin MOKREJ?

Hi,
I'm getting the above error on 2.4.9 kernel with kernel HIGHMEM option
enabled to 2GB, 2x Intel PentiumIII. The machine has 1GB RAM physically. Althougj I've found many report to linux-kernel list during past months, not a real solution. Maybe only:
http://www.alsa-project.org/archive/alsa-devel/msg08629.html

Try 2.4.10-pre4.

Quoted 7 lines

Wow, I've just now realized that I get two types of error message:
__alloc_pages: 0-order allocatiocation failed (gfp=0x70/1). __alloc_pages: 0-order allocation failed (gfp=0x70/1).

We are using LVM and ReiserFS, HIGMEM kernel.

Maybe it helps to track it down. Any ideas?

printk has a limited amount of space for buffering messages, a ring buffer (sort of) and will start dropping text when the buffer fills up, so as not to slow the kernel down and/or interfere with interrupts. So that is why two lines of output got combined above, they are all the same message.

The gfp=0x70/1 identifies the failure as GFP_NOIO, PF_MEMALLOC, which by process of eliminate, comes from alloc_bounce_page. Marcelo's patch for bounce buffer allocation is *not* in 2.4.10-pre4, so we haven't proved anything yet.

Quoted 7 lines

You can get the patch from Marcelo's post on lkml on Aug 22 under the subject "Re: With Daniel Phillips Patch (was: aic7xxx with 2.4.9 on 7899P)". Note the correction posted in his next message in the thread. It applies to 2.4.9. Please try it and see if these failures go away.

This patch *should* be in the main tree soon. Some testing by you would help a lot.

Correction, it's in Linus's tree all write, with some changed names. So...
conclusion: Marcelo's approach is not airtight. Or there was an error in translation. Arjan has a patch going in soon to the -ac tree, so stay tuned.

#6 lore raw
Quoted 4 lines · Daniel Phillips
Quoted 4 lines

You can get the patch from Marcelo's post on lkml on Aug 22 under the subject "Re: With Daniel Phillips Patch (was: aic7xxx with 2.4.9 on 7899P)". Note the correction posted in his next message in the thread. It applies to 2.4.9. Please try it and see if these failures go away.

Yes, it fixed my problem. I had to aplly also "patch" from someone from this list, who replied to Daniel, because in original Daniels version of patch were two typo mistakes.

Quoted 2 lines
Quoted 2 lines

This patch *should* be in the main tree soon. Some testing by you would help a lot.

I had a look on monday into the -pre7 but it did not look like it contains this patch.

Quoted 4 lines

Correction, it's in Linus's tree all write, with some changed names. So...
conclusion: Marcelo's approach is not airtight. Or there was an error in translation. Arjan has a patch going in soon to the -ac tree, so stay tuned.

I don't know what's Arjan's patch, but Marcelo's patch applied to plain 2.4.9 sources (manually applied) works for 2 days already here.

If you know how to push Marcelo's patch into the -preX version, please do so. ;-)

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#7 lore raw

__alloc_pages: 0-order allocation failed still in -pre12

Hi,
I tried 2.4.10-pre12 and run some mysql big tests (actually
mysql/tests/fork_big.pl ). And, the load is coming up and down from 17 to 6 .... and now, it's 1.7 only and I see in dmesg:

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2 __alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2

Filename                        Type            Size    Used    Priority
/dev/sda2                       partition       2097136 41392   -1

The swap usage grew up from 11MB 40MB.

free gives:
total used free shared buffers cached
Mem: 1029776 1007360 22416 0 4548 463936
-/+ buffers/cache: 538876 490900
Swap: 2097136 41392 2055744

The system started to page-out when there were almost no buffers available and many cached pages. The system started after bootup with cached=18k or something like that.

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  1054490624 880287744 174202880        0  4653056 460627968
Swap: 2147467264 42909696 2104557568
MemTotal:      1029776 kB
MemFree:        170120 kB
MemShared:           0 kB
Buffers:          4544 kB
Cached:         448416 kB
SwapCached:       1416 kB
Active:         377868 kB
Inactive:        76508 kB
HighTotal:      131072 kB
HighFree:         2044 kB
LowTotal:       898704 kB
LowFree:        168076 kB
SwapTotal:     2097136 kB
SwapFree:      2055232 kB

I have to say I've been using for a week without any "0-order allocation failed" patch from Marcelo. Now I see am back to the old stage. ;(

Quoted 4 lines
Quoted 4 lines

You can get the patch from Marcelo's post on lkml on Aug 22 under the subject "Re: With Daniel Phillips Patch (was: aic7xxx with 2.4.9 on 7899P)". Note the correction posted in his next message in the thread. It applies to 2.4.9. Please try it and see if these failures go away.

Please Cc: me in reply, if possible.

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#8 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

Hi,
one more addition:
I used mysqldump to dump some big database, and here's something weird:

jerboas:/mnt# ls -la
total 372024
drwxr-xr-x    2 root     root           80 Sep 19 16:34 .
drwxr-xr-x   20 root     root         4096 Sep 19 11:32 ..
-rw-r--r--    1 root     root     380946064 Sep 19 16:35 Celegans.sql
jerboas:/mnt# ls -la
ls: Celegans.sql: Value too large for defined data type
total 4
drwxr-xr-x    2 root     root           80 Sep 19 16:34 .
drwxr-xr-x   20 root     root         4096 Sep 19 11:32 ..
[1]-  Done                    /usr/local/mysql/bin/mysqldump -hlocalhost -P3306 -upedant Celegans >Celegans.sql
jerboas:/mnt# ls -la
ls: Celegans.sql: Value too large for defined data type
total 4
drwxr-xr-x    2 root     root           80 Sep 19 16:34 .
drwxr-xr-x   20 root     root         4096 Sep 19 11:32 ..
jerboas:/mnt# 

Running `mc' in this directory says:

File 'Celegans.sql' exists but can not be stat-ed: Value too large for defined data type

It's on freshly made reiserfs filesystem, if it helps.

Sep 19 16:32:28 jerboas kernel: reiserfs: checking transaction log (device 03:41) ...
Sep 19 16:32:30 jerboas kernel: Using r5 hash to sort names
Sep 19 16:32:30 jerboas kernel: ReiserFS version 3.6.25

The source mysql directory on reiserfs on different disk, has 1693948 kB (multiple files). In the /mnt it should the dump be all in one file, also on reiserfs. The machine has 1GB RAM, SMP kernel, HIGHMEM enabled.

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#9 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 4 lines · On Wed, 19 Sep 2001, [iso-8859-2] Martin MOKREJ© wrote:

I tried 2.4.10-pre12

I have to say I've been using for a week without any "0-order allocation failed" patch from Marcelo. Now I see am back to the old stage. ;(

Impossible, the VM code which is in 2.4.10-pre11 and newer wasn't published until sunday night, so you can't have been using it for a week already. ;)

cheers,

Rik

Signature · 5 lines
IA64: a worthy successor to i860.

http://www.surriel.com/		http://distro.conectiva.com/

Send all your spam to [email protected] (spam digging piggy)
#10 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

Quoted 10 lines · Rik van Riel
Quoted 4 lines · On Wed, 19 Sep 2001, [iso-8859-2] Martin MOKREJŠ wrote:

I tried 2.4.10-pre12

I have to say I've been using for a week without any "0-order allocation failed" patch from Marcelo. Now I see am back to the old stage. ;(

Impossible, the VM code which is in 2.4.10-pre11 and newer wasn't published until sunday night, so you can't have been using it for a week already. ;)

Sorry, again: I'm currently using plain 2.4.9 patched with -pre12. I get the allocation errors. I got the image from kernel.dk/testing/ today morning, as someone posted this address on the list.

My previous kernel is plain 2.4.9 patched with Marcelo's patched and in a week period I did not receive nay single error message like that.

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#11 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ

Hi,

I'm getting the same thing here. At least it looks similar though I'm not sure what's causing it. Dual PIII 850, 1gb ram, 300mb swap.

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

Quoted 7 lines · Martin MOKREJ?

Hi,
I tried 2.4.10-pre12 and run some mysql big tests (actually
mysql/tests/fork_big.pl ). And, the load is coming up and down from 17 to 6 .... and now, it's 1.7 only and I see in dmesg:

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2 __alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D
#12 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 7 lines · Martin MOKREJ?

Hi,
I tried 2.4.10-pre12 and run some mysql big tests (actually
mysql/tests/fork_big.pl ). And, the load is coming up and down from 17 to 6 .... and now, it's 1.7 only and I see in dmesg:

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2 __alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e3e2

Ok, I'm pretty certain I got it, I didn't noticed here because it can be reproduced only with HIGHMEM and I didn't had time to test highmem yet (btw, highmem emulation would been enough to reproduce it).

It was really an allocator bug. Totally untested fix appended but recommended anyways for integration.

Marcelo can you also test it in your workload (feel free to use eepro100 too now).

mm/page_alloc.c renamed from mm/page_alloc.c.~1~ +7 -3
@@ -369,6 +369,7 @@
 		return NULL;
 	}
 
+ rebalance:
 	page = balance_classzone(classzone, gfp_mask, order, &freed);
 	if (page)
 		return page;
@@ -380,10 +381,13 @@
 			if (!z)
 				break;
 
-			page = rmqueue(z, order);
-			if (page)
-				return page;
+			if (zone_free_pages(z, order) > z->pages_min) {
+				page = rmqueue(z, order);
+				if (page)
+					return page;
+			}
 		}
+		goto rebalance;
 	} else {
 		/* 
 		 * Check that no other task is been killed meanwhile,

Andrea

#13 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 4 lines · Shane Wegner

Hi,

I'm getting the same thing here. At least it looks similar though I'm not sure what's causing it. Dual PIII 850, 1gb

							 ^^^ perfect
Quoted 8 lines

ram, 300mb swap.

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

yes, please try this fix and let me know if it helps:

mm/page_alloc.c renamed from mm/page_alloc.c.~1~ +7 -3
@@ -369,6 +369,7 @@
 		return NULL;
 	}
 
+ rebalance:
 	page = balance_classzone(classzone, gfp_mask, order, &freed);
 	if (page)
 		return page;
@@ -380,10 +381,13 @@
 			if (!z)
 				break;
 
-			page = rmqueue(z, order);
-			if (page)
-				return page;
+			if (zone_free_pages(z, order) > z->pages_min) {
+				page = rmqueue(z, order);
+				if (page)
+					return page;
+			}
 		}
+		goto rebalance;
 	} else {
 		/* 
 		 * Check that no other task is been killed meanwhile,

Andrea

#14 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 10 lines · Andrea Arcangeli
Quoted 7 lines · Shane Wegner

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

yes, please try this fix and let me know if it helps:

After some stress testing, the fix does appear to fix the error.

Shane

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D
#15 lore raw

Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian

Hi,
first of all, thanks to Andrea. I had a bit hard time to find sources of
his kernel-patches.

Note to the FAQ maintainer: there isn't mentioned the source for -ac and -aa kernels.

I found that I need 2.4.9 patched to -pre12 and patched afterwards with
http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.10pre12aa1.bz2

Using my old configuration for kernel I get after "make dep; make bzImage"

gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.4.10-pre12/linux/include/linux/mm.h:4,

                 from /usr/src/linux-2.4.10-pre12/linux/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.10-pre12/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:

/usr/src/linux-2.4.10-pre12/linux/include/linux/sched.h:423: warning: `PF_USEDFPU' redefined
/usr/src/linux-2.4.10-pre12/linux/include/linux/sched.h:421: warning: this is the location of the previous definition
. scripts/mkversion > .version
gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DUTS_MACHINE='"i386"' -c -o init/version.o init/version.c make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 " -C kernel make[1]: Entering directory `/usr/src/linux-2.4.10-pre12/linux/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.10-pre12/linux/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-omit-frame-pointer -c -o sched.o sched.c
In file included from /usr/src/linux-2.4.10-pre12/linux/include/linux/mm.h:4,

                 from sched.c:24:

/usr/src/linux-2.4.10-pre12/linux/include/linux/sched.h:423: warning: PF_USEDFPU' redefined /usr/src/linux-2.4.10-pre12/linux/include/linux/sched.h:421: warning: this is the location of the previous definition sched.c: In function reschedule_idle':
sched.c:234: warning: `oldest_idle' might be used uninitialized in this function
sched.c: In function `sys_sched_yield':
sched.c:1130: warning: control reaches end of non-void function
sched.c: At top level:
sched.c:1135: parse error before `if'
sched.c:1142: parse error before `->'
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.10-pre12/linux/kernel'

Note to Andrea, while you mention in your post to linux-kernel list
Changelog of your kernel relase, you do not mention for newbies like me se source site and maybe "How to apply" would help also. ;)

Thanks for replies! ;-)

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#16 lore raw

Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian

From: "Martin MOKREJ©" <[email protected]>

There are two defines for that FPU thing around line 421 in sched.c, take one away (i deleted the 1<<6 one).

I'm running that kernel now.

Magnus

#17 lore raw

Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian

Quoted 4 lines · Magnus Naeslund(f)

From: "Martin MOKREJŠ" <[email protected]>

There are two defines for that FPU thing around line 421 in sched.c, take one away (i deleted the 1<<6 one).

I've just compiled and am going to reboot, one more note:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o pci-pc.o pci-pc.c
{standard input}: Assembler messages:
{standard input}:1116: Warning: indirect lcall without `*'
{standard input}:1201: Warning: indirect lcall without `*'
{standard input}:1288: Warning: indirect lcall without `*'
{standard input}:1370: Warning: indirect lcall without `*'
{standard input}:1381: Warning: indirect lcall without `*'
{standard input}:1392: Warning: indirect lcall without `*'
{standard input}:1479: Warning: indirect lcall without `*'
{standard input}:1491: Warning: indirect lcall without `*'
{standard input}:1503: Warning: indirect lcall without `*'
{standard input}:1990: Warning: indirect lcall without `*'
{standard input}:2083: Warning: indirect lcall without `*'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.10-pre12/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o pci-irq.o pci-irq.c

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#18 lore raw

Perf improvements in 2.4.10pre12aa1

In reply to Magnus Naeslund(f)

Hi,
I've just started some tests to try to repeat the memory allocation
errors. I see the aa1 kernel is twice fast as -pre12!? Is this expected? I have 2x intelPIII 933MHz, 1GB RAM, HIGMEM kernel, ReiserFS, aic7xxx, eepro100.

linux-2.4.10-pre12
dbench 16: Throughput 67.8566 MB/sec (NB=84.8208 MB/sec 678.566 MBit/sec) 16 procs

Yesterday after havy tests and after memory alloc. errors already appeared:
total: used: free: shared: buffers: cached:

Mem:  1054490624 880287744 174202880        0  4653056 460627968
Swap: 2147467264 42909696 2104557568
MemTotal:      1029776 kB
MemFree:        170120 kB
MemShared:           0 kB
Buffers:          4544 kB
Cached:         448416 kB
SwapCached:       1416 kB
Active:         377868 kB
Inactive:        76508 kB
HighTotal:      131072 kB
HighFree:         2044 kB
LowTotal:       898704 kB
LowFree:        168076 kB
SwapTotal:     2097136 kB
SwapFree:      2055232 kB

linux-2.4.10-pre12aa1
dbench 16: Throughput 141.659 MB/sec (NB=177.074 MB/sec 1416.59 MBit/sec) 16 procs

Now after fresh bootup and just after I started first tests:
total: used: free: shared: buffers: cached:

Mem:  1054412800 110338048 944074752        0  8560640 59211776
Swap: 2147467264        0 2147467264
MemTotal:      1029700 kB
MemFree:        921948 kB
MemShared:           0 kB
Buffers:          8360 kB
Cached:          57824 kB
SwapCached:          0 kB
Active:              0 kB
Inactive:        66184 kB
HighTotal:      131072 kB
HighFree:        58612 kB
LowTotal:       898628 kB
LowFree:        863336 kB
SwapTotal:     2097136 kB
SwapFree:      2097136 kB

The documentation to dbech is a bit sparse (README,INSTALL). It's a bit offtopic, but would someone explain me where does the dbench write, into which directory? I performed the tests above under same user and in same tmp/ directory, to be sure. Maybe it was not necessary at all. ;)

Thanks

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#19 lore raw

Re: Perf improvements in 2.4.10pre12aa1

On Thu, 20 Sep 2001, Martin MOKREJŠ wrote:

Hi,
stupid to reply to myself, but ...

Quoted 5 lines

linux-2.4.10-pre12
dbench 16: Throughput 67.8566 MB/sec (NB=84.8208 MB/sec 678.566 MBit/sec) 16 procs

linux-2.4.10-pre12aa1
dbench 16: Throughput 141.659 MB/sec (NB=177.074 MB/sec 1416.59 MBit/sec) 16 procs

Hmm, now after few ours of running mysql tests I have (while still running):
linux-2.4.10-pre12aa1
dbench 16: Throughput 41.1484 MB/sec (NB=51.4356 MB/sec 411.484 MBit/sec) 16 procs

Load so far up to 7 (yesterday even 16, but thatt dependes of course while test is currently being run).

And, well oh NO!, it's here again:
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012f852

How can I find what mean those (gfp=0x20/0) from c012f852 ? Current situation:
total: used: free: shared: buffers: cached:

Mem:  1054412800 845828096 208584704        0  3731456 476766208
Swap: 2147467264 61083648 2086383616
MemTotal:      1029700 kB
MemFree:        203696 kB
MemShared:           0 kB
Buffers:          3644 kB
Cached:         464100 kB
SwapCached:       1492 kB
Active:         318896 kB
Inactive:       150340 kB
HighTotal:      131072 kB
HighFree:         2044 kB
LowTotal:       898628 kB
LowFree:        201652 kB
SwapTotal:     2097136 kB
SwapFree:      2037484 kB

5:29pm up 4:58, 3 users, load average: 5.61, 6.04, 6.32

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#20 lore raw

Re: Perf improvements in 2.4.10pre12aa1

On Thu, 20 Sep 2001, Martin MOKREJŠ wrote:

There was an answer already posted, amazing!

Quoted 2 lines

And, well oh NO!, it's here again:
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012f852

ksysmap: searching '/boot/System.map-2.4.10-pre12aa1' for 'c012f852'

c012f83c T _alloc_pages
c012f852 ..... <<<<<
c012f854 t balance_classzone

Signature · 4 lines
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
#21 lore raw

Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian

In reply to Martin MOKREJŠ

From: "Magnus Naeslund(f)" <[email protected]>

Quoted 5 lines

From: "Martin MOKREJ©" <[email protected]>

There are two defines for that FPU thing around line 421 in sched.c, take one away (i deleted the 1<<6 one).

... And that should have been sched.h, as Martin kindly pointed out ;) I meant something like this:

sched.h Thu Sep 20 11:29:06 2001 renamed from sched.h~ Thu Sep 20 10:20:44 2001 +0 -1
@@ -418,7 +418,9 @@
 #define PF_DUMPCORE    (1UL<<3)        /* dumped core */
 #define PF_SIGNALED    (1UL<<4)        /* killed by a signal */
 #define PF_MEMALLOC    (1UL<<5)        /* Allocating memory */
-#define PF_USEDFPU     (1UL<<6)        /* task used FPU this quantum (SMP)

*/
#define PF_ATOMICALLOC (1UL<<7) /* do not block during memalloc */
#define PF_USEDFPU (1UL<<8) /* task used FPU this quantum (SMP)
*/
#define PF_FREE_PAGES (1UL<<9) /* per process page freeing */

Magnus

#22 lore raw

PATCH 1/1 Make kernel build numbers work again (was: Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian)

In reply to Shane Wegner
Quoted 1 line · Martin MOKREJ©

. scripts/mkversion > .version

People,

As I'm sure you're all aware, being experts in userland programming, that the above obviously cannot work and is totally bogus.

The mkversion script contains:

if [ ! -f .version ]
then
echo 1
else
expr 0cat .version + 1
fi

but wait! As far as the script is concerned, .version will always exist because its created before the script is run (the open occurs, the file is truncated, and passed to the script as STDOUT).

This has a nice effect - the build number of the kernel is now fixed at '1'. So, why don't we get rid of the above crap and just do "echo 1 > .version" and be done with it? ;)

Alternatively, the following patch fixes things such that we can read the original .version file within the script, if it existed prior to invocation, and produce the correct build number.

Note that as illustrated by the previous poster, -linus now has the problem, and -ac also has the same. The following patch was generated against 2.4.9-ac10, but should apply to both trees without problem.

Makefile +3 -2
@@ -234,7 +234,7 @@
 	drivers/sound/pndsperm.c \
 	drivers/sound/pndspini.c \
 	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
-	.version .config* config.in config.old \
+	.version* .config* config.in config.old \
 	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
 	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
 	.menuconfig.log \
@@ -306,7 +306,8 @@
 $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
 
 newversion:
-	. scripts/mkversion > .version
+	. scripts/mkversion > .version.tmp
+	@mv -f .version.tmp .version
 
 include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
 	@echo -n \#define UTS_VERSION \"\#`cat .version` > .ver

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

#23 lore raw

Re: [PATCH] Make kernel build numbers work again (was: Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian)

Quoted 3 lines

Note that as illustrated by the previous poster, -linus now has the problem, and -ac also has the same. The following patch was generated against 2.4.9-ac10, but should apply to both trees without problem.

Looks right to me

#24 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 10 lines · Shane Wegner
Quoted 9 lines · Andrea Arcangeli
Quoted 7 lines · Shane Wegner

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

Quoted 4 lines
Quoted 1 line

yes, please try this fix and let me know if it helps:

After some stress testing, the fix does appear to fix the error.

good, what about the performance, is it all right?

Andrea

#25 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 10 lines · Shane Wegner
Quoted 9 lines · Andrea Arcangeli
Quoted 7 lines · Shane Wegner

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

Quoted 4 lines
Quoted 1 line

yes, please try this fix and let me know if it helps:

After some stress testing, the fix does appear to fix the error.

Hi,

Well just after I sent the email, it came up again.

Sep 19 19:31:52 continuum kernel: __alloc_pages: 0-order
allocation failed (gfp=0x20/0) from c012e052
Sep 19 19:33:51 continuum kernel: __alloc_pages: 0-order

allocation failed (gfp=0x20/0) from c012e052

Shane

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D
#26 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 18 lines · Shane Wegner
Quoted 10 lines · Shane Wegner
Quoted 9 lines · Andrea Arcangeli
Quoted 7 lines · Shane Wegner

__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052
__alloc_pages: 0-order allocation failed (gfp=0x20/0) from c012e052

Quoted 4 lines
Quoted 1 line

yes, please try this fix and let me know if it helps:

After some stress testing, the fix does appear to fix the error.

Hi,

Quoted 7 lines

Well just after I sent the email, it came up again.

Sep 19 19:31:52 continuum kernel: __alloc_pages: 0-order
allocation failed (gfp=0x20/0) from c012e052
Sep 19 19:33:51 continuum kernel: __alloc_pages: 0-order

allocation failed (gfp=0x20/0) from c012e052

did it happen as frequently/easily as before or did you need to stress it much harder? And I'm also curious what happens if we simply lower the watemark (possibly it was too high). Anyways the other patch is a good idea to apply anyways.

So can now try the below new one?

mm/page_alloc.c renamed from mm/page_alloc.c.~1~ +1 -1
@@ -346,7 +346,7 @@
 		if (!z)
 			break;
 
-		if (zone_free_pages(z, order) > (gfp_mask & __GFP_HIGH ? z->pages_min / 2 : z->pages_min)) {
+		if (zone_free_pages(z, order) > (gfp_mask & __GFP_HIGH ? z->pages_min / 4 : z->pages_min)) {
 			page = rmqueue(z, order);
 			if (page)
 				return page;

the fact is, kswapd is the only entity meant to shrink the caches for the atomic pages, it exactly knows what are the zones that needs to be balanced and we have a min-min/2 of pages of GAP that must be refilled in time. It just seems kswapd doesn't cope with the frequency of the allocations sometime, this may be ok but maybe we must find a way to more aggressively free memory for the atomic allocations or it could simply mean that the watermark GAP was too small as Marcelo just suggested previously.

Can you also resolve "c012e052" so we know who's allocating those pages just in case?

Andrea

#27 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

In reply to Martin MOKREJŠ
Quoted 3 lines · Andrea Arcangeli

Can you also resolve "c012e052" so we know who's allocating those pages just in case?

It's trivial to do that, of course, but if someone needs an automated way to do it (several times, easy lookup), you can try http://www.osdlab.org/sw_resources/scripts/ksysmap .

Usage is: ksysmap [system_map_file] offset

and it spits out address/symbol before offset, exact match if present, and address/symbol after offset.

Example:

[rddunlap@dragon linux]$ ksysmap ./System.map-249acpi c012e052
ksysmap: searching './System.map-249acpi' for 'c012e052'

c012df20 T sys_truncate
c012e052 ..... <<<<<
c012e0a0 T sys_ftruncate

~Randy

#28 lore raw

Re: __alloc_pages: 0-order allocation failed still in -pre12

Quoted 2 lines · Randy.Dunlap

Usage is: ksysmap [system_map_file] offset
and it spits out address/symbol before offset, exact match if

I like it!

Idea pinched for ksymoops 2.4.3; ksymoops -A "address list", any words in the -A list are treated as addresses and looked up in the composite system map, including modules.