1
0
Fork 0
alistair23-linux/arch/powerpc/platforms
David Hildenbrand e352f576d3 powerpc/pseries/cmm: fix managed page counts when migrating pages between zones
Commit 63341ab037 (virtio-balloon: fix managed page counts when migrating
pages between zones) fixed a long existing BUG in the virtio-balloon
driver when pages would get migrated between zones.  I did not try to
reproduce on powerpc, but looking at the code, the same should apply to
powerpc/cmm ever since it started using the balloon compaction
infrastructure (luckily just recently).

In case we have to migrate a ballon page to a newpage of another zone, the
managed page count of both zones is wrong. Paired with memory offlining
(which will adjust the managed page count), we can trigger kernel crashes
and all kinds of different symptoms.

Fix it by properly adjusting the managed page count when migrating if
the zone changed.

We'll temporarily modify the totalram page count. If this ever becomes a
problem, we can fine tune by providing helpers that don't touch
the totalram pages (e.g., adjust_zone_managed_page_count()).

Fixes: fe030c9b85 ("powerpc/pseries/cmm: Implement balloon compaction")
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191216103058.4958-1-david@redhat.com
2019-12-16 23:15:16 +11:00
..
4xx powerpc: remove the ppc44x ocm.c file 2019-08-27 13:03:33 +10:00
8xx powerpc/8xx: use the fixmapped IMMR in cpm_reset() 2019-11-19 19:38:35 +11:00
40x powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
44x powerpc: remove the ppc44x ocm.c file 2019-08-27 13:03:33 +10:00
52xx compat_ioctl: move WDIOC handling into wdt drivers 2019-10-23 17:23:46 +02:00
82xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
83xx powerpc/sysdev: drop simple gpio 2019-11-21 15:41:34 +11:00
85xx powerpc/sysdev: drop simple gpio 2019-11-21 15:41:34 +11:00
86xx powerpc/sysdev: drop simple gpio 2019-11-21 15:41:34 +11:00
512x treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
amigaone treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cell powerpc/spufs: remove set but not used variable 'ctx' 2019-11-13 16:58:07 +11:00
chrp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
embedded6xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
maple powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
pasemi powerpc/powernv/ioda2: Create bigger default window with 64k IOMMU pages 2019-08-19 13:20:23 +10:00
powermac powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
powernv powerpc/perf: Disable trace_imc pmu 2019-12-05 17:06:40 +11:00
ps3 powerpc updates for 5.4 2019-09-20 11:48:06 -07:00
pseries powerpc/pseries/cmm: fix managed page counts when migrating pages between zones 2019-12-16 23:15:16 +11:00
Kconfig powerpc/sysdev: drop simple gpio 2019-11-21 15:41:34 +11:00
Kconfig.cputype powerpc updates for 5.5 2019-11-30 14:35:43 -08:00
Makefile powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
fsl_uli1575.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00