From: Alastair D'Silva Date: Mon, 4 Nov 2019 02:32:58 +0000 (+1100) Subject: powerpc: Don't flush caches when adding memory X-Git-Tag: v5.5-rc1~110^2~77 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ea458effa88e4f4739551d76fe3f702daf607995;p=users%2Fjedix%2Flinux-maple.git powerpc: Don't flush caches when adding memory This operation takes a significant amount of time when hotplugging large amounts of memory (~50 seconds with 890GB of persistent memory). This was orignally in commit fb5924fddf9e ("powerpc/mm: Flush cache on memory hot(un)plug") to support memtrace, but the flush on add is not needed as it is flushed on remove. Signed-off-by: Alastair D'Silva Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-7-alastair@au1.ibm.com --- diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 634e5ea55b6b..7573002077a6 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -142,8 +142,6 @@ int __ref arch_add_memory(int nid, u64 start, u64 size, return -EFAULT; } - flush_dcache_range_chunked(start, start + size, FLUSH_CHUNK_SIZE); - return __add_pages(nid, start_pfn, nr_pages, restrictions); }