From: David Witbrodt <dawitbro@sbcglobal.net>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Vivek Goyal <vgoyal@redhat.com>,
Bill Fink <billfink@mindspring.com>,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, netdev <netdev@vger.kernel.org>
Subject: Re: HPET regression in 2.6.26 versus 2.6.25 -- found another user with the same regression
Date: Wed, 20 Aug 2008 19:48:50 -0700 (PDT) [thread overview]
Message-ID: <81856.40793.qm@web82105.mail.mud.yahoo.com> (raw)
> > As a separate experiment, I started over with a clean version of
> > 700efc1b, then introduced the change from request_resource() to
> > insert_resource():
> > ===== BEGIN DIFF ================
> > diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
> > index a8694a3..988195d 100644
> > --- a/arch/x86/kernel/e820_64.c
> > +++ b/arch/x86/kernel/e820_64.c
> > @@ -245,7 +245,7 @@ void __init e820_reserve_resources(struct resource
> *code_resource,
> > res->start = e820.map[i].addr;
> > res->end = res->start + e820.map[i].size - 1;
> > res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
> > - request_resource(&iomem_resource, res);
> > + insert_resource(&iomem_resource, res);
> > if (e820.map[i].type == E820_RAM) {
> > /*
> > * We don't know which RAM region contains kernel data,
> > ===== END DIFF ================
> >
> > The kernel produced from the change HANGS!
>
> because code/data/bss/crashk is inserted at first
>
> in e820_reserve_resource if you call request_resource instead of
> insert_resource. the entries from e820 tables that has conflict to
> entries already added will not show in
> resource list /proc/iomem.
Ahh, what an error I made! I made at least 3 errors in that post, and
now that I am home from work I can try to correct them.
> please send out /proc/iomem when it happens to boot.
OK, this was my first error. My first experiment -- leave
request_resource() alone, and move the additions of the kernel memory
regions to setup_arch() -- produced a booting kernel. When that
happened, I was already late for work... so I produced the output
of 'cat /proc/iomem' from that kernel and moved on to my second test
I simply forgot to include the output in my message because I was
rushing to get out of the house! Here it is:
==============================
00000000-0009f3ff : System RAM
0009f400-0009ffff : reserved
000f0000-000fffff : reserved
00200000-005570e1 : Kernel code
005570e2-006b4397 : Kernel data
00736000-0077d387 : Kernel bss
77fe0000-77fe2fff : ACPI Non-volatile Storage
77fe3000-77feffff : ACPI Tables
77ff0000-77ffffff : reserved
78000000-7fffffff : pnp 00:0d
d8000000-dfffffff : PCI Bus #01
d8000000-dfffffff : 0000:01:05.0
d8000000-d8ffffff : uvesafb
e0000000-efffffff : PCI MMCONFIG 0
e0000000-efffffff : reserved
fdc00000-fdcfffff : PCI Bus #02
fdcff000-fdcff0ff : 0000:02:05.0
fdcff000-fdcff0ff : r8169
fdd00000-fdefffff : PCI Bus #01
fdd00000-fddfffff : 0000:01:05.0
fdee0000-fdeeffff : 0000:01:05.0
fdefc000-fdefffff : 0000:01:05.2
fdefc000-fdefffff : ICH HD audio
fdf00000-fdffffff : PCI Bus #02
fe020000-fe023fff : 0000:00:14.2
fe020000-fe023fff : ICH HD audio
fe029000-fe0290ff : 0000:00:13.5
fe029000-fe0290ff : ehci_hcd
fe02a000-fe02afff : 0000:00:13.4
fe02a000-fe02afff : ohci_hcd
fe02b000-fe02bfff : 0000:00:13.3
fe02b000-fe02bfff : ohci_hcd
fe02c000-fe02cfff : 0000:00:13.2
fe02c000-fe02cfff : ohci_hcd
fe02d000-fe02dfff : 0000:00:13.1
fe02d000-fe02dfff : ohci_hcd
fe02e000-fe02efff : 0000:00:13.0
fe02e000-fe02efff : ohci_hcd
fe02f000-fe02f3ff : 0000:00:12.0
fe02f000-fe02f3ff : ahci
fec00000-fec00fff : IOAPIC 0
fec00000-fec00fff : pnp 00:0d
fed00000-fed003ff : HPET 0
fed00000-fed003ff : 0000:00:14.0
fee00000-fee00fff : Local APIC
fff80000-fffeffff : pnp 00:0d
ffff0000-ffffffff : pnp 00:0d
==============================
My second (huge) error was to carry out my second experiment incorrectly.
When I replaced request_resource() with insert_resource(), I positioned
it before the code that added the kernel memory regions to the resource
for the system RAM region containing them.
I actually intended the second experiment to be different, but only
realized it when Yinghai corrected me (above). Here is the diff for
the _actual_ experiment I intended:
===== BEGIN DIFF ================
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index a8694a3..f2498ae 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -245,7 +245,6 @@ void __init e820_reserve_resources(struct resource *code_resource,
res->start = e820.map[i].addr;
res->end = res->start + e820.map[i].size - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
- request_resource(&iomem_resource, res);
if (e820.map[i].type == E820_RAM) {
/*
* We don't know which RAM region contains kernel data,
@@ -260,6 +259,7 @@ void __init e820_reserve_resources(struct resource *code_resource,
request_resource(res, &crashk_res);
#endif
}
+ insert_resource(&iomem_resource, res);
}
}
===== END DIFF ================
This change produces a kernel that hangs. The difference between the
results of the two experiments was what I was trying to show. We now
know that:
- moving the code that adds {code,data,bss}_resource to the iomem_resource
tree out of e820_reserve_resources() and into setup_arch() is NOT what
caused my problem.
- the change from using request_resource() to insert_resource() seems
to be to blame.
My purpose in those experiments was to try to present a sort of "proof",
like a mathematical proof. But my understanding of the code is fairly
shallow, so my "proof" might not mean very much. I was hoping to
provide useful data here, but only kernel developers can assess whether
or not this information is useful.
My third error was my "conclusion":
> My conclusion is that, somehow, the reordering of adding
> {code,data,bss}_resource to the iomem_resource tree is doing funky
> things to certain people's machines!
I meant to say just the opposite: reordering the place where adding the
kernel memory resources to the iomem_resource tree is NOT the problem;
somehow the change to insert_resource() is the problem.
My apologies to all here: I was racing to finish up, post my results,
and get to work... and completely botched the second experiment and the
message describing them!
Dave W.
next reply other threads:[~2008-08-21 2:49 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 2:48 David Witbrodt [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-26 15:25 HPET regression in 2.6.26 versus 2.6.25 -- found another user with the same regression David Witbrodt
2008-08-26 12:58 David Witbrodt
2008-08-26 13:28 ` Ingo Molnar
2008-08-25 13:39 David Witbrodt
2008-08-25 17:24 ` Yinghai Lu
2008-08-25 17:28 ` Yinghai Lu
2008-08-25 3:06 David Witbrodt
2008-08-25 2:00 David Witbrodt
2008-08-25 2:37 ` Yinghai Lu
2008-08-25 4:41 ` Yinghai Lu
2008-08-25 6:27 ` Ingo Molnar
2008-08-25 6:40 ` Yinghai Lu
2008-08-25 7:31 ` Ingo Molnar
2008-08-25 8:00 ` Yinghai Lu
2008-08-27 22:41 ` Jesse Barnes
2008-08-27 23:23 ` Yinghai Lu
2008-08-27 23:42 ` Jesse Barnes
2008-08-24 13:05 David Witbrodt
2008-08-24 19:29 ` Yinghai Lu
2008-08-24 22:48 ` Yinghai Lu
2008-08-24 2:39 David Witbrodt
2008-08-24 3:44 ` Yinghai Lu
2008-08-23 23:42 David Witbrodt
2008-08-24 2:05 ` Yinghai Lu
2008-08-23 19:47 David Witbrodt
2008-08-23 20:12 ` Yinghai Lu
2008-08-23 20:51 ` Yinghai Lu
2008-08-23 19:29 David Witbrodt
2008-08-23 18:26 Rufus & Azrael
2008-08-23 19:17 ` Yinghai Lu
2008-08-23 19:40 ` Rufus & Azrael
2008-08-23 20:10 ` Yinghai Lu
2008-08-23 20:15 ` Rufus & Azrael
2008-08-23 20:28 ` Yinghai Lu
2008-08-23 20:33 ` Rufus & Azrael
2008-08-23 20:35 ` Yinghai Lu
2008-08-23 20:36 ` Rufus & Azrael
2008-08-23 20:45 ` Yinghai Lu
2008-08-23 21:05 ` Yinghai Lu
2008-08-28 22:52 ` Jordan Crouse
2008-09-12 17:39 ` Andreas Herrmann
2008-09-12 17:45 ` Jordan Crouse
2008-09-14 16:25 ` Ingo Molnar
2008-08-23 16:44 David Witbrodt
2008-08-23 16:32 David Witbrodt
2008-08-23 15:42 David Witbrodt
2008-08-23 15:55 ` Ingo Molnar
2008-08-23 11:58 David Witbrodt
2008-08-23 13:36 ` Ingo Molnar
2008-08-23 15:03 ` Ingo Molnar
2008-08-23 17:51 ` Yinghai Lu
2008-08-23 11:42 David Witbrodt
2008-08-23 2:25 David Witbrodt
2008-08-23 5:41 ` Yinghai Lu
2008-08-23 6:56 ` Yinghai Lu
2008-08-22 1:24 David Witbrodt
2008-08-21 16:53 David Witbrodt
2008-08-21 17:57 ` Yinghai Lu
2008-08-21 14:09 David Witbrodt
2008-08-21 15:33 ` Yinghai Lu
2008-08-21 13:33 David Witbrodt
2008-08-21 4:07 David Witbrodt
2008-08-21 6:42 ` Yinghai Lu
2008-08-21 7:04 ` Ilpo Järvinen
2008-08-20 17:42 David Witbrodt
2008-08-20 17:58 ` Yinghai Lu
2008-08-21 2:02 ` Yinghai Lu
2008-08-20 16:44 David Witbrodt
2008-08-20 14:32 David Witbrodt
2008-08-20 14:49 ` Ingo Molnar
2008-08-20 14:08 David Witbrodt
2008-08-20 4:51 David Witbrodt
2008-08-20 5:21 ` Yinghai Lu
2008-08-20 7:51 ` Bill Fink
2008-08-20 8:02 ` Yinghai Lu
2008-08-20 9:15 ` Ingo Molnar
2008-08-20 9:31 ` Yinghai Lu
2008-08-20 9:36 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81856.40793.qm@web82105.mail.mud.yahoo.com \
--to=dawitbro@sbcglobal.net \
--cc=billfink@mindspring.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=yhlu.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox