[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACZJ9cU81BObhY3RGb9mdhfWxqhNW=JhjSOyUXpizZ-S8hjdEQ@mail.gmail.com>
Date: Thu, 22 Jun 2023 13:06:10 +0800
From: Liam Ni <zhiguangni01@...il.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
akpm@...ux-foundation.org, rppt@...nel.org, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] x86,NUMA:Get the number of ram pages directly in numa_meminfo_cover_memory()
On Thu, 22 Jun 2023 at 01:49, Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 6/15/23 07:20, Liam Ni wrote:
> > In a previous implementation,The ram page is calculated
> > by counting the number of holes,
> > however,the number of ram pages is calculated during hole calculation.
> > Therefore,we can directly calculate the amount of ram pages.
>
> What problem does this patch solve?
I has send patch V2 to improve the execution efficiency of
numa_meminfo_cover_memory()
by optimize the way of calculating missing pages.
patch V2:
https://lore.kernel.org/all/20230619075315.49114-1-zhiguangni01@gmail.com/
In the previous implementation, We calculate missing pages as follows:
1. calculate numaram by traverse all the numa_meminfo's and for each of
them traverse all the regions in memblock.memory to prepare for
counting missing pages.
2. Traverse all the regions in memblock.memory again to get e820ram.
3. the missing page is (e820ram - numaram )
But,it's enough to count memory in memblock.memory that doesn't have
the node assigned.
we only need to traverse memblock.memory **once**.
Powered by blists - more mailing lists