android_kernel_xiaomi_sm8450/arch
Gerald Schaefer dced2c9d66 s390/mm: Add cond_resched() to cmm_alloc/free_pages()
[ Upstream commit 131b8db78558120f58c5dc745ea9655f6b854162 ]

Adding/removing large amount of pages at once to/from the CMM balloon
can result in rcu_sched stalls or workqueue lockups, because of busy
looping w/o cond_resched().

Prevent this by adding a cond_resched(). cmm_free_pages() holds a
spin_lock while looping, so it cannot be added directly to the existing
loop. Instead, introduce a wrapper function that operates on maximum 256
pages at once, and add it there.

Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:08:30 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:21:03 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:23:41 +02:00
arm ARM: versatile: fix OF node leak in CPUs prepare 2024-10-17 15:07:43 +02:00
arm64 arm64: errata: Expand speculative SSBS workaround once more 2024-10-17 15:08:26 +02:00
c6x c6x: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:21 +01:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:12:54 +02:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:23:19 +01:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:12:54 +02:00
ia64 efi: ia64: move IA64-only declarations to new asm/efi.h header 2024-07-18 13:05:50 +02:00
m68k m68k: Fix kernel_clone_args.flags in m68k_clone() 2024-10-17 15:07:44 +02:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-10-17 15:07:35 +02:00
mips MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed 2024-09-12 11:06:49 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:45:37 +02:00
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:17:38 +02:00
parisc parisc: Fix 64-bit userspace syscall path 2024-10-17 15:08:20 +02:00
powerpc powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL 2024-10-17 15:07:31 +02:00
riscv riscv: define ILLEGAL_POINTER_VALUE for 64bit 2024-10-17 15:08:22 +02:00
s390 s390/mm: Add cond_resched() to cmm_alloc/free_pages() 2024-10-17 15:08:30 +02:00
sh Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-16 13:32:07 +02:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-19 05:40:51 +02:00
um um: line: always fill *error_out in setup_one_line() 2024-09-12 11:06:48 +02:00
x86 x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments() 2024-10-17 15:08:13 +02:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:53:31 +02:00
.gitignore
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:23:44 +02:00