powerpc/mm/pgtable: Split mappings on hot-unplug

Michael Ellerman patch-notifications at ellerman.id.au
Fri Feb 9 15:00:35 AEDT 2018


On Wed, 2018-02-07 at 06:35:51 UTC, Balbir Singh wrote:
> This patch splits the a linear mapping if the hot-unplug range
> is smaller than the mapping size. The code detects if the mapping
> needs to be split into a smaller size and if so, uses the stop
> machine infrastructure to map the current linear mapping with
> a smaller size mapping. Then the requested area is unmapped.
> 
> The code will skip any region of the mapping that overlaps with
> kernel text and warn about it once. We don't want to remove
> a mapping where the kernel text and the LMB we intend to remove
> overlap in the same TLB mapping as it may affect the currently
> executing code (being cautious, we might be able to remove this
> restriction later, see TODOs below)
> 
> I've tested these changes under a kvm guest with 2 vcpus, from
> a split mapping point of view, some of the caveats mentioned
> above applied to the testing I did.
> 
> TODOs:
> 1. Refine the stop machine with an atomic replacement of the
> PMD. The code needs to be refactored to support those changes.
> I intend to publish those changes, but this is a minimal set
> that should be also probably backported to stable
> 
> Signed-off-by: Balbir Singh <bsingharora at gmail.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/4dd5f8a99e791a8c6500e3592f3ce8

cheers


More information about the Linuxppc-dev mailing list