Files
kernel_arpi/kernel
Will Deacon 6ebb3c5057 FROMLIST: sched: Defer wakeup in ttwu() for unschedulable frozen tasks
Asymmetric systems may not offer the same level of userspace ISA support
across all CPUs, meaning that some applications cannot be executed by
some CPUs. As a concrete example, upcoming arm64 big.LITTLE designs do
not feature support for 32-bit applications on both clusters.

Although we take care to prevent explicit hot-unplug of all 32-bit
capable CPUs on such a system, this is required when suspending on some
SoCs where the firmware mandates that the suspend/resume operation is
handled by CPU 0, which may not be capable of running 32-bit tasks.

Consequently, there is a window on the resume path where no 32-bit
capable CPUs are available for scheduling and waking up a 32-bit task
will result in a scheduler BUG() due to failure of select_fallback_rq():

  | kernel BUG at kernel/sched/core.c:2858!
  | Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
  | ...
  | Call trace:
  |  select_fallback_rq+0x4b0/0x4e4
  |  try_to_wake_up.llvm.4388853297126348405+0x460/0x5b0
  |  default_wake_function+0x1c/0x30
  |  autoremove_wake_function+0x1c/0x60
  |  __wake_up_common.llvm.11763074518265335900+0x100/0x1b8
  |  __wake_up+0x78/0xc4
  |  ep_poll_callback+0x20c/0x3fc

Prevent wakeups of unschedulable frozen tasks in ttwu() and instead
defer the wakeup to __thaw_tasks(), which runs only once all the
secondary CPUs are back online.

Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/linux-arch/20210525151432.16875-17-will@kernel.org/
Bug: 186372082
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I5a0531b48d537a79e1926289b5a87edcd7dd78ad
(cherry picked from commit 94155f60a54df82652117b58c124a529556db6be)
2022-02-10 09:29:57 +00:00
..
2022-02-09 08:15:44 +01:00
2022-02-09 08:15:44 +01:00
2022-02-09 08:15:44 +01:00
2021-11-19 15:38:07 +01:00
2022-02-02 09:32:24 +01:00
2021-11-25 10:40:10 +01:00
2022-01-31 12:35:09 +01:00
2022-02-02 09:32:24 +01:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2021-12-02 09:55:34 +01:00
2021-09-08 15:32:34 -07:00
2021-05-07 00:26:33 -07:00
2021-06-18 11:43:09 +02:00
2021-09-28 08:49:54 -07:00
2021-08-11 14:47:16 +02:00
2021-05-07 00:26:34 -07:00
2022-01-19 07:29:34 +01:00