From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "David Witbrodt" <dawitbro@sbcglobal.net>
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 10:58:22 -0700 [thread overview]
Message-ID: <86802c440808201058s5141c10fnf2b843525f8c545@mail.gmail.com> (raw)
In-Reply-To: <324173.33114.qm@web82106.mail.mud.yahoo.com>
On Wed, Aug 20, 2008 at 10:42 AM, David Witbrodt <dawitbro@sbcglobal.net> wrote:
>
> *** FINALLY FOUND THE EXACT PROBLEM ***
>
> I woke up this morning with a new idea. I wish I had thought of this
> TWO WEEKS AGO!
>
> Commit 3def3d6d essentially involves 2 different changes:
>
> 1. request_resource () is replaced by insert_resource()
>
> 2. code to add {code,data,bss}_resource to the iomem_resource tree
> is moved out of e820_reserve_resources() and into setup_arch()
> directly. [The actual call of e820_reserve_resources() is also
> located in setup_arch().]
>
>
> Since this is 2 separate changes, I went back to 700efc1b, just
> before the commit introducing the regression (3def3d6d).
>
> When I applied change #2 alone, and GOT A WORKING KERNEL!
> ===== BEGIN DIFF ================
> diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
> index a8694a3..e452bea 100644
> --- a/arch/x86/kernel/e820_64.c
> +++ b/arch/x86/kernel/e820_64.c
> @@ -229,8 +229,7 @@ unsigned long __init e820_end_of_ram(void)
> /*
> * Mark e820 reserved areas as busy for the resource manager.
> */
> -void __init e820_reserve_resources(struct resource *code_resource,
> - struct resource *data_resource, struct resource *bss_resource)
> +void __init e820_reserve_resources(void)
> {
> int i;
> for (i = 0; i < e820.nr_map; i++) {
> @@ -246,20 +245,6 @@ void __init e820_reserve_resources(struct resource *code_resource,
> 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,
> - * so we try it repeatedly and let the resource manager
> - * test it.
> - */
> - request_resource(res, code_resource);
> - request_resource(res, data_resource);
> - request_resource(res, bss_resource);
> -#ifdef CONFIG_KEXEC
> - if (crashk_res.start != crashk_res.end)
> - request_resource(res, &crashk_res);
> -#endif
> - }
> }
> }
>
> diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
> index 187f084..a0584ac 100644
> --- a/arch/x86/kernel/setup_64.c
> +++ b/arch/x86/kernel/setup_64.c
> @@ -322,6 +322,11 @@ void __init setup_arch(char **cmdline_p)
>
> finish_e820_parsing();
>
> + /* after parse_early_param, so could debug it */
> + insert_resource(&iomem_resource, &code_resource);
> + insert_resource(&iomem_resource, &data_resource);
> + insert_resource(&iomem_resource, &bss_resource);
> +
> early_gart_iommu_check();
>
> e820_register_active_regions(0, 0, -1UL);
> @@ -454,7 +459,7 @@ void __init setup_arch(char **cmdline_p)
> /*
> * We trust e820 completely. No explicit ROM probing in memory.
> */
> - e820_reserve_resources(&code_resource, &data_resource, &bss_resource);
> + e820_reserve_resources();
> e820_mark_nosave_regions();
>
> /* request I/O space for devices used on all i[345]86 PCs */
> diff --git a/include/asm-x86/e820_64.h b/include/asm-x86/e820_64.h
> index 9e06c6e..ef653a4 100644
> --- a/include/asm-x86/e820_64.h
> +++ b/include/asm-x86/e820_64.h
> @@ -23,8 +23,7 @@ extern void update_memory_range(u64 start, u64 size, unsigned old_type,
> extern void setup_memory_region(void);
> extern void contig_e820_setup(void);
> extern unsigned long e820_end_of_ram(void);
> -extern void e820_reserve_resources(struct resource *code_resource,
> - struct resource *data_resource, struct resource *bss_resource);
> +extern void e820_reserve_resources(void);
> extern void e820_mark_nosave_regions(void);
> extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type);
> extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type);
> ===== END DIFF ================
>
>
> 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.
please send out /proc/iomem when it happens to boot.
YH
next prev parent reply other threads:[~2008-08-20 17:58 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 17:42 David Witbrodt
2008-08-20 17:58 ` Yinghai Lu [this message]
2008-08-21 2:02 ` Yinghai Lu
-- strict thread matches above, loose matches on Subject: below --
2008-08-26 15:25 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-21 2:48 David Witbrodt
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=86802c440808201058s5141c10fnf2b843525f8c545@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=billfink@mindspring.com \
--cc=dawitbro@sbcglobal.net \
--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 \
/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
all inboxes | Powered by JetHome®