lkml.org 
[lkml]   [2012]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 21/46] x86, mm: setup page table in top-down
From
On Tue, Nov 13, 2012 at 9:26 AM, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> 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" <hpa@zytor.com>
>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> 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?


\
 
 \ /
  Last update: 2012-11-13 21:21    [W:0.102 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site