]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/pseries/mobility: use cond_resched when updating device tree
authorNathan Lynch <nathanl@linux.ibm.com>
Fri, 2 Aug 2019 19:29:26 +0000 (14:29 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:41 +0000 (11:55 +0200)
commita529ecdf14a921ba75ff06d437955c362d5b0b86
tree7a15b4adef03b00972068af47d872257e4f0ec0e
parentf15e9f6396758d0631f08ee85b6115c3dc1c4da8
powerpc/pseries/mobility: use cond_resched when updating device tree

BugLink: https://bugs.launchpad.net/bugs/1848274
[ Upstream commit ccfb5bd71d3d1228090a8633800ae7cdf42a94ac ]

After a partition migration, pseries_devicetree_update() processes
changes to the device tree communicated from the platform to
Linux. This is a relatively heavyweight operation, with multiple
device tree searches, memory allocations, and conversations with
partition firmware.

There's a few levels of nested loops which are bounded only by
decisions made by the platform, outside of Linux's control, and indeed
we have seen RCU stalls on large systems while executing this call
graph. Use cond_resched() in these loops so that the cpu is yielded
when needed.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802192926.19277-4-nathanl@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/platforms/pseries/mobility.c