From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4F556D3D.8040400@zytor.com> Date: Mon, 05 Mar 2012 17:49:49 -0800 From: "H. Peter Anvin" MIME-Version: 1.0 To: Yinghai Lu CC: zhenzhong.duan@oracle.com, Takashi Iwai , Linus Torvalds , "Rafael J. Wysocki" , stable@vger.kernel.org, linux-kernel@vger.kernel.org, konrad.wilk@oracle.com, joe.jin@oracle.com, Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH] Initialize max_pfn_mapped as initial ident mapping size for x86_64 References: <1330669703-20176-1-git-send-email-zhenzhong.duan@oracle.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On 03/05/2012 05:35 PM, Yinghai Lu wrote: > > whole history: > before following patch, on x86_64, for low memory (under 4g) pgtable > will be allocated just under TOML > and even those memory is not mapped directly. because now we are using > early_ioremap to access those > page table. > > but looks it has problem with S4 resume. so good_end is set to initial > mapped high address. > (that is 512M). So page table will just below 512M > but crash kernel is allocated below 768M. so will have no chance to > get 512M porting for crashkernel. > > Now your patch just set initial mapping limit to 1g. but according to > arch/x86/kernel/head_64.S > we only have initial mapping to 512M. > > So you can not just simply set to 1G, that will confuse early > memblock allocator. > > We may update find_early_table_space() to use 1G as good_end for > x86_64 that will be less confusing. > This is crazy. All of it. We shouldn't have a bunch of magic memory limits on 64 bits, and trying to add and subtract to them really just makes the pain worse. WHY does it have a problem with S4 resume? S4 is Linux code, so there is a bug here that people keep trying to hack around instead of digging into. The early mapping range we can fix, and probably should. Mapping the first 4 GiB is not a lot of memory and makes a much more sensible starting point. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.