Re: [PATCH 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-04-18 Thread David Gibson
On Fri, Apr 09, 2021 at 12:31:03AM -0300, Leonardo Bras wrote: > Hello David, thanks for commenting. > > On Tue, 2021-03-23 at 10:45 +1100, David Gibson wrote: > > > @@ -805,6 +808,10 @@ static int resize_hpt_for_hotplug(unsigned long > > > new_mem_size, bool shrinking) > > >   if (shrinking) { >

Re: [PATCH 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-04-08 Thread Leonardo Bras
Hello David, thanks for commenting. On Tue, 2021-03-23 at 10:45 +1100, David Gibson wrote: > > @@ -805,6 +808,10 @@ static int resize_hpt_for_hotplug(unsigned long > > new_mem_size, bool shrinking) > >   if (shrinking) { > > > > + /* When batch removing entries, only resizes HPT at t

Re: [PATCH 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-03-22 Thread David Gibson
On Fri, Mar 12, 2021 at 04:29:41AM -0300, Leonardo Bras wrote: > During memory hotunplug, after each LMB is removed, the HPT may be > resized-down if it would map a max of 4 times the current amount of memory. > (2 shifts, due to introduced histeresis) > > It usually is not an issue, but it can ta

[PATCH 3/3] powerpc/mm/hash: Avoid multiple HPT resize-downs on memory hotunplug

2021-03-11 Thread Leonardo Bras
During memory hotunplug, after each LMB is removed, the HPT may be resized-down if it would map a max of 4 times the current amount of memory. (2 shifts, due to introduced histeresis) It usually is not an issue, but it can take a lot of time if HPT resizing-down fails. This happens because resize