Re: [PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-09-10 Thread Scott Cheloha
On Fri, Aug 21, 2020 at 10:33:10AM +0200, Laurent Dufour wrote: > Le 11/08/2020 à 03:51, Scott Cheloha a écrit : > > > > [...] > > > > @@ -631,7 +638,7 @@ static int dlpar_memory_remove_by_ic(u32 > > lmbs_to_remove, u32 drc_index) > > static int dlpar_add_lmb(struct drmem_lmb *lmb) > > { >

Re: [PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-09-09 Thread Michael Ellerman
On Mon, 10 Aug 2020 20:51:15 -0500, Scott Cheloha wrote: > At memory hot-remove time we can retrieve an LMB's nid from its > corresponding memory_block. There is no need to store the nid > in multiple locations. > > Note that lmb_to_memblock() uses find_memory_block() to get the > corresponding

Re: [PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-08-21 Thread Laurent Dufour
Le 11/08/2020 à 03:51, Scott Cheloha a écrit : At memory hot-remove time we can retrieve an LMB's nid from its corresponding memory_block. There is no need to store the nid in multiple locations. Note that lmb_to_memblock() uses find_memory_block() to get the corresponding memory_block. As

Re: [PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-08-14 Thread Nathan Lynch
Nathan Lynch writes: > I'm satisfied that this change does not reintroduce that problem. The > removal path still derives the node without going to the device tree, > but now performs a more efficient lookup. Er, actually it's slightly less efficient in the remove path, as you note in your

Re: [PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-08-14 Thread Nathan Lynch
Scott Cheloha writes: > At memory hot-remove time we can retrieve an LMB's nid from its > corresponding memory_block. There is no need to store the nid > in multiple locations. > > Note that lmb_to_memblock() uses find_memory_block() to get the > corresponding memory_block. As

[PATCH v3] pseries/drmem: don't cache node id in drmem_lmb struct

2020-08-10 Thread Scott Cheloha
At memory hot-remove time we can retrieve an LMB's nid from its corresponding memory_block. There is no need to store the nid in multiple locations. Note that lmb_to_memblock() uses find_memory_block() to get the corresponding memory_block. As find_memory_block() runs in sub-linear time this