From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754494Ab0ALAds (ORCPT ); Mon, 11 Jan 2010 19:33:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754419Ab0ALAdr (ORCPT ); Mon, 11 Jan 2010 19:33:47 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:45630 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754401Ab0ALAdr (ORCPT ); Mon, 11 Jan 2010 19:33:47 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 12 Jan 2010 09:30:31 +0900 From: KAMEZAWA Hiroyuki To: Wu Fengguang Cc: "Zheng, Shaohui" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "y-goto@jp.fujitsu.com" , Dave Hansen , "x86@kernel.org" Subject: Re: [PATCH - resend] Memory-Hotplug: Fix the bug on interface /dev/mem for 64-bit kernel(v1) Message-Id: <20100112093031.0fc6877f.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100111124303.GA21408@localhost> References: <20100108124851.GB6153@localhost> <20100111124303.GA21408@localhost> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.7.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jan 2010 20:43:03 +0800 Wu Fengguang wrote: > > > + /* 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. > Hmmm....could you rewrite /dev/mem to use kernel/resource.c other than modifing e820 maps. ? Two reasons. - e820map is considerted to be stable, read-only after boot. - We don't need to add more x86 special codes. Thanks, -Kame From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id 649A66B006A for ; Mon, 11 Jan 2010 19:33:55 -0500 (EST) Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o0C0Xj7U013056 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Tue, 12 Jan 2010 09:33:45 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 1D67345DE66 for ; Tue, 12 Jan 2010 09:33:45 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id EC3DD45DE55 for ; Tue, 12 Jan 2010 09:33:44 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id CD0E1EF8005 for ; Tue, 12 Jan 2010 09:33:44 +0900 (JST) Received: from m108.s.css.fujitsu.com (m108.s.css.fujitsu.com [10.249.87.108]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 7E3C41DB803C for ; Tue, 12 Jan 2010 09:33:44 +0900 (JST) Date: Tue, 12 Jan 2010 09:30:31 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH - resend] Memory-Hotplug: Fix the bug on interface /dev/mem for 64-bit kernel(v1) Message-Id: <20100112093031.0fc6877f.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100111124303.GA21408@localhost> References: <20100108124851.GB6153@localhost> <20100111124303.GA21408@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Wu Fengguang Cc: "Zheng, Shaohui" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "y-goto@jp.fujitsu.com" , Dave Hansen , "x86@kernel.org" List-ID: On Mon, 11 Jan 2010 20:43:03 +0800 Wu Fengguang wrote: > > > + /* 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. > Hmmm....could you rewrite /dev/mem to use kernel/resource.c other than modifing e820 maps. ? Two reasons. - e820map is considerted to be stable, read-only after boot. - We don't need to add more x86 special codes. Thanks, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org