James Zhu
c1420a5dd4
drm/amdgpu: fix stall on CPU when allocate large system memory
...
-v2: 1. rename variable to redue confuse
2. optimize the code
-v3: move new define out of the middle of the code
-v4: squash in minmax error fix (Luben)
When applications try to allocate large system (more than > 128GB),
"stall cpu" is reported.
for such large system memory, walk_page_range takes more than 20s usually.
The warning message can be removed when splitting hmm range into smaller
ones which is not more 64GB for each walk_page_range.
[ 164.437617] amdgpu:amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu:1753: amdgpu: create BO VA 0x7f63c7a00000 size 0x2f16000000 domain CPU
[ 164.488847] amdgpu:amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu:1785: amdgpu: creating userptr BO for user_addr = 7f63c7a00000
[ 185.439116] rcu: INFO: rcu_sched self-detected stall on CPU
[ 185.439125] rcu: 8-....: (20999 ticks this GP) idle=e22/1/0x4000000000000000 softirq=2242/2242 fqs=5249
[ 185.439137] (t=21000 jiffies g=6325 q=1215)
[ 185.439141] NMI backtrace for cpu 8
[ 185.439143] CPU: 8 PID: 3470 Comm: kfdtest Kdump: loaded Tainted: G O 5.12.0-0_fbk5_zion_rc1_5697_g2c723fb88626 #1
[ 185.439147] Hardware name: HPE ProLiant XL675d Gen10 Plus/ProLiant XL675d Gen10 Plus, BIOS A47 11/06/2020
[ 185.439150] Call Trace:
[ 185.439153] <IRQ>
[ 185.439157] dump_stack+0x64/0x7c
[ 185.439163] nmi_cpu_backtrace.cold.7+0x30/0x65
[ 185.439165] ? lapic_can_unplug_cpu+0x70/0x70
[ 185.439170] nmi_trigger_cpumask_backtrace+0xf9/0x100
[ 185.439174] rcu_dump_cpu_stacks+0xc5/0xf5
[ 185.439178] rcu_sched_clock_irq.cold.97+0x112/0x38c
[ 185.439182] ? tick_sched_handle.isra.21+0x50/0x50
[ 185.439185] update_process_times+0x8c/0xc0
[ 185.439189] tick_sched_timer+0x63/0x70
[ 185.439192] __hrtimer_run_queues+0xff/0x250
[ 185.439195] hrtimer_interrupt+0xf4/0x200
[ 185.439199] __sysvec_apic_timer_interrupt+0x51/0xd0
[ 185.439201] sysvec_apic_timer_interrupt+0x69/0x90
[ 185.439206] </IRQ>
[ 185.439207] asm_sysvec_apic_timer_interrupt+0x12/0x20
[ 185.439211] RIP: 0010:clear_page_rep+0x7/0x10
[ 185.439214] Code: e8 fe 7c 51 00 44 89 e2 48 89 ee 48 89 df e8 60 ff ff ff c6 03 00 5b 5d 41 5c c3 cc cc cc cc cc cc cc cc b9 00 02 00 00 31 c0 <f3> 48 ab c3 0f 1f 44 00 00 31 c0 b9 40 00 00 00 66 0f 1f 84 00 00
[ 185.439218] RSP: 0018:ffffc9000f58f818 EFLAGS: 00000246
[ 185.439220] RAX: 0000000000000000 RBX: 0000000000000881 RCX: 000000000000005c
[ 185.439223] RDX: 0000000000100dca RSI: 0000000000000000 RDI: ffff88a59e0e5d20
[ 185.439225] RBP: ffffea0096783940 R08: ffff888118c35280 R09: ffffea0096783940
[ 185.439227] R10: ffff888000000000 R11: 0000160000000000 R12: ffffea0096783980
[ 185.439228] R13: ffffea0096783940 R14: ffff88b07fdfdd00 R15: 0000000000000000
[ 185.439232] prep_new_page+0x81/0xc0
[ 185.439236] get_page_from_freelist+0x13be/0x16f0
[ 185.439240] ? release_pages+0x16a/0x4a0
[ 185.439244] __alloc_pages_nodemask+0x1ae/0x340
[ 185.439247] alloc_pages_vma+0x74/0x1e0
[ 185.439251] __handle_mm_fault+0xafe/0x1360
[ 185.439255] handle_mm_fault+0xc3/0x280
[ 185.439257] hmm_vma_fault.isra.22+0x49/0x90
[ 185.439261] __walk_page_range+0x692/0x9b0
[ 185.439265] walk_page_range+0x9b/0x120
[ 185.439269] hmm_range_fault+0x4f/0x90
[ 185.439274] amdgpu_hmm_range_get_pages+0x24f/0x260 [amdgpu]
[ 185.439463] amdgpu_ttm_tt_get_user_pages+0xc2/0x190 [amdgpu]
[ 185.439603] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x49f/0x7a0 [amdgpu]
[ 185.439774] kfd_ioctl_alloc_memory_of_gpu+0xfb/0x410 [amdgpu]
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-11-29 11:03:35 -05:00
..
2021-03-10 00:01:34 -05:00
2022-08-10 15:07:14 -04:00
2021-04-09 16:46:26 -04:00
2022-07-28 16:05:16 -04:00
2022-11-15 11:51:45 -05:00
2022-11-17 18:08:52 -05:00
2022-02-09 16:57:51 -05:00
2021-11-17 16:58:01 -05:00
2022-07-28 16:05:14 -04:00
2022-05-13 07:20:07 -07:00
2022-05-13 07:20:07 -07:00
2022-11-04 16:05:53 -04:00
2022-02-09 16:57:51 -05:00
2022-03-04 13:03:30 -05:00
2022-02-09 16:57:51 -05:00
2022-10-18 22:13:24 -04:00
2022-11-17 00:23:36 -05:00
2022-11-16 07:17:32 +10:00
2022-10-27 15:12:09 -04:00
2022-01-14 17:51:15 -05:00
2022-01-14 17:51:15 -05:00
2022-11-10 15:29:40 -05:00
2022-04-28 17:47:52 -04:00
2021-12-13 16:32:34 -05:00
2022-02-23 14:02:51 -05:00
2022-04-28 17:48:32 -04:00
2022-11-17 00:23:30 -05:00
2022-11-17 00:23:30 -05:00
2022-11-23 10:31:31 -05:00
2022-11-22 13:41:11 +10:00
2022-11-03 12:45:20 +01:00
2022-02-07 17:14:10 -05:00
2022-10-21 15:44:56 -04:00
2022-09-13 14:33:01 -04:00
2022-11-15 11:51:45 -05:00
2021-10-05 12:22:36 -04:00
2022-11-23 10:31:31 -05:00
2022-04-08 17:24:24 -04:00
2022-11-23 10:31:30 -05:00
2022-04-28 17:47:43 -04:00
2022-11-22 13:41:11 +10:00
2022-11-15 11:51:36 -05:00
2022-11-09 17:41:42 -05:00
2021-05-26 20:56:23 +02:00
2022-05-04 10:43:53 -04:00
2022-11-23 09:47:15 -05:00
2021-12-13 16:32:34 -05:00
2022-11-17 18:06:58 -05:00
2021-07-01 00:24:41 -04:00
2021-12-07 13:13:07 -05:00
2022-05-26 14:56:34 -04:00
2021-05-05 09:26:53 +02:00
2022-09-29 09:41:46 -04:00
2022-11-17 18:07:26 -05:00
2021-06-07 14:57:32 -04:00
2022-02-07 18:01:16 -05:00
2022-01-19 22:32:47 -05:00
2022-11-17 00:23:36 -05:00
2022-11-09 17:41:42 -05:00
2022-09-30 16:58:23 -04:00
2022-08-16 18:14:31 -04:00
2022-11-23 09:47:12 -05:00
2022-08-16 18:14:31 -04:00
2022-10-27 11:42:58 +02:00
2022-04-08 17:24:24 -04:00
2022-11-29 11:03:35 -05:00
2022-11-17 00:23:43 -05:00
2021-08-11 17:19:54 -04:00
2022-11-03 12:45:20 +01:00
2022-11-03 12:45:19 +01:00
2022-11-03 12:45:19 +01:00
2022-06-23 17:23:13 -04:00
2021-12-01 16:03:34 -05:00
2022-06-03 16:44:15 -04:00
2021-12-13 16:34:27 -05:00
2022-11-15 11:51:36 -05:00
2021-08-10 20:00:44 +02:00
2022-11-23 10:31:25 -05:00
2022-11-03 12:45:20 +01:00
2022-11-22 13:41:11 +10:00
2022-11-17 18:08:14 -05:00
2022-11-16 07:17:32 +10:00
2022-05-10 17:53:11 -04:00
2022-05-10 17:53:12 -04:00
2022-03-02 18:40:06 -05:00
2022-03-02 18:40:06 -05:00
2022-06-28 11:24:05 -04:00
2022-09-14 15:00:34 -04:00
2022-10-27 15:12:08 -04:00
2022-05-04 09:57:18 -04:00
2022-11-05 17:12:04 +01:00
2022-03-02 18:40:06 -05:00
2022-05-04 09:52:44 -04:00
2022-10-27 11:42:58 +02:00
2022-05-26 14:56:34 -04:00
2021-12-13 16:32:34 -05:00
2021-08-24 15:35:25 -04:00
2021-12-13 16:33:16 -05:00
2022-02-14 15:05:39 +01:00
2022-10-27 15:12:08 -04:00
2022-10-27 15:12:08 -04:00
2022-11-23 09:47:13 -05:00
2022-11-17 18:09:16 -05:00
2021-08-18 18:22:53 -04:00
2022-11-17 18:07:33 -05:00
2022-03-15 14:25:16 -04:00
2022-11-17 18:07:58 -05:00
2022-06-03 16:44:15 -04:00
2022-10-27 11:42:58 +02:00
2022-10-18 22:08:33 -04:00
2022-10-18 22:08:33 -04:00
2022-10-18 22:08:25 -04:00
2022-06-28 11:24:24 -04:00
2022-09-30 16:59:00 -04:00
2022-09-30 16:59:00 -04:00
2021-09-01 16:55:11 -04:00
2022-10-10 17:32:56 -04:00
2022-10-10 17:32:56 -04:00
2022-10-27 15:12:08 -04:00
2022-04-08 17:24:24 -04:00
2022-11-03 12:45:20 +01:00
2022-11-03 12:45:20 +01:00
2022-03-04 13:03:30 -05:00
2022-10-27 11:42:58 +02:00
2022-11-22 13:41:11 +10:00
2022-11-17 00:23:30 -05:00
2022-10-24 14:34:47 -04:00
2022-10-17 17:41:19 -04:00
2022-10-27 15:12:08 -04:00
2022-10-27 15:12:08 -04:00
2021-09-01 16:55:11 -04:00
2022-11-03 12:45:20 +01:00
2022-03-04 13:03:30 -05:00
2022-11-03 12:45:20 +01:00
2022-03-04 13:03:30 -05:00
2022-11-22 13:41:11 +10:00
2022-11-17 18:08:05 -05:00
2022-11-04 16:05:53 -04:00
2022-11-04 16:05:53 -04:00
2022-11-15 11:51:36 -05:00
2021-12-01 16:02:57 -05:00
2022-04-07 12:53:54 +02:00
2022-11-09 17:41:41 -05:00
2022-11-05 16:08:36 +01:00
2022-11-09 17:41:41 -05:00
2022-11-09 17:41:41 -05:00
2022-10-27 11:42:58 +02:00
2022-07-15 15:41:51 +02:00
2022-09-19 15:07:54 -04:00
2022-09-19 15:17:20 -04:00
2022-11-17 00:23:36 -05:00
2022-10-24 14:34:47 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-08-16 18:06:00 -04:00
2022-05-04 09:57:10 -04:00
2022-02-07 13:04:25 -08:00
2021-06-01 22:55:39 -04:00
2021-08-24 15:35:25 -04:00
2022-04-25 11:17:45 +02:00
2022-11-04 16:05:53 -04:00
2021-05-19 23:50:27 -04:00
2022-10-10 17:32:56 -04:00
2022-02-17 15:59:05 -05:00
2022-06-28 11:23:32 -04:00
2021-05-19 23:50:27 -04:00
2022-11-22 13:41:11 +10:00
2022-11-22 13:41:11 +10:00
2022-11-22 13:41:11 +10:00
2022-11-22 13:41:11 +10:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-05-06 16:57:21 -04:00
2022-05-06 16:57:21 -04:00
2022-11-04 16:05:53 -04:00
2022-11-04 16:05:53 -04:00
2022-03-25 12:40:26 -04:00
2022-01-14 17:51:59 -05:00
2022-01-14 17:51:59 -05:00
2022-01-14 17:51:59 -05:00
2022-11-04 16:05:53 -04:00
2022-11-15 11:51:15 -05:00
2022-05-04 10:43:54 -04:00
2021-12-14 17:50:36 -05:00
2021-11-03 12:22:07 -04:00
2022-05-04 09:57:22 -04:00
2022-11-04 16:05:53 -04:00
2022-11-15 11:51:15 -05:00
2022-08-30 16:36:54 -04:00
2022-07-28 16:19:59 -04:00
2022-05-04 09:57:13 -04:00
2022-01-19 22:32:47 -05:00
2022-03-25 12:40:24 -04:00
2022-04-08 17:24:24 -04:00
2022-11-09 17:41:42 -05:00
2022-11-22 13:41:11 +10:00
2022-11-15 13:35:15 -05:00
2022-05-04 09:57:26 -04:00
2022-04-08 17:24:24 -04:00
2022-01-14 17:51:59 -05:00
2022-04-08 17:24:24 -04:00
2022-08-16 18:05:54 -04:00
2022-05-06 10:36:13 -04:00
2022-05-05 16:51:21 -04:00
2022-05-04 09:53:58 -04:00
2022-05-04 09:53:18 -04:00
2022-09-01 15:11:31 -04:00
2022-05-04 09:53:12 -04:00
2022-09-13 14:33:01 -04:00
2022-08-30 16:37:14 -04:00
2022-08-30 16:37:14 -04:00
2022-05-04 10:43:54 -04:00
2021-04-09 16:44:56 -04:00
2022-06-08 11:43:55 -04:00
2022-06-08 11:43:55 -04:00
2022-11-17 18:08:14 -05:00
2022-03-28 12:54:39 -04:00
2022-05-04 10:03:27 -04:00
2022-11-17 18:08:46 -05:00
2022-11-17 18:08:27 -05:00
2022-11-10 15:29:00 -05:00
2022-05-10 17:53:12 -04:00
2022-05-10 17:53:11 -04:00
2022-11-17 00:23:36 -05:00
2022-03-02 18:40:06 -05:00
2021-08-24 15:36:18 -04:00
2022-11-04 16:05:53 -04:00
2022-11-15 11:51:15 -05:00
2022-05-04 10:43:54 -04:00
2022-08-25 13:54:35 -04:00
2022-01-14 17:51:59 -05:00
2022-04-08 17:24:24 -04:00
2022-01-14 17:51:59 -05:00
2022-10-24 14:34:26 -04:00
2022-05-04 09:57:22 -04:00
2022-08-16 18:05:46 -04:00
2022-06-03 16:44:15 -04:00
2022-06-14 21:38:40 -04:00
2022-05-05 16:51:48 -04:00
2022-09-01 15:11:35 -04:00
2022-05-04 09:57:18 -04:00
2022-08-25 13:53:58 -04:00
2022-01-14 17:51:59 -05:00
2021-08-18 18:22:25 -04:00
2022-11-23 09:47:15 -05:00
2022-10-18 22:08:33 -04:00
2022-01-07 17:19:34 -05:00
2022-10-18 22:08:33 -04:00
2021-08-16 15:17:57 -04:00
2022-10-18 22:08:33 -04:00
2022-08-16 18:14:31 -04:00
2022-09-13 14:25:39 -04:00
2022-07-18 16:42:18 -04:00
2022-09-01 15:11:00 -04:00
2022-09-01 15:11:00 -04:00
2022-09-13 14:25:39 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-09-13 14:25:39 -04:00
2022-07-18 16:41:55 -04:00
2022-09-13 14:32:58 -04:00
2022-05-06 10:36:13 -04:00
2022-06-01 15:56:49 -04:00
2021-10-20 11:43:57 -04:00
2022-03-22 10:53:39 -04:00
2022-07-25 09:31:04 -04:00
2022-11-17 18:09:16 -05:00
2022-11-17 18:09:16 -05:00
2022-11-17 18:09:16 -05:00
2021-07-23 10:08:01 -04:00
2022-11-17 18:09:16 -05:00
2022-11-17 18:09:16 -05:00
2022-11-17 18:09:16 -05:00
2022-07-29 15:24:38 -04:00
2022-11-17 18:09:16 -05:00
2021-03-23 22:51:54 -04:00
2022-10-10 17:32:56 -04:00
2022-10-10 17:32:56 -04:00
2022-10-24 14:34:47 -04:00
2022-01-18 17:24:18 -05:00
2022-01-14 17:52:00 -05:00
2022-10-10 17:32:56 -04:00
2022-10-10 17:32:56 -04:00
2022-05-04 10:43:55 -04:00
2022-11-01 11:45:50 -04:00
2022-05-04 10:43:55 -04:00
2022-10-17 17:41:20 -04:00
2021-05-19 23:50:27 -04:00
2022-02-17 15:59:05 -05:00
2022-10-18 22:08:40 -04:00
2022-08-16 18:14:31 -04:00
2022-02-07 17:59:53 -05:00
2022-01-27 15:49:48 -05:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-04-08 17:24:24 -04:00
2022-05-04 09:54:38 -04:00
2022-05-04 09:54:38 -04:00
2022-04-08 17:24:24 -04:00
2021-03-23 22:52:38 -04:00
2022-04-28 17:48:35 -04:00
2022-10-24 14:34:47 -04:00
2021-10-20 11:43:57 -04:00
2022-11-09 17:41:42 -05:00
2022-04-28 17:48:40 -04:00
2022-01-18 17:22:36 -05:00
2021-03-23 23:27:41 -04:00
2021-08-18 18:22:24 -04:00
2021-05-19 23:50:27 -04:00
2022-10-11 11:04:55 -04:00
2022-01-14 17:51:59 -05:00
2022-10-17 17:41:21 -04:00
2022-10-17 17:41:21 -04:00
2022-10-11 11:05:23 -04:00
2022-01-14 17:51:59 -05:00
2022-11-15 13:35:15 -05:00
2022-11-15 13:35:15 -05:00
2021-09-23 15:17:29 -04:00
2021-09-23 15:17:29 -04:00
2022-04-08 17:24:24 -04:00
2022-11-03 12:45:20 +01:00
2022-11-03 12:45:20 +01:00
2021-09-23 15:17:29 -04:00
2022-04-08 17:24:24 -04:00
2022-05-04 10:03:27 -04:00
2022-05-10 17:53:13 -04:00
2022-05-06 16:57:36 -04:00
2022-03-25 12:40:24 -04:00
2022-05-04 10:43:56 -04:00
2022-11-23 10:31:31 -05:00
2022-03-28 12:54:39 -04:00
2022-09-19 15:18:28 -04:00
2022-05-06 16:57:44 -04:00
2022-11-23 09:47:15 -05:00
2022-11-17 18:08:20 -05:00
2022-09-14 14:21:25 -04:00
2022-10-17 17:41:19 -04:00
2022-11-15 11:51:32 -05:00