[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DA586906BA1FFC4384FCFD6429ECE860316C002A@shzsmsx502.ccr.corp.intel.com>
Date: Tue, 12 Jan 2010 13:51:15 +0800
From: "Zheng, Shaohui" <shaohui.zheng@...el.com>
To: "Wu, Fengguang" <fengguang.wu@...el.com>
CC: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"y-goto@...fujitsu.com" <y-goto@...fujitsu.com>,
Dave Hansen <haveblue@...ibm.com>,
"x86@...nel.org" <x86@...nel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: RE: [PATCH - resend] Memory-Hotplug: Fix the bug on interface
/dev/mem for 64-bit kernel(v1)
> > + /* if add to low memory, update max_low_pfn */
> > + if (unlikely(start_pfn < limit_low_pfn)) {
> > + if (end_pfn <= limit_low_pfn)
> > + max_low_pfn = end_pfn;
> > + else
> > + max_low_pfn = limit_low_pfn;
>
> X86_64 actually always set max_low_pfn=max_pfn, in setup_arch():
> [Zheng, Shaohui] there should be some misunderstanding, I read the
> code carefully, if the total memory is under 4G, it always
> max_low_pfn=max_pfn. If the total memory is larger than 4G,
> max_low_pfn means the end of low ram. It set
> max_low_pfn = e820_end_of_low_ram_pfn();.
The above line is very misleading.. In setup_arch(), it will be
overrode by the following block.
[Zheng, Shaohui] yes, I misunderstand it because of this code. It seems that max_low_pfn == max_pfn is always true on x86_32 and x86_64. Thanks fengguang to point it out.
> 899 #ifdef CONFIG_X86_64
> 900 if (max_pfn > max_low_pfn) {
> 901 max_pfn_mapped = init_memory_mapping(1UL<<32,
> 902 max_pfn<<PAGE_SHIFT);
> 903 /* can we preseve max_low_pfn ?*/
> 904 max_low_pfn = max_pfn;
> 905 }
> 906 #endif
Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists