Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-21 Thread Nathan Lynch
Nathan Lynch writes: > Hi Scott, I've owed you a follow-up on this for a couple weeks, sorry. I see v2 was posted as I was writing this, so I'll follow up on that thread.

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-21 Thread Nathan Lynch
Hi Scott, I've owed you a follow-up on this for a couple weeks, sorry. Beyond the issue of whether to remove the drmem_info->lmbs array, there are some other things to address. Scott Cheloha writes: > diff --git a/arch/powerpc/include/asm/drmem.h > b/arch/powerpc/include/asm/drmem.h > index 3d7

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-05 Thread Fontenot, Nathan
On 2/3/2020 2:13 PM, Scott Cheloha wrote: > On Thu, Jan 30, 2020 at 10:09:32AM -0600, Fontenot, Nathan wrote: >> On 1/29/2020 12:10 PM, Scott Cheloha wrote: >>> On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: Scott Cheloha writes: > LMB lookup is currently an O(n) linear sea

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-04 Thread Scott Cheloha
On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: > Scott Cheloha 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

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-03 Thread Scott Cheloha
On Thu, Jan 30, 2020 at 10:09:32AM -0600, Fontenot, Nathan wrote: > On 1/29/2020 12:10 PM, Scott Cheloha wrote: > > On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: > >> Scott Cheloha writes: > >>> LMB lookup is currently an O(n) linear search. This scales poorly when > >>> there are

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-01-30 Thread Fontenot, Nathan
On 1/29/2020 12:10 PM, Scott Cheloha wrote: > On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: >> Scott Cheloha 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 DR

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-01-29 Thread Scott Cheloha
On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: > Scott Cheloha 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

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-01-28 Thread Nathan Lynch
Scott Cheloha 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.

[PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-01-28 Thread Scott Cheloha
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