login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
15
Re: [PATCH] x86-64: fix combining of regions in init_memory_mapping()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Yinghai Lu
Subject:
Re: [PATCH] x86-64: fix combining of regions in init_memory_mapping()
Date: Monday, September 15, 2008 - 1:34 am
On Mon, Sep 15, 2008 at 1:17 AM, Jan Beulich <jbeulich@novell.com> wrote:
quoted text
>>>> "Yinghai Lu" <yhlu.kernel@gmail.com> 14.09.08 20:20 >>> >>On Fri, Sep 12, 2008 at 7:43 AM, Jan Beulich <jbeulich@novell.com> wrote: >>> When nr_range gets decremented, the same slot must be considered for >>> coalescing with its new successor again. >>> >>> Signed-off-by: Jan Beulich <jbeulich@novell.com> >>> >>> --- >>> arch/x86/mm/init_64.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> --- linux-2.6.27-rc6/arch/x86/mm/init_64.c 2008-08-29 10:53:00.000000000 +0200 >>> +++ 2.6.27-rc6-x86_64-mr-coalesce/arch/x86/mm/init_64.c 2008-09-12 11:58:45.000000000 +0200 >>> @@ -636,7 +636,7 @@ unsigned long __init_refok init_memory_m >>> old_start = mr[i].start; >>> memmove(&mr[i], &mr[i+1], >>> (nr_range - 1 - i) * sizeof (struct map_range)); >>> - mr[i].start = old_start; >>> + mr[i--].start = old_start; >>> nr_range--; >>> } >>> >> >>this patch seems not right. >>Ingo, please don't apply it. >> >>original code: >> /* try to merge same page size and continuous */ >> for (i = 0; nr_range > 1 && i < nr_range - 1; i++) { >> unsigned long old_start; >> if (mr[i].end != mr[i+1].start || >> mr[i].page_size_mask != mr[i+1].page_size_mask) >> continue; >> /* move it */ >> old_start = mr[i].start; >> memmove(&mr[i], &mr[i+1], >> (nr_range - 1 - i) * sizeof (struct map_range)); >> mr[i].start = old_start; >> nr_range--; >> } >> >>so it save old_start and first, and move entries forward (so old one >>is overwriten), and put back old_start ... > > Old and new code are not different in any way in this respect - both > overwrite the old entry at index i with the entry at index i+1 and then > set the start of the i-th entry back to what it was before the overwrite, > effectively combining them. The patch just makes sure that the index > isn't being updated at the same time as nr_range (because if you update > both you effectively skip one). > > The issue is apparently pretty benign to native code, but surfaces as a > boot time crash in our forward ported Xen tree (where the page table > setup overall works differently than in native). Since the underlying > issue was present in native (and since I assume if there is an attempt > to merge subsequent regions, then it should work right), I nevertheless > submitted the patch for native inclusion.
yes. your patch fixed the skip... Acked-by: Yinghai Lu <yhlu.kernel@gmail.com> YH --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86-64: fix combining of regions in init_memory_m ...
, Jan Beulich
, (Fri Sep 12, 7:43 am)
Re: [PATCH] x86-64: fix combining of regions in init_memor ...
, Yinghai Lu
, (Sun Sep 14, 11:20 am)
Re: [PATCH] x86-64: fix combining of regions in init_memo ...
, Jan Beulich
, (Mon Sep 15, 1:17 am)
Re: [PATCH] x86-64: fix combining of regions in init_memor ...
, Yinghai Lu
, (Mon Sep 15, 1:34 am)
Re: [PATCH] x86-64: fix combining of regions in init_memor ...
, Ingo Molnar
, (Mon Sep 15, 5:51 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate