Skip to contentSkip to conversation

2.6.21-rc3-mm2

PATCH In review Andrew Morton 16 participants 37 messages Mar 8, 2007 – Mar 20, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Andrew Morton

author maintainer
#0 lore raw

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

Changes since 2.6.21-rc3-mm1:

-lists-add-list-splice-tail.patch
-sched-remove-sleepavg-from-proc.patch
-sched-remove-noninteractive-flag.patch
-sched-implement-180-bit-sched-bitmap.patch
-sched-implement-rsdl-cpu-scheduler.patch
-sched-document-rsdl-cpu-scheduler.patch

Removed.

#1 lore raw

PATCH 1/1 fix BUG_ON check at move_freepages() (Re: 2.6.21-rc3-mm2)

Hello.

The BUG_ON() check at move_freepages() is wrong.
Its end_page is start_page + MAX_ORDER_NR_PAGES. So, it can be next zone. BUG_ON() should check "end_page - 1".

This is fix of 2.6.21-rc3-mm2 for it.

---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
Index: current_test/mm/page_alloc.c
===================================================================
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
-	BUG_ON(page_zone(start_page) != page_zone(end_page));
+	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
 
 	for (page = start_page; page < end_page;) {
 		if (!PageBuddy(page)) {
Signature · 1 line
Yasunori Goto 
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] fix BUG_ON check at move_freepages() (Re: 2.6.21-rc3-mm2)

Quoted 7 lines · Yasunori Goto

Hello.

The BUG_ON() check at move_freepages() is wrong.
Its end_page is start_page + MAX_ORDER_NR_PAGES. So, it can be next zone. BUG_ON() should check "end_page - 1".

You're right on all counts.

Quoted 4 lines

This is fix of 2.6.21-rc3-mm2 for it.

Quoted 22 lines

---
mm/page_alloc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

Index: current_test/mm/page_alloc.c
===================================================================

mm/page_alloc.c +1 -1
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
-	BUG_ON(page_zone(start_page) != page_zone(end_page));
+	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
 
 	for (page = start_page; page < end_page;) {
 		if (!PageBuddy(page)) {
Signature · 2 lines
-- 
Yasunori Goto
Signature · 3 lines
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
#3 lore raw
In reply to Andrew Morton
Quoted 5 lines · Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2. 6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

As for benchmarking between them I haven't seen anyone post anything yet. Test.kernel.org is having a field day with both of them ABORTing or WARNing without one GOOD so far. Urgh what was the description you gave of -mm to Gene?...I don't envy you :(

Apart from your big fat oops on that massive config, I've had people boot it also on alpha and IA64. The bitmap error also manifested on alpha but not on IA64 (neither oopsed).

So on qemu I can reproduce the oops you're getting with your config (make oldconfig all default on top of your config), but I'm getting other wonderful related problems too on rc3-mm2. On qemu -mm1 boots mostly without error and then crashes nicely when I type 'ps' with a long pause for about twenty seconds and then a combination of soft lockups, bitmap errors, and eventually hits the BUG_ON I put in bitmap_error(). However, -mm2 also vomits on typing 'ps'.

It pauses and then spits out (fun lines selected from ps output):

7 ? serial8250: too much work for irq4
00:00:00 watchdog/1
88 ? 00:00:0serial8250: too much work for irq4
0 cqueue/1
137 ? 00:00serial8250: too much work for irq4
:00 aio/0

Checking a few /proc files I see that "serial83250" info littered throughout /proc/stat as well. -mm2 does not oops but the proc output is variously corrupted.

Interestingly if I don't type 'ps' in the -mm1 qemu it runs fine with no sign of a bug... In summary, here I can only reproduce your big fat oops by it being triggered by some corruption elsewhere on this config related to /proc breakage that I haven't managed to track down. I checked the broken-out patches to see which touched /proc and it was oh, most of them. I tried on rc3 and had the same thing happen. I haven't tried rc3 without rsdl (your config takes too darn long to build!).

The bitmap error that you're hitting on ppc I believe is a different issue. I don't have hardware that does it at my end but one user has hit it also on alpha and is trying to help me find the root cause. If we change it from being a once only printk to every time, it seems to go away after 10 mins of runtime never to return again. What could possibly change over that time for the error never to return again is a mystery. This part definitely looks to be my fault but a bug "getting better and going away" is a new one for me. I have to think about some timer interaction although I don't use jiffies or timers directly at all in my code. It also happens on 2.6.20 with RSDL.

Summary from what I've been able to find:
x86_32: ok
x86_64: ok
x86_64 fat config: scheduler code oops brought on by accessing /proc IA64 ok: ok
Alpha: bitmap error, runs ok

I'm off to pass out for now so that I'm of some use to the rest of my existence tomorrow.

Signature · 1 line
-ck
#4 lore raw
Quoted 6 lines · Con Kolivas

Summary from what I've been able to find:
x86_32: ok
x86_64: ok
x86_64 fat config: scheduler code oops brought on by accessing /proc IA64 ok: ok
Alpha: bitmap error, runs ok

PA-Risc: ok

Now what is it about ppc and Alpha that make it hit the bitmap error on startup...

Signature · 1 line
-ck
#5 lore raw

2.6.21-rc3: /proc broken

In reply to Con Kolivas
Quoted 29 lines · Con Kolivas
Quoted 5 lines · Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/
2. 6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

So on qemu I can reproduce the oops you're getting with your config (make oldconfig all default on top of your config), but I'm getting other wonderful related problems too on rc3-mm2. On qemu -mm1 boots mostly without error and then crashes nicely when I type 'ps' with a long pause for about twenty seconds and then a combination of soft lockups, bitmap errors, and eventually hits the BUG_ON I put in bitmap_error(). However, -mm2 also vomits on typing 'ps'.

It pauses and then spits out (fun lines selected from ps output):

7 ? serial8250: too much work for irq4
00:00:00 watchdog/1
88 ? 00:00:0serial8250: too much work for irq4
0 cqueue/1
137 ? 00:00serial8250: too much work for irq4

:00 aio/0

Checking a few /proc files I see that "serial83250" info littered throughout /proc/stat as well. -mm2 does not oops but the proc output is variously corrupted.

Quoted 7 lines

Interestingly if I don't type 'ps' in the -mm1 qemu it runs fine with no sign of a bug... In summary, here I can only reproduce your big fat oops by it being triggered by some corruption elsewhere on this config related to /proc breakage that I haven't managed to track down. I checked the broken-out patches to see which touched /proc and it was oh, most of them. I tried on rc3 and had the same thing happen. I haven't tried rc3 without rsdl (your config takes too darn long to build!).

/proc appears broken on vanilla -rc3 as well.

I did make oldconfig from http://userweb.kernel.org/~akpm/ck/config.txt and chose all the defaults. Then building your fat config with -rc3, 'ps' hangs on qemu for almost 30 seconds and then at last produces a broken output

PID TTY TIME CMD

    1 ?        00:00:00 init
    2 ?        00:00:00 migration/0
    3 ?        00:00:00 ksoftirqd/0
    4 ?        00:00:00 watchdog/0
    5 ?        00:00:00 migration/1
    6 ?        00:00:00 ksoftirqd/1
    7 ?        serial8250: too much work for irq4
00:00:00 watchdog/1
    8 ?        00:00:00 events/0
    9 ?        00:00:00 events/1
   10 ?        00:00:00 khelper
   11 ?        00:00:00 kthread
   52 ?        00:00:00 kblockd/0
   53 ?        00:00:00 kblockd/1
   54 ?        00:00:00 kacpid
   87 ?        00:00:00 cqueue/0
   88 ?        00:00:00 cqueue/1
   89 ?        00:00:00 ata/0
   90 ?        00:00:00 ata/1
   91 ?        00:00:00 ata_aux
   92 ?        00:00:00 ksuspend_usbd
   95 ?        00:00:00 khubd
   97 ?        00:00:00 kseriod
  133 ?        00:00:00 pdflush
  134 ?        00:00:00 pdflush
  135 ?        00:00:00 kserial8250: too much work for irq4
swapd0
  136 ?        00:00:00 aio/0
  137 ?        00:00:00 aio/1
  287 ?        00:00:00 kpsmoused
  311 ?        00:00:00 sh
  312 ?        00:00:00 ps

It's random where this happens too. Sometimes it goes away, other times it's different tasks, and it happens to /proc/stat too

Signature · 1 line
-ck
#6 lore raw

Re: 2.6.21-rc3: /proc broken

Quoted 3 lines · Con Kolivas

I did make oldconfig from http://userweb.kernel.org/~akpm/ck/config.txt and chose all the defaults. Then building your fat config with -rc3, 'ps' hangs on qemu for almost 30 seconds and then at last produces a broken output

Let me guess - you have either a serial console or something like that and you're running these commands over said serial console?

Or you have console directed to both a serial port and the VT and you're capturing this off the VT using gpm.

Either way, "serial8250: too much work for irq4" is a printk which will be displayed by the kernel when it's unable to clear down work for the serial port within 256 loops or so of the interrupt handler; it's a protection against the box locking up.

It not actually contained in any of the files.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
#7 lore raw

Re: 2.6.21-rc3: /proc broken

Quoted 12 lines · Russell King
Quoted 4 lines · Con Kolivas

I did make oldconfig from http://userweb.kernel.org/~akpm/ck/config.txt
and chose all the defaults. Then building your fat config with -rc3, 'ps' hangs on qemu for almost 30 seconds and then at last produces a broken output

Let me guess - you have either a serial console or something like that and you're running these commands over said serial console?

Or you have console directed to both a serial port and the VT and you're capturing this off the VT using gpm.

Quoted 6 lines

Either way, "serial8250: too much work for irq4" is a printk which will be displayed by the kernel when it's unable to clear down work for the serial port within 256 loops or so of the interrupt handler; it's a protection against the box locking up.

It not actually contained in any of the files.

Thank you very much for taking the time to explain it to me and I apologise for the false positive. It's very much due to running qemu directing everything to the serial console which is just as you say. Allowing qemu to output to graphic fixes the error. Unfortunately that also makes akpm's oops go away so I can't really reproduce it now. Perhaps the bug occurs due to interrupts being disabled for an extended time; it gives me something to look at now.

Thanks!

Signature · 1 line
-ck
#8 lore raw

Re: 2.6.21-rc3-mm2 hangs my opteron during bootup, ACPI?

In reply to Andrew Morton

I went from 2.6.18-rc5-mm1 to 2.6.21-rc3-mm2 The computer now hangs solid during boot, at this point:

usb 1-1: configuration #1 chosen from 1 choice
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007 usb 1-3: new high speed USB device using ehci_hcd and address 3
pc87360: PC8736x not detected, module not inserted.
md: raid1 personality registered for level 1
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
EDAC MC: Ver: 2.0.1 Sep 2 2006
sdhci: Secure Digital Host Controller Interface driver, 0.12
sdhci: Copyright(c) Pierre Ossman
wbsd: Winbond W83L51xD SD/MMC card interface driver, 1.6
wbsd: Copyright(c) Pierre Ossman
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 17 (level, low) -> IRQ 17

Here it stops with a dead keyboard. No sysrq, it is time for the power button. A 2.6.18-rc5-mm1 boot continues like this:

gameport: Trident 4DWave is pci0000:00:06.0/gameport0, speed 1884kHz ALSA device list:
#0: Trident TRID4DWAVENX PCI Audio at 0x9400, irq 17
oprofile: using NMI interrupt.
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_conntrack version 2.4 (2043 buckets, 16344 max) - 288 bytes per conntrack
ip_tables: (C) 2000-2006 Netfilter Core Team
joydump: ,------------------ START ----------------.

I'll be trying 2.6.20 next, unless adviced otherwise.

Helge Hafting

#9 lore raw

Re: 2.6.21-rc3-mm2 hangs my opteron during bootup, ACPI?

try acpi=off please.

Quoted 46 lines · Helge Hafting

I went from 2.6.18-rc5-mm1 to 2.6.21-rc3-mm2 The computer now hangs solid during boot, at this point:

usb 1-1: configuration #1 chosen from 1 choice drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007
usb 1-3: new high speed USB device using ehci_hcd and address 3
pc87360: PC8736x not detected, module not inserted.
md: raid1 personality registered for level 1
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
EDAC MC: Ver: 2.0.1 Sep 2 2006
sdhci: Secure Digital Host Controller Interface driver, 0.12
sdhci: Copyright(c) Pierre Ossman
wbsd: Winbond W83L51xD SD/MMC card interface driver, 1.6
wbsd: Copyright(c) Pierre Ossman
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 17 (level, low) -> IRQ 17

Here it stops with a dead keyboard. No sysrq, it is time for the power button.
A 2.6.18-rc5-mm1 boot continues like this:

gameport: Trident 4DWave is pci0000:00:06.0/gameport0, speed 1884kHz ALSA device list:
#0: Trident TRID4DWAVENX PCI Audio at 0x9400, irq 17
oprofile: using NMI interrupt.
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_conntrack version 2.4 (2043 buckets, 16344 max) - 288 bytes per conntrack
ip_tables: (C) 2000-2006 Netfilter Core Team
joydump: ,------------------ START ----------------.

I'll be trying 2.6.20 next, unless adviced otherwise.

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

#10 lore raw

Re: 2.6.21-rc3-mm2 hangs my opteron during bootup, ACPI?

Quoted 41 lines · Luming Yu

try acpi=off please.

Quoted 38 lines · Helge Hafting

I went from 2.6.18-rc5-mm1 to 2.6.21-rc3-mm2 The computer now hangs solid during boot, at this point:

usb 1-1: configuration #1 chosen from 1 choice drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007
usb 1-3: new high speed USB device using ehci_hcd and address 3
pc87360: PC8736x not detected, module not inserted.
md: raid1 personality registered for level 1
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
EDAC MC: Ver: 2.0.1 Sep 2 2006
sdhci: Secure Digital Host Controller Interface driver, 0.12
sdhci: Copyright(c) Pierre Ossman
wbsd: Winbond W83L51xD SD/MMC card interface driver, 1.6
wbsd: Copyright(c) Pierre Ossman
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 17 (level, low) -> IRQ 17

Here it stops with a dead keyboard. No sysrq, it is time for the power button.
A 2.6.18-rc5-mm1 boot continues like this:

gameport: Trident 4DWave is pci0000:00:06.0/gameport0, speed 1884kHz ALSA device list:
#0: Trident TRID4DWAVENX PCI Audio at 0x9400, irq 17
oprofile: using NMI interrupt.
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_conntrack version 2.4 (2043 buckets, 16344 max) - 288 bytes per conntrack
ip_tables: (C) 2000-2006 Netfilter Core Team
joydump: ,------------------ START ----------------.

I'll be trying 2.6.20 next, unless adviced otherwise.

yes, that would be a good baseline.

But how about the latest git tree w/o anything from -mm. eg. 2.6.21-rc3-git7

thanks,
-Len

#11 lore raw

Re: 2.6.21-rc3-mm2 hangs my opteron during bootup, ACPI?

Quoted 4 lines · Len Brown
Quoted 2 lines · Luming Yu

try acpi=off please.

Ok, it boots up fine with acpi=off.
Now the next step is to try without the mm patch?

Helge Hafting

#12 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

In reply to Andrew Morton

FYI, I'm seeing the following oops with 2.6.21-rc3-mm1 (and -mm2) on the HP rx2600 and an Intel Tiger (both ia64 boxes).

I haven't investigated this other than to determine that it does not occur with 2.6.21-rc3 or 2.6.20-rc3-mm1, and the instruction at move_freepages+0x10 is a load of the value pointed to by the third argument (end_page).

Linux version 2.6.21-rc3-mm1 (helgaas@tiger) (gcc version 4.0.3 (Debian 4.0.3-1)) #2 SMP Tue Mar 13 16:16:22 MST 2007
...
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator,Target}
scsi0 : ioc0: LSI53C1030, FwRev=01032300h, Ports=1, MaxQ=255, IRQ=53
scsi 0:0:0:0: Direct-Access HP 36.4G ST336706LC HP04 PQ: 0 ANSI: 2
target0:0:0: Beginning Domain Validation
target0:0:0: Ending Domain Validation
target0:0:0: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)

Unable to handle kernel paging request at virtual address a0007fffc7580000
swapper[1]: Oops 8813272891392 [1]
Modules linked in:

Pid: 1, CPU 1, comm: swapper
psr : 00001010085a2010 ifs : 800000000000040b ip : [<a0000001000fe5d0>] Not
tainted
ip is at move_freepages+0x10/0x340
unat: 0000000000000000 pfs : 000000000000030a rsc : 0000000000000003
rnat: 0000000000000000 bsps: 0000000000000000 pr : 000000000000a581
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a74433f csd : 0000000000000000 ssd : 0000000000000000
b0 : a0000001000fea10 b6 : a0000001005ad980 b7 : a00000010000bb20 f6 : 1003e0000000000000000 f7 : 1003ed37a6f4de9bd37a7 f8 : 1003e0000000000000000 f9 : 1003e0000000194a0cb8b f10 : 1003e70658ddf530a940d f11 : 1003e0000000000000000 r1 : a000000100dfe280 r2 : 0000000000000000 r3 : 0000000000000000 r8 : 0000000000000000 r9 : 0000000000004000 r10 : ffffffffffff0000 r11 : 0000000000020000 r12 : e00000406004fc10 r13 : e000004060048000 r14 : 0000000000010000 r15 : 000000000001c000 r16 : 0000000000040000 r17 : 0000000000000400 r18 : a0007fffc7200000 r19 : 0000000000004000 r20 : ffffffffffff4000 r21 : 00002fffffff4000 r22 : ffffd00000000000 r23 : 000000005fff4000 r24 : 00002fffa0000000 r25 : 0000000063180000 r26 : 000000000318c000 r27 : 0000000000c5c000 r28 : 00000000000c4000 r29 : 0000000000080000 r30 : 000000000003fc00 r31 : 00000000000e0000

Call Trace:
 [<a000000100014840>] show_stack+0x40/0xa0
                                sp=e00000406004f7c0 bsp=e0000040600496f8
 [<a000000100015120>] show_regs+0x880/0x8a0
                                sp=e00000406004f990 bsp=e0000040600496a0
 [<a0000001000387c0>] die+0x1c0/0x2c0
                                sp=e00000406004f990 bsp=e000004060049658
 [<a00000010005e1e0>] ia64_do_page_fault+0x820/0x9c0
                                sp=e00000406004f9b0 bsp=e000004060049608
 [<a00000010000c320>] ia64_leave_kernel+0x0/0x270
                                sp=e00000406004fa40 bsp=e000004060049608
 [<a0000001000fe5d0>] move_freepages+0x10/0x340
                                sp=e00000406004fc10 bsp=e0000040600495a8
 [<a0000001000fea10>] move_freepages_block+0x110/0x140
                                sp=e00000406004fc10 bsp=e000004060049578
 [<a0000001000fef20>] __rmqueue+0x4e0/0x7e0
                                sp=e00000406004fc10 bsp=e000004060049518
 [<a0000001000ff270>] rmqueue_bulk+0x50/0x120
                                sp=e00000406004fc10 bsp=e0000040600494d0
 [<a0000001000ff7a0>] get_page_from_freelist+0x460/0xd40
                                sp=e00000406004fc10 bsp=e000004060049420
 [<a0000001001016e0>] __alloc_pages+0xa0/0x580
                                sp=e00000406004fc10 bsp=e0000040600493a8
 [<a000000100147df0>] kmem_getpages+0x150/0x3a0
                                sp=e00000406004fc20 bsp=e000004060049370
 [<a00000010014b200>] cache_grow+0x1e0/0x640
                                sp=e00000406004fc30 bsp=e000004060049308
 [<a00000010014baf0>] cache_alloc_refill+0x490/0x580
                                sp=e00000406004fc30 bsp=e0000040600492a0
 [<a00000010014ca80>] kmem_cache_alloc+0x120/0x1e0
                                sp=e00000406004fc30 bsp=e000004060049270
 [<a0000001005af6f0>] sd_revalidate_disk+0x90/0x1c20
                                sp=e00000406004fc30 bsp=e0000040600491f0
 [<a0000001005b1d20>] sd_probe+0x6c0/0x7c0
                                sp=e00000406004fc70 bsp=e000004060049198
 [<a0000001004c3650>] driver_probe_device+0x230/0x360
                                sp=e00000406004fc80 bsp=e000004060049160
 [<a0000001004c37b0>] __device_attach+0x30/0x60
                                sp=e00000406004fc80 bsp=e000004060049138
 [<a0000001004c1480>] bus_for_each_drv+0x80/0x120
                                sp=e00000406004fc80 bsp=e000004060049100
 [<a0000001004c3f50>] device_attach+0x190/0x200
                                sp=e00000406004fca0 bsp=e0000040600490c8
 [<a0000001004c1660>] bus_attach_device+0x80/0x160
                                sp=e00000406004fca0 bsp=e000004060049090
 [<a0000001004be7e0>] device_add+0x940/0xf60
                                sp=e00000406004fca0 bsp=e000004060049028
 [<a00000010057daa0>] scsi_sysfs_add_sdev+0x60/0x520
                                sp=e00000406004fca0 bsp=e000004060048fd8
 [<a000000100578e20>] scsi_probe_and_add_lun+0x1000/0x1200
                                sp=e00000406004fca0 bsp=e000004060048f68
 [<a000000100579bf0>] __scsi_scan_target+0x150/0xae0
                                sp=e00000406004fcd0 bsp=e000004060048f10
 [<a00000010057a5e0>] scsi_scan_channel+0x60/0xe0
                                sp=e00000406004fd30 bsp=e000004060048ed0
 [<a00000010057a790>] scsi_scan_host_selected+0x130/0x200
                                sp=e00000406004fd30 bsp=e000004060048e88
 [<a00000010057a9d0>] do_scsi_scan_host+0x170/0x1a0
                                sp=e00000406004fd30 bsp=e000004060048e60
 [<a00000010057acd0>] scsi_scan_host+0x2d0/0x320
                                sp=e00000406004fd30 bsp=e000004060048e18
 [<a0000001005ca2c0>] mptspi_probe+0x680/0x6e0
                                sp=e00000406004fd30 bsp=e000004060048dc8
 [<a0000001003fdd10>] pci_device_probe+0x270/0x3a0
                                sp=e00000406004fd30 bsp=e000004060048d88
 [<a0000001004c3650>] driver_probe_device+0x230/0x360
                                sp=e00000406004fd80 bsp=e000004060048d50
 [<a0000001004c3a40>] __driver_attach+0x100/0x1a0
                                sp=e00000406004fd80 bsp=e000004060048d20
 [<a0000001004c1260>] bus_for_each_dev+0x80/0x100
                                sp=e00000406004fd80 bsp=e000004060048ce8
 [<a0000001004c3060>] driver_attach+0x40/0x60
                                sp=e00000406004fda0 bsp=e000004060048cc8
 [<a0000001004c2130>] bus_add_driver+0xf0/0x3a0
                                sp=e00000406004fda0 bsp=e000004060048c88
 [<a0000001004c4540>] driver_register+0x160/0x180
                                sp=e00000406004fda0 bsp=e000004060048c68
 [<a0000001003fce80>] __pci_register_driver+0xc0/0x140
                                sp=e00000406004fda0 bsp=e000004060048c30
 [<a00000010090c840>] mptspi_init+0x180/0x1c0
                                sp=e00000406004fdb0 bsp=e000004060048c10
 [<a0000001008d5580>] init+0x420/0x6c0
                                sp=e00000406004fdb0 bsp=e000004060048bd8
 [<a0000001000134d0>] kernel_thread_helper+0xd0/0x100
                                sp=e00000406004fe30 bsp=e000004060048bb0
 [<a0000001000094c0>] start_kernel_thread+0x20/0x40
                                sp=e00000406004fe30 bsp=e000004060048bb0
#13 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

On (13/03/07 21:52), Bjorn Helgaas didst pronounce:

Quoted 8 lines

FYI, I'm seeing the following oops with 2.6.21-rc3-mm1 (and -mm2) on the HP rx2600 and an Intel Tiger (both ia64 boxes).

I haven't investigated this other than to determine that it does not occur with 2.6.21-rc3 or 2.6.20-rc3-mm1, and the instruction at move_freepages+0x10 is a load of the value pointed to by the third argument (end_page).

Please try the following patch from Yasunori Goto.

Quoted 1 line

From [email protected] Thu Mar 8 08:00:15 2007

Date: Thu, 08 Mar 2007 16:39:43 +0900
From: Yasunori Goto <[email protected]>
To: Andrew Morton <[email protected]>
Cc: [email protected], Mel Gorman <[email protected]>
Subject: [PATCH] fix BUG_ON check at move_freepages() (Re: 2.6.21-rc3-mm2)

Hello.

The BUG_ON() check at move_freepages() is wrong.
Its end_page is start_page + MAX_ORDER_NR_PAGES. So, it can be next zone. BUG_ON() should check "end_page - 1".

This is fix of 2.6.21-rc3-mm2 for it.

---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
Index: current_test/mm/page_alloc.c
===================================================================
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
-	BUG_ON(page_zone(start_page) != page_zone(end_page));
+	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
 
 	for (page = start_page; page < end_page;) {
 		if (!PageBuddy(page)) {
#14 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

mm/page_alloc.c int move_freepages(struct zone *zone, · line 711

Quoted 11 lines · Mel Gorman

Please try the following patch from Yasunori Goto.
...

mm/page_alloc.c +1 -1
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
-	BUG_ON(page_zone(start_page) != page_zone(end_page));
+	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
 

I should have mentioned that I already tried this patch. The oops still occurs, although now it's when loading the value pointed to by "end_page - 1" instead of "end_page".

#15 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

On (14/03/07 09:11), Bjorn Helgaas didst pronounce:

Quoted 9 lines · Mel Gorman
Quoted 8 lines

Please try the following patch from Yasunori Goto.
...

mm/page_alloc.c +0 -0
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
Quoted 7 lines

mm/page_alloc.c int move_freepages(struct zone *zone, · line 711

Quoted 3 lines
mm/page_alloc.c +1 -1
-	BUG_ON(page_zone(start_page) != page_zone(end_page));
+	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
 

I should have mentioned that I already tried this patch. The oops still occurs, although now it's when loading the value pointed to by "end_page - 1" instead of "end_page".

Ok. This looks like another case of HOLES_IN_ZONE hilarity with page_zone(). As I take a new look at the BUG_ON check in move_freepages(), it isn't even necessary as move_freepages_block() already checks the zone boundaries. At a later date when the code has survived a while without new bug reports, I'll submit a patch that simply deletes this check because it should be redundant. Just in case, I'd like to preserve the check in the non-HOLES_IN_ZONE case for now.

Can you try this patch please? It should apply on top of Yasunori Goto's patch.

mm/page_alloc.c +8 -0
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-rc3-mm2-goto/mm/page_alloc.c linux-2.6.21-rc3-mm2-bjorn_testfix/mm/page_alloc.c
@@ -707,7 +707,15 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
+#ifndef CONFIG_HOLES_IN_ZONE
+	/*
+	 * page_zone is not safe to call in this context when
+	 * CONFIG_HOLES_IN_ZONE is set but this bug check is
+	 * redundant anyway as we check zone boundaries in
+	 * move_freepages_block()
+	 */
 	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
+#endif
 
 	for (page = start_page; page < end_page;) {
 		if (!PageBuddy(page)) {
#16 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

Quoted 12 lines · Mel Gorman

Ok. This looks like another case of HOLES_IN_ZONE hilarity with page_zone(). As I take a new look at the BUG_ON check in move_freepages(), it isn't even necessary as move_freepages_block() already checks the zone boundaries. At a later date when the code has survived a while without new bug reports, I'll submit a patch that simply deletes this check because it should be redundant. Just in case, I'd like to preserve the check in the non-HOLES_IN_ZONE case for now.

Can you try this patch please? It should apply on top of Yasunori Goto's patch.
...

Review

Quoted 9 lines
(quoted diff) +8 -0
+#ifndef CONFIG_HOLES_IN_ZONE
+	/*
+	 * page_zone is not safe to call in this context when
+	 * CONFIG_HOLES_IN_ZONE is set but this bug check is
+	 * redundant anyway as we check zone boundaries in
+	 * move_freepages_block()
+	 */
 	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
+#endif

Your patch applied fine, but I'm sorry to say it still doesn't work. I added this patch on top of yours:

mm/page_alloc.c 2007-03-14 09:42:31.000000000 -0700 renamed from mm/page_alloc.c 2007-03-14 09:34:42.000000000 -0700 +4 -0
@@ -707,6 +707,10 @@
        unsigned long order;
        int blocks_moved = 0;
 
+       printk("%s: zone %s zone_start_pfn 0x%lx start_page 0x%p end_page 0x%p\n",
+               __FUNCTION__, zone->name, zone->zone_start_pfn, start_page,
+               end_page);
+
 #ifndef CONFIG_HOLES_IN_ZONE
        /*
         * page_zone is not safe to call in this context when

and it crashed like this. Let me know if I can collect more information for you.

Linux version 2.6.21-rc3-mm2 (helgaas@tiger) (gcc version 4.0.3 (Debian 4.0.3-1)) #7 SMP Wed Mar 14 09:42:50 MST 2007 EFI v1.10 by HP: SALsystab=0x3fb38000 ACPI 2.0=0x3fb2e000 SMBIOS=0x3fb3a000 HCDP=0x3fb2c000 booting generic kernel on platform hpzx1
PCDP: v0 at 0x3fb2c000
Explicit "console="; ignoring PCDP
Early serial console at MMIO 0xff5e0000 (options '115200')
ACPI: RSDP 3FB2E000, 0028 (r2 HP)
ACPI: XSDT 3FB2E02C, 0094 (r1 HP zx6000 0 HP 0)
ACPI: FACP 3FB36800, 00F4 (r3 HP zx6000 0 HP 0)
ACPI: DSDT 3FB2E0E0, 5781 (r1 HP zx6000 7 INTL 2012044)
ACPI: FACS 3FB368F8, 0040
ACPI: SPCR 3FB36938, 0050 (r1 HP zx6000 0 HP 0)
ACPI: DBGP 3FB36988, 0034 (r1 HP zx6000 0 HP 0)
ACPI: APIC 3FB36A48, 00B0 (r1 HP zx6000 0 HP 0)
ACPI: SPMI 3FB369C0, 0050 (r4 HP zx6000 0 HP 0)
ACPI: CPEP 3FB36A10, 0034 (r1 HP zx6000 0 HP 0)
ACPI: SSDT 3FB33870, 01D6 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB33A50, 0342 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB33DA0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB347C0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB351E0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB35C00, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB36620, 00EB (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB36710, 00EF (r1 HP zx6000 6 INTL 2012044)
SAL 3.1: HP version 2.31
SAL Platform features: None
SAL: AP wakeup using external interrupt vector 0xff
No logical to physical processor mapping available
ACPI: Local APIC address c0000000fee00000
GSI 36 (level, low) -> CPU 0 (0x0000) vector 48
2 CPUs available, 2 CPUs total
MCA related initialization done
Virtual mem_map starts at 0xa0007fffc7200000
Zone PFN ranges:
DMA 1024 -> 262144
Normal 262144 -> 17039360
Movable zone start PFN for each node
early_node_map[5] active PFN ranges

    0:     1024 ->    64889
    0:    65216 ->    65227
    0: 16842752 -> 17039194
    0: 17039209 -> 17039236
    0: 17039264 -> 17039343

SMP: Allowing 2 CPUs, 0 hotplug CPUs
Built 1 zonelists. Total pages: 202189
Kernel command line: BOOT_IMAGE=net0:/helgaas/ia64/vmlinux.gz root=/dev/sda2 console=uart,mmio,0xff5e0000 debug ro PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=200.000MHz, ITC ratio=9/2, ITC freq=900.000MHz+/-450ppm
Console: colour VGA+ 80x25
Memory: 4070112k/4150976k available (7303k code, 96672k reserved, 5072k data, 1856k init)
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff900000 end_page 0xa0007fffffc80000 Leaving McKinley Errata 9 workaround enabled
Calibrating delay loop... 1347.58 BogoMIPS (lpj=2695168)
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff900000 end_page 0xa0007fffffc80000
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff580000 end_page 0xa0007fffff900000
ACPI: Core revision 20070126
Boot processor id 0x0/0x0
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -4 cycles, maxerr 435 cycles)
CPU 1: base freq=200.000MHz, ITC ratio=9/2, ITC freq=900.000MHz+/-450ppm
Calibrating delay loop... 1347.58 BogoMIPS (lpj=2695168)
Brought up 2 CPUs
Total of 2 processors activated (2695.16 BogoMIPS).
migration_cost=1878
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Firmware left 0000:00:03.0 e100 interrupts enabled, disabling
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI0._PRT]
ACPI: PCI Root Bridge [PCI1] (0000:20)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI1._PRT]
ACPI: PCI Root Bridge [PCI2] (0000:40)
Boot video device is 0000:41:05.0
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI2._PRT]
ACPI: PCI Root Bridge [PCI3] (0000:60)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI3._PRT]
ACPI: PCI Root Bridge [PCI4] (0000:80)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI4._PRT]
ACPI: PCI Root Bridge [PCI6] (0000:c0)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI6._PRT]
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
GSI 34 (edge, high) -> CPU 1 (0x0100) vector 49
GSI 35 (edge, high) -> CPU 0 (0x0000) vector 50
pnp: PnP ACPI: found 10 devices
SCSI subsystem initialized
IOC: zx1 2.2 HPA 0xfed01000 IOVA space 1024Mb at 0x40000000
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 6, 1048576 bytes)
TCP established hash table entries: 524288 (order: 9, 12582912 bytes)
TCP bind hash table entries: 65536 (order: 6, 1048576 bytes)
TCP: Hash tables configured (established 524288 bind 65536)
TCP reno registered
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_format
perfmon_default_smpl: default_format v2.0 registered
Total HugeTLB memory allocated, 0
SGI XFS with large block/inode numbers, no debug enabled
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
EFI Time Services Driver v0.4
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:04: ttyS0 at MMIO 0xff5e0000 (irq = 49) is a 16550A
00:05: ttyS1 at MMIO 0xff5e2000 (irq = 50) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2
Copyright (c) 1999-2006 Intel Corporation.
tg3.c:v3.74 (February 20, 2007)
GSI 29 (level, low) -> CPU 1 (0x0100) vector 51
ACPI: PCI Interrupt 0000:20:02.0[A] -> GSI 29 (level, low) -> IRQ 51
eth0: Tigon3 [partno(BCM95700A6) rev 0105 PHY(5701)] (PCI:66MHz:64-bit) 10/100/1000Base-T Ethernet 00:30:6e:38:d9:67
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[1] TSOcap[0]
eth0: dma_rwctrl[76ff2d0f] dma_mask[64-bit]
netconsole: not configured, aborting
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD649: IDE controller at PCI slot 0000:00:02.0
GSI 21 (level, low) -> CPU 0 (0x0000) vector 52
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 21 (level, low) -> IRQ 52
CMD649: chipset revision 2
CMD649: 100% native mode on irq 52

    ide0: BM-DMA at 0x0d40-0x0d47, BIOS settings: hda:pio, hdb:pio

Probing IDE interface ide0...
hda: DW-28E, ATAPI CD/DVD-ROM drive
hda: selected mode 0x42
ide0 at 0xd58-0xd5f,0xd66 on irq 52
hda: ATAPI 24X DVD-ROM CD-R/RW drive, 1698kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
Fusion MPT base driver 3.04.04
Copyright (c) 1999-2007 LSI Logic Corporation
Fusion MPT SPI Host driver 3.04.04
GSI 27 (level, low) -> CPU 1 (0x0100) vector 53
ACPI: PCI Interrupt 0000:20:01.0[A] -> GSI 27 (level, low) -> IRQ 53
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator,Target}
scsi0 : ioc0: LSI53C1030, FwRev=01032300h, Ports=1, MaxQ=255, IRQ=53
scsi 0:0:0:0: Direct-Access HP 36.4G ST336706LC HP04 PQ: 0 ANSI: 2
target0:0:0: Beginning Domain Validation
target0:0:0: Ending Domain Validation
target0:0:0: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
move_freepages: zone DMA zone_start_pfn 0x400 start_page 0xa0007fffc72e0000 end_page 0xa0007fffc7580000

Unable to handle kernel paging request at virtual address a0007fffc757c020
swapper[1]: Oops 11012296146944 [1]
Modules linked in:

Pid: 1, CPU 1, comm: swapper
psr : 00001210084a2010 ifs : 800000000000040e ip : [<a0000001000fe521>] Not tainted
ip is at move_freepages+0x81/0x2c0
unat: 0000000000000000 pfs : 000000000000040e rsc : 0000000000000003
rnat: 0000000000000000 bsps: 0000000000000000 pr : 0000000000005981
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a74433f csd : 0000000000000000 ssd : 0000000000000000
b0 : a0000001000fe640 b6 : a0000001003f0500 b7 : a00000010000bb20 f6 : 0fffafffffffff0000000 f7 : 0ffdea000000000000000 f8 : 10002a000000000000000 f9 : 100038000000000000000 f10 : 0fffe9ffffffff6000000 f11 : 1003e0000000000000000 r1 : a000000100dfe280 r2 : 0000000000000000 r3 : e000000003101050 r8 : 0000000000000000 r9 : e000000003101070 r10 : e000000003100000 r11 : a0007fffc720e060 r12 : e00000406004fc10 r13 : e000004060048000 r14 : a0007fffc7577268 r15 : e000000003101050 r16 : a0007fffc720e068 r17 : 0000000000000001 r18 : 0000000000100100 r19 : a0007fffc757bc58 r20 : a0007fffc757bc60 r21 : 0000000000000000 r22 : 0000000000000000 r23 : 000000000030c4aa r24 : 000000000037bc30 r25 : 000000000037bc30 r26 : a0007fffc7200000 r27 : a000000100c16850 r28 : a000000100c16850 r29 : a000000100c16528 r30 : a000000100c16528 r31 : 0000000001040000

Call Trace:
 [<a000000100014980>] show_stack+0x40/0xa0
                                sp=e00000406004f7c0 bsp=e000004060049700
 [<a000000100015260>] show_regs+0x880/0x8a0
                                sp=e00000406004f990 bsp=e0000040600496a8
 [<a000000100038900>] die+0x1c0/0x2c0
                                sp=e00000406004f990 bsp=e000004060049660
 [<a00000010005e320>] ia64_do_page_fault+0x820/0x9c0
                                sp=e00000406004f9b0 bsp=e000004060049610
 [<a00000010000c320>] ia64_leave_kernel+0x0/0x270
                                sp=e00000406004fa40 bsp=e000004060049610
 [<a0000001000fe520>] move_freepages+0x80/0x2c0
                                sp=e00000406004fc10 bsp=e000004060049598
 [<a0000001000fe870>] move_freepages_block+0x110/0x140
                                sp=e00000406004fc10 bsp=e000004060049568
 [<a0000001000fed80>] __rmqueue+0x4e0/0x7e0
                                sp=e00000406004fc10 bsp=e000004060049508
 [<a0000001000ff0d0>] rmqueue_bulk+0x50/0x120
                                sp=e00000406004fc10 bsp=e0000040600494c0
 [<a0000001000ff600>] get_page_from_freelist+0x460/0xd40
                                sp=e00000406004fc10 bsp=e000004060049410
 [<a000000100101540>] __alloc_pages+0xa0/0x580
                                sp=e00000406004fc10 bsp=e000004060049398
 [<a000000100147c50>] kmem_getpages+0x150/0x3a0
                                sp=e00000406004fc20 bsp=e000004060049360
 [<a00000010014b060>] cache_grow+0x1e0/0x640
                                sp=e00000406004fc30 bsp=e0000040600492f8
 [<a00000010014b950>] cache_alloc_refill+0x490/0x580
                                sp=e00000406004fc30 bsp=e000004060049290
 [<a00000010014c8e0>] kmem_cache_alloc+0x120/0x1e0
                                sp=e00000406004fc30 bsp=e000004060049260
 [<a0000001005af5b0>] sd_revalidate_disk+0x90/0x1c20
                                sp=e00000406004fc30 bsp=e0000040600491e0
 [<a0000001005b1be0>] sd_probe+0x6c0/0x7c0
                                sp=e00000406004fc70 bsp=e000004060049188
 [<a0000001004c3510>] driver_probe_device+0x230/0x360
                                sp=e00000406004fc80 bsp=e000004060049150
 [<a0000001004c3670>] __device_attach+0x30/0x60
                                sp=e00000406004fc80 bsp=e000004060049128
 [<a0000001004c1340>] bus_for_each_drv+0x80/0x120
                                sp=e00000406004fc80 bsp=e0000040600490f0
 [<a0000001004c3e10>] device_attach+0x190/0x200
                                sp=e00000406004fca0 bsp=e0000040600490b8
 [<a0000001004c1520>] bus_attach_device+0x80/0x160
                                sp=e00000406004fca0 bsp=e000004060049080
 [<a0000001004be6a0>] device_add+0x940/0xf60
                                sp=e00000406004fca0 bsp=e000004060049018
 [<a00000010057d960>] scsi_sysfs_add_sdev+0x60/0x520
                                sp=e00000406004fca0 bsp=e000004060048fc8
 [<a000000100578ce0>] scsi_probe_and_add_lun+0x1000/0x1200
                                sp=e00000406004fca0 bsp=e000004060048f58
 [<a000000100579ab0>] __scsi_scan_target+0x150/0xae0
                                sp=e00000406004fcd0 bsp=e000004060048f00
 [<a00000010057a4a0>] scsi_scan_channel+0x60/0xe0
                                sp=e00000406004fd30 bsp=e000004060048ec0
 [<a00000010057a650>] scsi_scan_host_selected+0x130/0x200
                                sp=e00000406004fd30 bsp=e000004060048e78
 [<a00000010057a890>] do_scsi_scan_host+0x170/0x1a0
                                sp=e00000406004fd30 bsp=e000004060048e50
 [<a00000010057ab90>] scsi_scan_host+0x2d0/0x320
                                sp=e00000406004fd30 bsp=e000004060048e08
 [<a0000001005ca180>] mptspi_probe+0x680/0x6e0
                                sp=e00000406004fd30 bsp=e000004060048db8
 [<a0000001003fdbd0>] pci_device_probe+0x270/0x3a0
                                sp=e00000406004fd30 bsp=e000004060048d78
 [<a0000001004c3510>] driver_probe_device+0x230/0x360
                                sp=e00000406004fd80 bsp=e000004060048d40
 [<a0000001004c3900>] __driver_attach+0x100/0x1a0
                                sp=e00000406004fd80 bsp=e000004060048d10
 [<a0000001004c1120>] bus_for_each_dev+0x80/0x100
                                sp=e00000406004fd80 bsp=e000004060048cd8
 [<a0000001004c2f20>] driver_attach+0x40/0x60
                                sp=e00000406004fda0 bsp=e000004060048cb8
 [<a0000001004c1ff0>] bus_add_driver+0xf0/0x3a0
                                sp=e00000406004fda0 bsp=e000004060048c78
 [<a0000001004c4400>] driver_register+0x160/0x180
                                sp=e00000406004fda0 bsp=e000004060048c58
 [<a0000001003fcd40>] __pci_register_driver+0xc0/0x140
                                sp=e00000406004fda0 bsp=e000004060048c20
 [<a00000010090c800>] mptspi_init+0x180/0x1c0
                                sp=e00000406004fdb0 bsp=e000004060048c00
 [<a0000001008d5580>] init+0x420/0x6c0
                                sp=e00000406004fdb0 bsp=e000004060048bc8
 [<a000000100013610>] kernel_thread_helper+0xd0/0x100
                                sp=e00000406004fe30 bsp=e000004060048ba0
 [<a0000001000094c0>] start_kernel_thread+0x20/0x40
                                sp=e00000406004fe30 bsp=e000004060048ba0
Kernel panic - not syncing: Attempted to kill init!
#17 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

On (14/03/07 10:52), Bjorn Helgaas didst pronounce:

Quoted 40 lines · Mel Gorman
Quoted 12 lines

Ok. This looks like another case of HOLES_IN_ZONE hilarity with page_zone(). As I take a new look at the BUG_ON check in move_freepages(), it isn't even necessary as move_freepages_block() already checks the zone boundaries. At a later date when the code has survived a while without new bug reports, I'll submit a patch that simply deletes this check because it should be redundant. Just in case, I'd like to preserve the check in the non-HOLES_IN_ZONE case for now.

Can you try this patch please? It should apply on top of Yasunori Goto's patch.
...

Review

Quoted 9 lines
(quoted diff) +8 -0
+#ifndef CONFIG_HOLES_IN_ZONE
+	/*
+	 * page_zone is not safe to call in this context when
+	 * CONFIG_HOLES_IN_ZONE is set but this bug check is
+	 * redundant anyway as we check zone boundaries in
+	 * move_freepages_block()
+	 */
 	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
+#endif

Your patch applied fine, but I'm sorry to say it still doesn't work. I added this patch on top of yours:

mm/page_alloc.c 2007-03-14 09:42:31.000000000 -0700 renamed from mm/page_alloc.c 2007-03-14 09:34:42.000000000 -0700 +4 -0
@@ -707,6 +707,10 @@
        unsigned long order;
        int blocks_moved = 0;
 
+       printk("%s: zone %s zone_start_pfn 0x%lx start_page 0x%p end_page 0x%p\n",
+               __FUNCTION__, zone->name, zone->zone_start_pfn, start_page,
+               end_page);
+
 #ifndef CONFIG_HOLES_IN_ZONE
        /*
         * page_zone is not safe to call in this context when
Quoted 2 lines

and it crashed like this. Let me know if I can collect more information for you.

Can you tell me if the faulting line was at the check for PageBuddy? Can you also apply the following patch and boot with loglevel=8 please? The patch moves the check for pfn_valid() before PageBuddy() is called.

Thanks

mm/page_alloc.c +5 -4
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-rc3-mm2-bjorn_testfix/mm/page_alloc.c linux-2.6.21-rc3-mm2-bjorn_testfix-2/mm/page_alloc.c
@@ -718,10 +718,6 @@ int move_freepages(struct zone *zone,
 #endif
 
 	for (page = start_page; page < end_page;) {
-		if (!PageBuddy(page)) {
-			page++;
-			continue;
-		}
 #ifdef CONFIG_HOLES_IN_ZONE
 		if (!pfn_valid(page_to_pfn(page))) {
 			page++;
@@ -729,6 +725,11 @@ int move_freepages(struct zone *zone,
 		}
 #endif
 
+		if (!PageBuddy(page)) {
+			page++;
+			continue;
+		}
+
 		order = page_order(page);
 		list_del(&page->lru);
 		list_add(&page->lru,
#18 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

Quoted 1 line · Mel Gorman

Can you tell me if the faulting line was at the check for PageBuddy?

I don't know, sorry.

Quoted 3 lines

Can you
also apply the following patch and boot with loglevel=8 please? The patch moves the check for pfn_valid() before PageBuddy() is called.

Boots fine with this patch:

Linux version 2.6.21-rc3-mm2 (helgaas@tiger) (gcc version 4.0.3 (Debian 4.0.3-1)) #8 SMP Wed Mar 14 11:34:23 MST 2007 EFI v1.10 by HP: SALsystab=0x3fb38000 ACPI 2.0=0x3fb2e000 SMBIOS=0x3fb3a000 HCDP=0x3fb2c000 booting generic kernel on platform hpzx1
PCDP: v0 at 0x3fb2c000
Explicit "console="; ignoring PCDP
Early serial console at MMIO 0xff5e0000 (options '115200')
ACPI: RSDP 3FB2E000, 0028 (r2 HP)
ACPI: XSDT 3FB2E02C, 0094 (r1 HP zx6000 0 HP 0)
ACPI: FACP 3FB36800, 00F4 (r3 HP zx6000 0 HP 0)
ACPI: DSDT 3FB2E0E0, 5781 (r1 HP zx6000 7 INTL 2012044)
ACPI: FACS 3FB368F8, 0040
ACPI: SPCR 3FB36938, 0050 (r1 HP zx6000 0 HP 0)
ACPI: DBGP 3FB36988, 0034 (r1 HP zx6000 0 HP 0)
ACPI: APIC 3FB36A48, 00B0 (r1 HP zx6000 0 HP 0)
ACPI: SPMI 3FB369C0, 0050 (r4 HP zx6000 0 HP 0)
ACPI: CPEP 3FB36A10, 0034 (r1 HP zx6000 0 HP 0)
ACPI: SSDT 3FB33870, 01D6 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB33A50, 0342 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB33DA0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB347C0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB351E0, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB35C00, 0A16 (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB36620, 00EB (r1 HP zx6000 6 INTL 2012044)
ACPI: SSDT 3FB36710, 00EF (r1 HP zx6000 6 INTL 2012044)
SAL 3.1: HP version 2.31
SAL Platform features: None
SAL: AP wakeup using external interrupt vector 0xff
No logical to physical processor mapping available
ACPI: Local APIC address c0000000fee00000
GSI 36 (level, low) -> CPU 0 (0x0000) vector 48
2 CPUs available, 2 CPUs total
MCA related initialization done
Virtual mem_map starts at 0xa0007fffc7200000
Zone PFN ranges:
DMA 1024 -> 262144
Normal 262144 -> 17039360
Movable zone start PFN for each node
early_node_map[5] active PFN ranges

    0:     1024 ->    64889
    0:    65216 ->    65227
    0: 16842752 -> 17039194
    0: 17039209 -> 17039236
    0: 17039264 -> 17039343

SMP: Allowing 2 CPUs, 0 hotplug CPUs
Built 1 zonelists. Total pages: 202189
Kernel command line: BOOT_IMAGE=net0:/helgaas/ia64/vmlinux.gz root=/dev/sda2 console=uart,mmio,0xff5e0000 loglevel=8 debug ro PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=200.000MHz, ITC ratio=9/2, ITC freq=900.000MHz+/-450ppm
Console: colour VGA+ 80x25
Memory: 4070112k/4150976k available (7303k code, 96672k reserved, 5072k data, 1856k init)
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff900000 end_page 0xa0007fffffc80000 Leaving McKinley Errata 9 workaround enabled
Calibrating delay loop... 1347.58 BogoMIPS (lpj=2695168)
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff900000 end_page 0xa0007fffffc80000
move_freepages: zone Normal zone_start_pfn 0x40000 start_page 0xa0007fffff580000 end_page 0xa0007fffff900000
ACPI: Core revision 20070126
Boot processor id 0x0/0x0
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -4 cycles, maxerr 435 cycles)
CPU 1: base freq=200.000MHz, ITC ratio=9/2, ITC freq=900.000MHz+/-450ppm
Calibrating delay loop... 1347.58 BogoMIPS (lpj=2695168)
Brought up 2 CPUs
Total of 2 processors activated (2695.16 BogoMIPS).
migration_cost=1877
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Firmware left 0000:00:03.0 e100 interrupts enabled, disabling
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI0._PRT]
ACPI: PCI Root Bridge [PCI1] (0000:20)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI1._PRT]
ACPI: PCI Root Bridge [PCI2] (0000:40)
Boot video device is 0000:41:05.0
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI2._PRT]
ACPI: PCI Root Bridge [PCI3] (0000:60)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI3._PRT]
ACPI: PCI Root Bridge [PCI4] (0000:80)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI4._PRT]
ACPI: PCI Root Bridge [PCI6] (0000:c0)
ACPI: PCI Interrupt Routing Table [\_SB_.SBA0.PCI6._PRT]
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
GSI 34 (edge, high) -> CPU 1 (0x0100) vector 49
GSI 35 (edge, high) -> CPU 0 (0x0000) vector 50
pnp: PnP ACPI: found 10 devices
SCSI subsystem initialized
IOC: zx1 2.2 HPA 0xfed01000 IOVA space 1024Mb at 0x40000000
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 6, 1048576 bytes)
TCP established hash table entries: 524288 (order: 9, 12582912 bytes)
TCP bind hash table entries: 65536 (order: 6, 1048576 bytes)
TCP: Hash tables configured (established 524288 bind 65536)
TCP reno registered
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_format
perfmon_default_smpl: default_format v2.0 registered
Total HugeTLB memory allocated, 0
SGI XFS with large block/inode numbers, no debug enabled
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
EFI Time Services Driver v0.4
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:04: ttyS0 at MMIO 0xff5e0000 (irq = 49) is a 16550A
00:05: ttyS1 at MMIO 0xff5e2000 (irq = 50) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2
Copyright (c) 1999-2006 Intel Corporation.
tg3.c:v3.74 (February 20, 2007)
GSI 29 (level, low) -> CPU 1 (0x0100) vector 51
ACPI: PCI Interrupt 0000:20:02.0[A] -> GSI 29 (level, low) -> IRQ 51
eth0: Tigon3 [partno(BCM95700A6) rev 0105 PHY(5701)] (PCI:66MHz:64-bit) 10/100/1000Base-T Ethernet 00:30:6e:38:d9:67
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[1] TSOcap[0]
eth0: dma_rwctrl[76ff2d0f] dma_mask[64-bit]
netconsole: not configured, aborting
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD649: IDE controller at PCI slot 0000:00:02.0
GSI 21 (level, low) -> CPU 0 (0x0000) vector 52
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 21 (level, low) -> IRQ 52
CMD649: chipset revision 2
CMD649: 100% native mode on irq 52

    ide0: BM-DMA at 0x0d40-0x0d47, BIOS settings: hda:pio, hdb:pio

Probing IDE interface ide0...
hda: DW-28E, ATAPI CD/DVD-ROM drive
hda: selected mode 0x42
ide0 at 0xd58-0xd5f,0xd66 on irq 52
hda: ATAPI 24X DVD-ROM CD-R/RW drive, 1698kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
Fusion MPT base driver 3.04.04
Copyright (c) 1999-2007 LSI Logic Corporation
Fusion MPT SPI Host driver 3.04.04
GSI 27 (level, low) -> CPU 1 (0x0100) vector 53
ACPI: PCI Interrupt 0000:20:01.0[A] -> GSI 27 (level, low) -> IRQ 53
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator,Target}
scsi0 : ioc0: LSI53C1030, FwRev=01032300h, Ports=1, MaxQ=255, IRQ=53
scsi 0:0:0:0: Direct-Access HP 36.4G ST336706LC HP04 PQ: 0 ANSI: 2
target0:0:0: Beginning Domain Validation
target0:0:0: Ending Domain Validation
target0:0:0: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
move_freepages: zone DMA zone_start_pfn 0x400 start_page 0xa0007fffc72e0000 end_page 0xa0007fffc7580000 SCSI device sda: 71132960 512-byte hdwr sectors (36420 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: write cache: disabled, read cache: enabled, supports DPO and FUA
SCSI device sda: 71132960 512-byte hdwr sectors (36420 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: write cache: disabled, read cache: enabled, supports DPO and FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
scsi 0:0:1:0: Direct-Access HP 36.4G ST336706LC HP04 PQ: 0 ANSI: 2
target0:0:1: Beginning Domain Validation
target0:0:1: Ending Domain Validation
target0:0:1: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
SCSI device sdb: 71132960 512-byte hdwr sectors (36420 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: write cache: disabled, read cache: enabled, supports DPO and FUA
SCSI device sdb: 71132960 512-byte hdwr sectors (36420 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: write cache: disabled, read cache: enabled, supports DPO and FUA
sdb: sdb1 sdb2 sdb3
sd 0:0:1:0: Attached scsi disk sdb
GSI 28 (level, low) -> CPU 0 (0x0000) vector 54
ACPI: PCI Interrupt 0000:20:01.1[B] -> GSI 28 (level, low) -> IRQ 54
mptbase: Initiating ioc1 bringup
ioc1: 53C1030: Capabilities={Initiator,Target}
scsi1 : ioc1: LSI53C1030, FwRev=01032300h, Ports=1, MaxQ=255, IRQ=54
scsi 1:0:2:0: Direct-Access HP 36.4G ST336732LC HPE3 PQ: 0 ANSI: 2
target1:0:2: Beginning Domain Validation
target1:0:2: Ending Domain Validation
target1:0:2: FAST-160 WIDE SCSI 320.0 MB/s DT IU QAS RTI WRFLOW PCOMP (6.25 ns, offset 63)
SCSI device sdc: 71132960 512-byte hdwr sectors (36420 MB)
sdc: Write Protect is off
sdc: Mode Sense: ab 00 10 08
SCSI device sdc: write cache: disabled, read cache: enabled, supports DPO and FUA
SCSI device sdc: 71132960 512-byte hdwr sectors (36420 MB)
sdc: Write Protect is off
sdc: Mode Sense: ab 00 10 08
SCSI device sdc: write cache: disabled, read cache: enabled, supports DPO and FUA
sdc: sdc1
sd 1:0:2:0: Attached scsi disk sdc
mice: PS/2 mouse device common for all mice
async_tx: api initialized (sync-only)
xor: measuring software checksumming speed
ia64 : 2552.000 MB/sec
xor: using function: ia64 (2552.000 MB/sec)
EFI Variables Facility v0.08 2004-May-17
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Adding console on ttyS0 at MMIO 0xff5e0000 (options '115200')
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 1856kB freed
Failed to mount /selinux/: No such file or directory
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...
Adding 1473632k swap on /dev/sda3. Priority:-1 extents:1 across:1473632k
.
Checking root file system.../: clean, 63130/4251520 files, 647612/8498779 blocks
.
EXT3 FS on sda2, internal journal
Cleaning up ifupdown...done.
* Not running depmod because /lib/modules/2.6.21-rc3-mm2/ is not writeable. Loading modules...
psmouse
FATAL: Could not load /lib/modules/2.6.21-rc3-mm2/modules.dep: No such file or directory
sd_mod
FATAL: Could not load /lib/modules/2.6.21-rc3-mm2/modules.dep: No such file or directory All modules loaded.
FATAL: Could not load /lib/modules/2.6.21-rc3-mm2/modules.dep: No such file or directory Setting the System Clock using the Hardware Clock as reference
System Clock set. Local time: Wed Mar 14 18:59:39 UTC 2007
.
Checking all file systems....
Setting kernel variables ...
... done.
Mounting local filesystems... failed!
Cleaning /tmp....
Cleaning /var/run ....
Cleaning /var/lock ....
Detecting hardware...Discovered hardware for these modules: e100 tg3 cmd64x mptscsih usb_ohci ehci_hcd * Skipping unavailable/built-in e100 module.
* Skipping unavailable/built-in tg3 module.
* Skipping unavailable/built-in cmd64x module.
* Skipping unavailable/built-in mptscsih module.
* Skipping unavailable/built-in ohci_hcd module.
* Skipping unavailable/built-in ehci_hcd module.
Setting up networking...done.
hostname: the specified hostname is invalid
* /etc/network/options is deprecated.
Setting up IP spoofing protection...done (rp_filter).
Configuring network interfaces...Internet Software Consortium DHCP Client 2.0pl5 Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful. For info, please visit http://www.isc.org/dhcp-contrib.html

PM: Writing back config space on device 0000:20:02.0 at offset b (was 164514e4, writing 12a4103c)
PM: Writing back config space on device 0000:20:02.0 at offset 3 (was 0, writing c020)
PM: Writing back config space on device 0000:20:02.0 at offset 2 (was 2000000, writing 2000015)
PM: Writing back config space on device 0000:20:02.0 at offset 1 (was 2b00000, writing 2b00146)

BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
 [<a000000100014980>] show_stack+0x40/0xa0
                                sp=e000004063a5fb90 bsp=e000004063a58f98
 [<a0000001000152b0>] dump_stack+0x30/0x60
                                sp=e000004063a5fd60 bsp=e000004063a58f80
 [<a0000001003f8800>] pci_restore_state+0x480/0x4a0
                                sp=e000004063a5fd60 bsp=e000004063a58f38
 [<a00000010051a0b0>] tg3_chip_reset+0x6d0/0x1020
                                sp=e000004063a5fd70 bsp=e000004063a58ef0
 [<a00000010051b190>] tg3_reset_hw+0xb0/0x3e20
                                sp=e000004063a5fd80 bsp=e000004063a58e90
 [<a00000010051efb0>] tg3_init_hw+0xb0/0xe0
                                sp=e000004063a5fdc0 bsp=e000004063a58e68
 [<a000000100523af0>] tg3_open+0x690/0xe00
                                sp=e000004063a5fdc0 bsp=e000004063a58e10
 [<a000000100647f90>] dev_open+0xf0/0x1e0
                                sp=e000004063a5fdd0 bsp=e000004063a58de0
 [<a000000100645c00>] dev_change_flags+0xc0/0x240
                                sp=e000004063a5fdd0 bsp=e000004063a58da0
 [<a0000001006df200>] devinet_ioctl+0x5a0/0xfe0
                                sp=e000004063a5fdd0 bsp=e000004063a58d40
 [<a0000001006dfdd0>] inet_ioctl+0x190/0x240
                                sp=e000004063a5fe10 bsp=e000004063a58d10
 [<a00000010062cf00>] sock_ioctl+0x5c0/0x620
                                sp=e000004063a5fe10 bsp=e000004063a58ce0
 [<a000000100172cb0>] do_ioctl+0x90/0x180
                                sp=e000004063a5fe10 bsp=e000004063a58ca0
 [<a000000100173650>] vfs_ioctl+0x8b0/0x920
                                sp=e000004063a5fe10 bsp=e000004063a58c58
 [<a000000100173720>] sys_ioctl+0x60/0xc0
                                sp=e000004063a5fe20 bsp=e000004063a58bd8
 [<a00000010000c180>] ia64_ret_from_syscall+0x0/0x20
                                sp=e000004063a5fe30 bsp=e000004063a58bd8
 [<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
                                sp=e000004063a60000 bsp=e000004063a58bd8

Listening on LPF/eth0/00:30:6e:38:d9:67
Sending on LPF/eth0/00:30:6e:38:d9:67
Sending on Socket/fallback/fallback-net
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is off for TX and off for RX. DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 DHCPOFFER from 10.0.0.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.0.0.1
bound to 10.100.100.194 -- renewal in 129600 seconds. done.
Starting portmap daemon: portmap.
Setting the System Clock using the Hardware Clock as reference System Clock set. Local time: Wed Mar 14 18:59:57 UTC 2007 .
Initializing random number generator....
Recovering nvi editor sessions... done.
Setting up X server socket directory /tmp/.X11-unix...done. Setting up ICE socket directory /tmp/.ICE-unix...done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Not starting portmap daemon. Already running.
Loading ACPI modules:
Starting Advanced Configuration and Power Interface daemon: acpid. Starting system message bus: dbus-1.
Starting Hardware abstraction layer: hald.
Starting MTA: exim4.
Starting internet superserver: inetd.
Starting printer spooler: lpd .
Starting OpenBSD Secure Shell server: sshd.
Starting file alteration monitor: FAM.
Starting NFS common utilities: statd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
Starting GNOME Display Manager: gdm.

Debian GNU/Linux testing/unstable lp.helgaas ttyS0

lp.helgaas login:

#19 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

Quoted 5 lines · Bjorn Helgaas
Quoted 1 line · Mel Gorman

Can you tell me if the faulting line was at the check for PageBuddy?

I don't know, sorry.

No problem, the fact the patch booted lets me know that calling PageBuddy() on an invalid page had the same problem as calling page_zone(). This is no real suprise as both need a valid struct page and virtual mem_map shows up these sort of suprises that don't occur elsewhere. Obvious now :/

Quoted 6 lines
Quoted 3 lines

Can you
also apply the following patch and boot with loglevel=8 please? The patch moves the check for pfn_valid() before PageBuddy() is called.

Boots fine with this patch:

Thanks for testing. A proper patch will be posted soon.

Quoted 3 lines

<SNIP>
Virtual mem_map starts at 0xa0007fffc7200000
Zone PFN ranges:

Total aside, a message should have been printed out here with "sizeof(struct page) = ??" when loglevel was set to 8. I wanted it so I could work out PFNs from the faulting addresses. Can you find such a string in the output of dmesg?

Quoted 38 lines

<SNIP>

Please contribute if you find this software useful. For info, please visit http://www.isc.org/dhcp-contrib.html

PM: Writing back config space on device 0000:20:02.0 at offset b (was 164514e4, writing 12a4103c)
PM: Writing back config space on device 0000:20:02.0 at offset 3 (was 0, writing c020)
PM: Writing back config space on device 0000:20:02.0 at offset 2 (was 2000000, writing 2000015)
PM: Writing back config space on device 0000:20:02.0 at offset 1 (was 2b00000, writing 2b00146)

BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
[<a000000100014980>] show_stack+0x40/0xa0
                               sp=e000004063a5fb90 bsp=e000004063a58f98
[<a0000001000152b0>] dump_stack+0x30/0x60
                               sp=e000004063a5fd60 bsp=e000004063a58f80
[<a0000001003f8800>] pci_restore_state+0x480/0x4a0
                               sp=e000004063a5fd60 bsp=e000004063a58f38
[<a00000010051a0b0>] tg3_chip_reset+0x6d0/0x1020
                               sp=e000004063a5fd70 bsp=e000004063a58ef0
[<a00000010051b190>] tg3_reset_hw+0xb0/0x3e20
                               sp=e000004063a5fd80 bsp=e000004063a58e90
[<a00000010051efb0>] tg3_init_hw+0xb0/0xe0
                               sp=e000004063a5fdc0 bsp=e000004063a58e68
[<a000000100523af0>] tg3_open+0x690/0xe00
                               sp=e000004063a5fdc0 bsp=e000004063a58e10
[<a000000100647f90>] dev_open+0xf0/0x1e0
                               sp=e000004063a5fdd0 bsp=e000004063a58de0
[<a000000100645c00>] dev_change_flags+0xc0/0x240
                               sp=e000004063a5fdd0 bsp=e000004063a58da0
[<a0000001006df200>] devinet_ioctl+0x5a0/0xfe0
                               sp=e000004063a5fdd0 bsp=e000004063a58d40
[<a0000001006dfdd0>] inet_ioctl+0x190/0x240
                               sp=e000004063a5fe10 bsp=e000004063a58d10
[<a00000010062cf00>] sock_ioctl+0x5c0/0x620
                               sp=e000004063a5fe10 bsp=e000004063a58ce0
[<a000000100172cb0>] do_ioctl+0x90/0x180
                               sp=e000004063a5fe10 bsp=e000004063a58ca0
Quoted 8 lines
[<a000000100173650>] vfs_ioctl+0x8b0/0x920
                               sp=e000004063a5fe10 bsp=e000004063a58c58
[<a000000100173720>] sys_ioctl+0x60/0xc0
                               sp=e000004063a5fe20 bsp=e000004063a58bd8
[<a00000010000c180>] ia64_ret_from_syscall+0x0/0x20
                               sp=e000004063a5fe30 bsp=e000004063a58bd8
[<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
                               sp=e000004063a60000 bsp=e000004063a58bd8

That doesn't look particularly healthy! Is this a known problem?

Quoted 1 line

Remainder snipped

Signature · 3 lines
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
#20 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

Quoted 8 lines · Mel Gorman
Quoted 3 lines

<SNIP>
Virtual mem_map starts at 0xa0007fffc7200000
Zone PFN ranges:

Total aside, a message should have been printed out here with "sizeof(struct page) = ??" when loglevel was set to 8. I wanted it so I could work out PFNs from the faulting addresses. Can you find such a string in the output of dmesg?

You probably don't need this anymore, but sizeof(struct page) = 56.

Quoted 10 lines
Quoted 10 lines
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
[<a000000100014980>] show_stack+0x40/0xa0
                               sp=e000004063a5fb90 bsp=e000004063a58f98
[<a0000001000152b0>] dump_stack+0x30/0x60
                               sp=e000004063a5fd60 bsp=e000004063a58f80
[<a0000001003f8800>] pci_restore_state+0x480/0x4a0
                               sp=e000004063a5fd60 bsp=e000004063a58f38
[<a00000010051a0b0>] tg3_chip_reset+0x6d0/0x1020
Quoted 2 lines

...
That doesn't look particularly healthy! Is this a known problem?

Yeah, that's ugly, isn't it? I hadn't got to worrying about that yet.

#21 lore raw

Re: 2.6.21-rc3-mm2 (oops in move_freepages)

Quoted 5 lines · Bjorn Helgaas
Quoted 4 lines · Mel Gorman
Quoted 3 lines

<SNIP>
Virtual mem_map starts at 0xa0007fffc7200000
Zone PFN ranges:

Quoted 7 lines
Quoted 4 lines

Total aside, a message should have been printed out here with "sizeof(struct page) = ??" when loglevel was set to 8. I wanted it so I could work out PFNs from the faulting addresses. Can you find such a string in the output of dmesg?

You probably don't need this anymore, but sizeof(struct page) = 56.

Thanks, it allowed me to confirm that the fault happened in a definite hole based on the output of early_node_map[] so that's good to know. If it happened in a location that should have had memory, I would be worried.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
BUG: at drivers/pci/pci.c:679 pci_restore_state()

Call Trace:
[<a000000100014980>] show_stack+0x40/0xa0
                               sp=e000004063a5fb90 bsp=e000004063a58f98
[<a0000001000152b0>] dump_stack+0x30/0x60
                               sp=e000004063a5fd60 bsp=e000004063a58f80
[<a0000001003f8800>] pci_restore_state+0x480/0x4a0
                               sp=e000004063a5fd60 bsp=e000004063a58f38
[<a00000010051a0b0>] tg3_chip_reset+0x6d0/0x1020
Quoted 5 lines
Quoted 2 lines

...
That doesn't look particularly healthy! Is this a known problem?

Yeah, that's ugly, isn't it? I hadn't got to worrying about that yet.

heh, ok.

Signature · 3 lines
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
#22 lore raw

PATCH 1/1 Avoid unsafe use of struct pages in move_freepages when CONFIG_HOLES_IN_ZONE is set

In reply to Bjorn Helgaas

In the majority of situations, mem_map is guaranteed to be valid within a MAX_ORDER_NR_PAGES block of pages. However, when CONFIG_HOLES_IN_ZONE is set, there is no guarantee that mem_map exists for the entire block. This means that when checking struct pages around a known valid page, there is no guarantee they are valid.

move_freepages() operates on a MAX_ORDER_NR_PAGES range of pages based on a known valid page retrieved from the free lists. However, a bug check is unsafe when CONFIG_HOLES_IN_ZONE is set and pfn_valid() is called too late.

This patch disables the bug check when CONFIG_HOLES_IN_ZONE and checks pfn_valid() earlier before calling PageBuddy(). It applies on top of move-free-pages-between-lists-on-steal-fix-2.patch from Yasunori Goto in -mm.

Credit to Bjorn Helgaas for reporting this bug and testing.

 page_alloc.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
mm/page_alloc.c +14 -4
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-rc3-mm2-goto/mm/page_alloc.c linux-2.6.21-rc3-mm2-zone_holes_ia64_fix/mm/page_alloc.c
@@ -707,13 +707,18 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
+#ifndef CONFIG_HOLES_IN_ZONE
+	/*
+	 * page_zone is not safe to call in this context when
+	 * CONFIG_HOLES_IN_ZONE is set. This bug check is probably redundant
+	 * anyway as we check zone boundaries in move_freepages_block().
+	 * Remove at a later date when no bug reports exist related to
+	 * CONFIG_PAGE_GROUP_BY_MOBILITY
+	 */
 	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
+#endif
 
 	for (page = start_page; page < end_page;) {
-		if (!PageBuddy(page)) {
-			page++;
-			continue;
-		}
 #ifdef CONFIG_HOLES_IN_ZONE
 		if (!pfn_valid(page_to_pfn(page))) {
 			page++;
@@ -721,6 +726,11 @@ int move_freepages(struct zone *zone,
 		}
 #endif
 
+		if (!PageBuddy(page)) {
+			page++;
+			continue;
+		}
+
 		order = page_order(page);
 		list_del(&page->lru);
 		list_add(&page->lru,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#24 lore raw

Re: 2.6.21-rc3-mm2 (BUG in pci_restore_state())

Quoted 3 lines · Bjorn Helgaas

In 2.6.21-rc3-mm2 (plus some move_freepages() bugfixes), I hit one of the warnings added by Eric's msi-debug-code.patch. This is on an ia64 box, an HP rx2600. Let me know if I can collect more information.

I think we are good. How pci_save_state and pci_restore_state were implemented and how they were used were out of sync. tg3 was one of the drivers where pci_save_state and pci_restore_state were used as part of the reset routine and were not used in pairs.

Which when combined with a pci-x or a pci-express capability resulted in a memory leak, (that I was warning about). This has now been corrected upstream.

And the condition I was warning about non paired pci_save_state and pci_restore_state is no longer a problem.

Eric

#25 lore raw
In reply to Andrew Morton
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

x86_64, with CONFIG_HOTPLUG disabled:

drivers/base/bus.c: In function 'store_drivers_probe':
drivers/base/bus.c:747: error: 'driver_helper' undeclared (first use in this function) drivers/base/bus.c:747: error: (Each undeclared identifier is reported only once drivers/base/bus.c:747: error: for each function it appears in.) make[2]: *** [drivers/base/bus.o] Error 1
make[1]: *** [drivers/base] Error 2
make: *** [drivers] Error 2

Review

Quoted 10 lines

Changes since 2.6.21-rc3-mm1:

(quoted diff) +0 -6
-lists-add-list-splice-tail.patch
-sched-remove-sleepavg-from-proc.patch
-sched-remove-noninteractive-flag.patch
-sched-implement-180-bit-sched-bitmap.patch
-sched-implement-rsdl-cpu-scheduler.patch
-sched-document-rsdl-cpu-scheduler.patch
 
 Removed.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

author maintainer
#26 lore raw
Quoted 13 lines · On Mon, 19 Mar 2007 12:17:24 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

x86_64, with CONFIG_HOTPLUG disabled:

Quoted 8 lines

drivers/base/bus.c: In function 'store_drivers_probe':
drivers/base/bus.c:747: error: 'driver_helper' undeclared (first use in this function) drivers/base/bus.c:747: error: (Each undeclared identifier is reported only once drivers/base/bus.c:747: error: for each function it appears in.) make[2]: *** [drivers/base/bus.o] Error 1
make[1]: *** [drivers/base] Error 2
make: *** [drivers] Error 2

Due to Kay's gregkh-driver-driver-core-udev-triggered-device-driver-binding.patch

#27 lore raw
Quoted 25 lines · Andrew Morton
Quoted 13 lines · On Mon, 19 Mar 2007 12:17:24 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

x86_64, with CONFIG_HOTPLUG disabled:

Quoted 8 lines

drivers/base/bus.c: In function 'store_drivers_probe':
drivers/base/bus.c:747: error: 'driver_helper' undeclared (first use in this function) drivers/base/bus.c:747: error: (Each undeclared identifier is reported only once drivers/base/bus.c:747: error: for each function it appears in.) make[2]: *** [drivers/base/bus.o] Error 1
make[1]: *** [drivers/base] Error 2
make: *** [drivers] Error 2

Quoted 2 lines

Due to Kay's gregkh-driver-driver-core-udev-triggered-device-driver-binding.patch

I sent an updated patch, that compiles without CONFIG_HOTPLUG to Greg.

Thanks,
Kay

#28 lore raw
In reply to Andrew Morton
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

with CONFIG_PROC_FS=n (x86_64):

LD .tmp_vmlinux1
kernel/built-in.o: In function `ptrace_start':
ptrace.c:(.text+0x300f9): undefined reference to `ptrace_may_attach'
make: *** [.tmp_vmlinux1] Error 1

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#29 lore raw

PATCH 1/1 ptrace needs PROC_FS

From: Randy Dunlap <[email protected]>

CONFIG_PTRACE needs PROC_FS; with CONFIG_PROC_FS=n (x86_64):

LD .tmp_vmlinux1
kernel/built-in.o: In function `ptrace_start':
ptrace.c:(.text+0x300f9): undefined reference to `ptrace_may_attach'
make: *** [.tmp_vmlinux1] Error 1

---
 init/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -688,7 +688,7 @@ config UTRACE
 config PTRACE
 	bool "Legacy ptrace system call interface"
 	default y
-	depends on UTRACE
+	depends on UTRACE && PROC_FS
 	help
 	  Enable the ptrace system call.
 	  This is traditionally used by debuggers like GDB,
#30 lore raw

Re: [PATCH] ptrace needs PROC_FS

Thanks, that Kconfig change seems like the simplest solution for this.

Thanks,
Roland

#31 lore raw

Re: [PATCH] ptrace needs PROC_FS

Hi!

Quoted 1 line

Thanks, that Kconfig change seems like the simplest solution for this.

Simplest, maybe, but is it right? Ptrace should work without /proc, no?

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#32 lore raw
In reply to Andrew Morton
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

I don't quite see why this error is happening. Looks like all the nested #includes should handle it...

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_UTRACE=y
# PTRACE=n
# PROC_FS=n

In file included from arch/x86_64/kernel/crash.c:19:
include/linux/elfcore.h: In function 'elf_core_copy_regs':
include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type make[1]: *** [arch/x86_64/kernel/crash.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

author maintainer
#33 lore raw
Quoted 20 lines · On Mon, 19 Mar 2007 17:27:11 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

I don't quite see why this error is happening. Looks like all the nested #includes should handle it...

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_UTRACE=y
# PTRACE=n
# PROC_FS=n

Quoted 6 lines

In file included from arch/x86_64/kernel/crash.c:19:
include/linux/elfcore.h: In function 'elf_core_copy_regs':
include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type make[1]: *** [arch/x86_64/kernel/crash.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

Perhaps it's complaining about undefined pt_regs. But it's there in asm/ptrace.h which is included by linux/ptrace.h. Perhaps there's an include snafu which is causing that inclusion to not work.

Dunno. Please send full .config to Roland ;)

#34 lore raw
Quoted 30 lines · On Mon, 19 Mar 2007 17:39:15 -0700 Andrew Morton wrote:
Quoted 20 lines · On Mon, 19 Mar 2007 17:27:11 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

I don't quite see why this error is happening. Looks like all the nested #includes should handle it...

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_UTRACE=y
# PTRACE=n
# PROC_FS=n

Quoted 6 lines

In file included from arch/x86_64/kernel/crash.c:19:
include/linux/elfcore.h: In function 'elf_core_copy_regs':
include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type make[1]: *** [arch/x86_64/kernel/crash.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

Quoted 5 lines

Perhaps it's complaining about undefined pt_regs. But it's there in asm/ptrace.h which is included by linux/ptrace.h. Perhaps there's an include snafu which is causing that inclusion to not work.

Dunno. Please send full .config to Roland ;)

attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#35 lore raw
In reply to Andrew Morton

Previously <linux/ptrace.h> had #include <linux/sched.h>, and mine just had "struct task_struct;" instead for its forward references. asm-x86_64/elf.h uses current->field in the ELF_CORE_COPY_REGS macro, expanded in linux/elfcore.h in elf_core_copy_regs. So it needs sched.h but is no longer getting it implicitly. Since current appears in asm-x86_64/elf.h, there is some logic to having #include <linux/sched.h> explicit there instead of somewhere else. But to reduce undue perturbation, I'll just change my patch to preserve the #include in linux/ptrace.h instead.

Thanks,
Roland

#36 lore raw
In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap
Quoted 8 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

I don't quite see why this error is happening. Looks like all the nested #includes should handle it...

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_UTRACE=y
# PTRACE=n
# PROC_FS=n

Quoted 6 lines

In file included from arch/x86_64/kernel/crash.c:19:
include/linux/elfcore.h: In function 'elf_core_copy_regs':
include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type make[1]: *** [arch/x86_64/kernel/crash.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

make arch/x86_64/kernel/crash.i
may tell you a bit more why the includes foes wrong.

Sam

#37 lore raw
Quoted 26 lines · Sam Ravnborg
Quoted 18 lines · Randy Dunlap
Quoted 7 lines · On Wed, 7 Mar 2007 20:19:15 -0800 Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/

- This is the same as 2.6.21-rc3-mm1, except Con's CPU scheduler changes were dropped.

This is for A/B comparison purposes, and because those changes crashed on one test setup.

I don't quite see why this error is happening. Looks like all the nested #includes should handle it...

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_UTRACE=y
# PTRACE=n
# PROC_FS=n

Quoted 6 lines

In file included from arch/x86_64/kernel/crash.c:19:
include/linux/elfcore.h: In function 'elf_core_copy_regs':
include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type include/linux/elfcore.h:103: error: dereferencing pointer to incomplete type make[1]: *** [arch/x86_64/kernel/crash.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

Quoted 2 lines

make arch/x86_64/kernel/crash.i
may tell you a bit more why the includes foes wrong.

That didn't complain or have any errors/warnings, so hopefully Roland can see something.

Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***