Rafael Aquini
a850e932df
mm: vmalloc: add cond_resched() in __vunmap()
...
On non-preemptible kernel builds the watchdog can complain about soft
lockups when vfree() is called against large vmalloc areas:
[ 210.851798] kvmalloc-test: vmalloc(2199023255552) succeeded
[ 238.654842] watchdog: BUG: soft lockup - CPU#181 stuck for 26s! [rmmod:5203]
[ 238.662716] Modules linked in: kvmalloc_test(OE-) ...
[ 238.772671] CPU: 181 PID: 5203 Comm: rmmod Tainted: G S OE 5.13.0-rc7+ #1
[ 238.781413] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS PLYXCRB1.86B.0553.D01.1809190614 09/19/2018
[ 238.792383] RIP: 0010:free_unref_page+0x52/0x60
[ 238.797447] Code: 48 c1 fd 06 48 89 ee e8 9c d0 ff ff 84 c0 74 19 9c 41 5c fa 48 89 ee 48 89 df e8 b9 ea ff ff 41 f7 c4 00 02 00 00 74 01 fb 5b <5d> 41 5c c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f0 29 77
[ 238.818406] RSP: 0018:ffffb4d87868fe98 EFLAGS: 00000206
[ 238.824236] RAX: 0000000000000000 RBX: 000000001da0c945 RCX: ffffb4d87868fe40
[ 238.832200] RDX: ffffd79d3beed108 RSI: ffffd7998501dc08 RDI: ffff9c6fbffd7010
[ 238.840166] RBP: 000000000d518cbd R08: ffffd7998501dc08 R09: 0000000000000001
[ 238.848131] R10: 0000000000000000 R11: ffffd79d3beee088 R12: 0000000000000202
[ 238.856095] R13: ffff9e5be3eceec0 R14: 0000000000000000 R15: 0000000000000000
[ 238.864059] FS: 00007fe082c2d740(0000) GS:ffff9f4c69b40000(0000) knlGS:0000000000000000
[ 238.873089] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 238.879503] CR2: 000055a000611128 CR3: 000000f6094f6006 CR4: 00000000007706e0
[ 238.887467] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 238.895433] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 238.903397] PKRU: 55555554
[ 238.906417] Call Trace:
[ 238.909149] __vunmap+0x17c/0x220
[ 238.912851] __x64_sys_delete_module+0x13a/0x250
[ 238.918008] ? syscall_trace_enter.isra.20+0x13c/0x1b0
[ 238.923746] do_syscall_64+0x39/0x80
[ 238.927740] entry_SYSCALL_64_after_hwframe+0x44/0xae
Like in other range zapping routines that iterate over a large list, lets
just add cond_resched() within __vunmap()'s page-releasing loop in order
to avoid the watchdog splats.
Link: https://lkml.kernel.org/r/20210622225030.478384-1-aquini@redhat.com
Signed-off-by: Rafael Aquini <aquini@redhat.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Aaron Tomlin <atomlin@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-29 10:53:52 -07:00
..
2021-06-29 10:53:46 -07:00
2021-06-29 10:53:46 -07:00
2021-06-29 10:53:48 -07:00
2021-05-07 00:26:35 -07:00
2019-07-12 12:24:03 -07:00
2021-05-05 11:27:21 -07:00
2021-05-05 11:27:24 -07:00
2021-05-05 11:27:24 -07:00
2021-05-05 11:27:24 -07:00
2021-06-29 10:53:50 -07:00
2021-06-29 10:53:47 -07:00
2021-02-24 13:38:27 -08:00
2021-06-29 10:53:52 -07:00
2021-02-26 09:41:02 -08:00
2020-10-13 18:38:29 -07:00
2019-07-12 11:05:43 -07:00
2021-06-29 10:53:50 -07:00
2021-05-05 11:27:27 -07:00
2021-05-05 11:27:26 -07:00
2021-05-05 11:27:26 -07:00
2021-06-29 10:53:48 -07:00
2021-05-07 00:26:35 -07:00
2020-08-12 10:58:02 -07:00
2021-06-16 09:24:42 -07:00
2021-05-05 11:27:22 -07:00
2021-06-24 19:40:54 -07:00
2020-10-16 11:11:16 -07:00
2020-12-15 12:13:39 -08:00
2021-06-29 10:53:49 -07:00
2021-04-30 11:20:38 -07:00
2021-04-30 11:20:39 -07:00
2021-05-14 19:41:32 -07:00
2021-05-05 11:27:26 -07:00
2020-12-15 12:13:46 -08:00
2021-05-07 00:26:35 -07:00
2021-06-29 10:53:47 -07:00
2021-06-29 10:53:52 -07:00
2021-05-05 11:27:23 -07:00
2020-08-12 10:57:59 -07:00
2021-05-07 00:26:35 -07:00
2021-05-05 11:27:27 -07:00
2021-04-16 16:10:37 -07:00
2021-02-22 13:01:23 -08:00
2021-06-29 10:53:50 -07:00
2019-09-24 15:54:08 -07:00
2021-05-05 11:27:27 -07:00
2021-06-24 19:40:54 -07:00
2021-06-29 10:53:52 -07:00
2021-06-29 10:53:52 -07:00
2021-05-05 11:27:27 -07:00
2021-04-30 11:20:37 -07:00
2021-06-29 10:53:52 -07:00
2021-01-24 14:27:16 +01:00
2021-05-05 11:27:27 -07:00
2021-04-30 11:20:42 -07:00
2021-06-29 10:53:47 -07:00
2021-06-29 10:53:51 -07:00
2021-04-16 16:10:36 -07:00
2021-03-25 09:22:55 -07:00
2020-12-15 14:48:04 -08:00
2021-05-07 00:26:35 -07:00
2021-06-29 10:53:52 -07:00
2021-04-30 11:20:37 -07:00
2021-06-29 10:53:50 -07:00
2021-05-07 00:26:35 -07:00
2021-06-29 10:53:45 -07:00
2021-04-30 11:20:38 -07:00
2020-12-15 22:46:19 -08:00
2020-12-15 14:48:03 -08:00
2021-03-02 17:25:46 -07:00
2020-12-15 12:13:45 -08:00
2021-05-07 00:26:35 -07:00
2021-04-30 11:20:36 -07:00
2021-06-29 10:53:47 -07:00
2021-06-29 10:53:47 -07:00
2021-06-24 19:40:53 -07:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:49 -07:00
2021-05-07 00:26:35 -07:00
2020-08-12 10:57:55 -07:00
2021-04-09 13:58:38 +00:00
2021-04-30 11:20:40 -07:00
2021-05-07 00:26:35 -07:00
2021-05-07 00:26:35 -07:00
2021-06-16 09:24:42 -07:00
2021-05-05 11:27:27 -07:00
2021-04-16 16:10:37 -07:00
2021-04-23 10:14:29 +01:00
2021-06-16 09:24:42 -07:00
2020-08-21 09:52:53 -07:00
2021-06-29 10:53:50 -07:00
2021-04-16 16:10:36 -07:00
2021-05-22 15:09:07 -10:00
2021-06-29 10:53:49 -07:00
2021-05-07 00:26:35 -07:00
2021-06-29 10:53:49 -07:00
2021-03-08 14:18:46 -08:00
2021-06-29 10:53:47 -07:00
2020-08-07 11:33:27 -07:00
2021-06-16 09:24:43 -07:00
2020-06-03 20:09:48 -07:00
2021-06-29 10:53:49 -07:00
2021-06-29 10:53:49 -07:00
2021-06-29 10:53:50 -07:00
2021-06-29 10:53:49 -07:00
2021-06-16 09:24:42 -07:00
2020-08-12 10:57:58 -07:00
2021-05-22 15:09:07 -10:00
2021-05-05 11:27:25 -07:00
2020-06-10 19:14:18 -07:00
2021-06-29 10:53:52 -07:00
2020-04-02 09:35:31 -07:00
2021-06-29 10:53:50 -07:00
2021-05-07 00:26:35 -07:00
2021-06-29 10:53:50 -07:00
2021-05-07 00:26:33 -07:00
2021-02-26 09:41:01 -08:00
2021-05-07 00:26:35 -07:00
2021-05-07 00:26:35 -07:00
2021-05-05 11:27:27 -07:00