[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD8of+rxkV85H5RDyzLZowkxUhJxgVuMt7-hjwP1yxYZCNsqUg@mail.gmail.com>
Date: Fri, 4 Mar 2016 21:52:53 +0800
From: Li Zhang <zhlcindy@...il.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: mpe@...erman.id.au,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
aneesh.kumar@...ux.vnet.ibm.com, mgorman@...hsingularity.net,
linuxppc-dev@...ts.ozlabs.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Li Zhang <zhlcindy@...ux.vnet.ibm.com>
Subject: Re: [PATCH RFC 1/2] mm: meminit: initialise more memory for
inode/dentry hash tables in early boot
On Fri, Mar 4, 2016 at 4:48 PM, Vlastimil Babka <vbabka@...e.cz> wrote:
> On 03/03/2016 08:01 AM, Li Zhang wrote:
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -293,13 +293,20 @@ static inline bool update_defer_init(pg_data_t *pgdat,
>> unsigned long pfn, unsigned long zone_end,
>> unsigned long *nr_initialised)
>> {
>> + unsigned long max_initialise;
>> +
>> /* Always populate low zones for address-contrained allocations */
>> if (zone_end < pgdat_end_pfn(pgdat))
>> return true;
>> + /*
>> + * Initialise at least 2G of a node but also take into account that
>> + * two large system hashes that can take up 1GB for 0.25TB/node.
>> + */
>
> The indentation is wrong here.
Thanks for reviewing, I will fix it in next version.
>
>> + max_initialise = max(2UL << (30 - PAGE_SHIFT),
>> + (pgdat->node_spanned_pages >> 8));
>>
>> - /* Initialise at least 2G of the highest zone */
>> (*nr_initialised)++;
>> - if (*nr_initialised > (2UL << (30 - PAGE_SHIFT)) &&
>> + if ((*nr_initialised > max_initialise) &&
>> (pfn & (PAGES_PER_SECTION - 1)) == 0) {
>> pgdat->first_deferred_pfn = pfn;
>> return false;
>>
>
--
Best Regards
-Li
Powered by blists - more mailing lists