Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755725Ab2KMT7m (ORCPT ); Tue, 13 Nov 2012 14:59:42 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:47734 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754864Ab2KMT7l (ORCPT ); Tue, 13 Nov 2012 14:59:41 -0500 MIME-Version: 1.0 In-Reply-To: References: <20121112193044.GA11615@phenom.dumpdata.com> <1352755122-25660-1-git-send-email-yinghai@kernel.org> <1352755122-25660-22-git-send-email-yinghai@kernel.org> Date: Tue, 13 Nov 2012 11:59:40 -0800 X-Google-Sender-Auth: LdVMLHUxWFonFUqtVFLC8zOCp-c Message-ID: Subject: Re: [PATCH 21/46] x86, mm: setup page table in top-down From: Yinghai Lu To: Stefano Stabellini Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jacob Shin , Andrew Morton , Konrad Rzeszutek Wilk , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1897 Lines: 46 On Tue, Nov 13, 2012 at 9:26 AM, Stefano Stabellini wrote: > On Mon, 12 Nov 2012, Yinghai Lu wrote: >> Get pgt_buf early from BRK, and use it to map PMD_SIZE from top at first. >> Then use mapped pages to map more ranges below, and keep looping until >> all pages get mapped. >> >> alloc_low_page will use page from BRK at first, after that buffer is used >> up, will use memblock to find and reserve pages for page table usage. >> >> Introduce min_pfn_mapped to make sure find new pages from mapped ranges, >> that will be updated when lower pages get mapped. >> >> Also add step_size to make sure that don't try to map too big range with >> limited mapped pages initially, and increase the step_size when we have >> more mapped pages on hand. >> >> At last we can get rid of calculation and find early pgt related code. >> >> -v2: update to after fix_xen change, >> also use MACRO for initial pgt_buf size and add comments with it. >> -v3: skip big reserved range in memblock.reserved near end. >> -v4: don't need fix_xen change now. >> >> Suggested-by: "H. Peter Anvin" >> Signed-off-by: Yinghai Lu > > The changes to alloc_low_page and early_alloc_pgt_buf look OK to me. > > The changes to init_mem_mapping are a bit iffy but they aren't too > unreasonable. > Overall the patch is OK even though I would certainly appreciate more > comments and better variable names (real_end?), see below. real_end is not good? xen put big reserved range between real_end and end. that real_end is some kind of end of real usable areas. so change to real_usable_end or usable_end? -- 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/