[RFCv2 9/9] pseries: Automatically resize HPT for memory hot add/remove

Anshuman Khandual khandual at linux.vnet.ibm.com
Mon Feb 1 19:51:46 AEDT 2016


On 01/29/2016 10:54 AM, David Gibson wrote:
>  #ifdef CONFIG_MEMORY_HOTPLUG
> +void resize_hpt_for_hotplug(unsigned long new_mem_size)
> +{
> +	unsigned target_hpt_shift;
> +
> +	if (!ppc_md.resize_hpt)
> +		return;
> +
> +	target_hpt_shift = htab_shift_for_mem_size(new_mem_size);
> +
> +	/*
> +	 * To avoid lots of HPT resizes if memory size is fluctuating
> +	 * across a boundary, we deliberately have some hysterisis


What do you mean by 'memory size is fluctuating across a boundary' ?
Through memory hotplug interface ? Why some one will do that ? I
can understand why we dont have this check in the sysfs debug path
as we would like to test any memory HPT re sizing scenario we want
in any sequence of increase or decrease we want.

Overall the RFC V2 looks pretty good. Looking forward to see the
host side of the code for this feature.



More information about the Linuxppc-dev mailing list