[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pnf3i188.fsf@linux.ibm.com>
Date: Tue, 28 Jan 2020 17:56:55 -0600
From: Nathan Lynch <nathanl@...ux.ibm.com>
To: Scott Cheloha <cheloha@...ux.ibm.com>
Cc: Nathan Fontenont <ndfont@...il.com>,
Rick Lindsley <ricklind@...ux.vnet.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup
Scott Cheloha <cheloha@...ux.ibm.com> writes:
> LMB lookup is currently an O(n) linear search. This scales poorly when
> there are many LMBs.
>
> If we cache each LMB by both its base address and its DRC index
> in an xarray we can cut lookups to O(log n), greatly accelerating
> drmem initialization and memory hotplug.
>
> This patch introduces two xarrays of of LMBs and fills them during
> drmem initialization. The patch also adds two interfaces for LMB
> lookup.
Good but can you replace the array of LMBs altogether
(drmem_info->lmbs)? xarray allows iteration over the members if needed.
Powered by blists - more mailing lists