From: Andy Whitcroft <apw@shadowen.org>
To: linux-ia64@vger.kernel.org
Subject: Re: 05e0caad3b7bd0d0fbeff980bca22f186241a501 breaks ia64 kdump
Date: Fri, 03 Nov 2006 10:23:42 +0000 [thread overview]
Message-ID: <454B18AE.3070603@shadowen.org> (raw)
In-Reply-To: <20061026075951.GA30910@verge.net.au>
Zou, Nanhai wrote:
> Hi,
> This patch should fix the issue.
>
This patch affects the semantics of the generic code. To change it
would mean changing all the other architectures to use the new semantics.
add_active_ranges(nid, start, end) is defined to add the range below to
node nid:
start <= pfn < end
The change in this patch makes it:
start <= pfn <= end
This will incorrectly add pages to regions registered by all other
architectures. This implies one of two things:
1) the EFI map is actually defining regions start <= pfn <= end, and
these should be registered as add_active_region(nid, start, end + 1), or
2) the kexec EFI map is being incorrectly filled in using start <= pfn
<= end form.
Looking at (1), it seems that the EFI map actually defines the region
using (start, num_pages) tuples. These are converted in walk() to
(start, end) where end = start + num_pages. This implies to me that the
callback is recieving (start, end) where the valid region is start <pfn < end, which is compatible with the add_active_region
implementation. A quick look at the contig and discontig
implementations they preserve this through.
>>> Index: linux-2.6/arch/ia64/mm/discontig.c
>>> =================================>>> --- linux-2.6.orig/arch/ia64/mm/discontig.c 2006-11-02
>> 16:17:59.000000000 +0900
>>> +++ linux-2.6/arch/ia64/mm/discontig.c 2006-11-02 16:18:03.000000000
>> +0900
>>> @@ -689,6 +689,8 @@
>>> arch_sparse_init();
>>>
>>> efi_memmap_walk(filter_rsvd_memory, count_node_pages);
>>> + add_active_range(0, ia64_tpa(_text) >> PAGE_SHIFT,
>>> + (ia64_tpa(_end) -1 ) >> PAGE_SHIFT);
Ok, this is wrong in the sense that you should be adjusting the end up
to the page following the end of the region. You are rounding the end
down making it start <= pfn <= end. It should be something like this:
add_active_range(0, ia64_tpa(_text) >> PAGE_SHIFT,
(ia64_tpa(_end) + PAGE_SIZE - 1) >> PAGE_SHIFT);
Does this change on its own fix things?
>>>
>>> #ifdef CONFIG_VIRTUAL_MEM_MAP
>>> vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
-apw
next prev parent reply other threads:[~2006-11-03 10:23 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 7:59 05e0caad3b7bd0d0fbeff980bca22f186241a501 breaks ia64 kdump Horms
2006-10-26 13:27 ` Mel Gorman
2006-10-27 1:40 ` Zou, Nanhai
2006-10-27 2:30 ` Zou, Nanhai
2006-10-27 9:15 ` Andy Whitcroft
2006-10-30 0:55 ` Horms
2006-10-30 8:37 ` Horms
2006-10-30 9:11 ` Horms
2006-10-30 9:15 ` Horms
2006-10-30 9:25 ` Horms
2006-10-30 11:49 ` Mel Gorman
2006-10-31 3:29 ` Horms
2006-10-31 9:42 ` Mel Gorman
2006-11-02 8:24 ` Horms
2006-11-02 8:29 ` Horms
2006-11-02 9:32 ` Horms
2006-11-02 10:38 ` Zou, Nanhai
2006-11-02 16:26 ` Mel Gorman
2006-11-03 0:28 ` Zou, Nanhai
2006-11-03 1:19 ` Zou, Nanhai
2006-11-03 9:27 ` Mel Gorman
2006-11-03 10:06 ` Zou Nan hai
2006-11-03 10:23 ` Andy Whitcroft [this message]
2006-11-06 3:18 ` Horms
2006-11-06 3:26 ` Horms
2006-11-10 8:16 ` Zou, Nanhai
2006-11-10 11:47 ` Mel Gorman
2006-11-14 1:38 ` Zou, Nanhai
2006-11-14 23:42 ` Mel Gorman
2006-11-15 16:26 ` Mel Gorman
2006-11-16 6:26 ` Horms
2006-11-16 16:05 ` Mel Gorman
2006-11-20 1:40 ` Zou, Nanhai
2006-12-05 9:58 ` Christian Cotte-Barrot
2006-12-18 14:52 ` Mel Gorman
2006-12-19 0:28 ` Horms
2006-12-19 3:35 ` Horms
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=454B18AE.3070603@shadowen.org \
--to=apw@shadowen.org \
--cc=linux-ia64@vger.kernel.org \
/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