Chen Yu
db6cc3f4ac
Revert "sched/numa: add statistics of numa balance task"
...
This reverts commit ad6b26b6a0a79166b53209df2ca1cf8636296382.
This commit introduces per-memcg/task NUMA balance statistics, but
unfortunately it introduced a NULL pointer exception due to the following
race condition: After a swap task candidate was chosen, its mm_struct
pointer was set to NULL due to task exit. Later, when performing the
actual task swapping, the p->mm caused the problem.
CPU0 CPU1
:
...
task_numa_migrate
task_numa_find_cpu
task_numa_compare
# a normal task p is chosen
env->best_task = p
# p exit:
exit_signals(p);
p->flags |= PF_EXITING
exit_mm
p->mm = NULL;
migrate_swap_stop
__migrate_swap_task((arg->src_task, arg->dst_cpu)
count_memcg_event_mm(p->mm, NUMA_TASK_SWAP)# p->mm is NULL
task_lock() should be held and the PF_EXITING flag needs to be checked to
prevent this from happening. After discussion, the conclusion was that
adding a lock is not worthwhile for some statistics calculations. Revert
the change and rely on the tracepoint for this purpose.
Link: https://lkml.kernel.org/r/20250704135620.685752-1-yu.c.chen@intel.com
Link: https://lkml.kernel.org/r/20250708064917.BBD13C4CEED@smtp.kernel.org
Fixes: ad6b26b6a0a7 ("sched/numa: add statistics of numa balance task")
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Reported-by: Jirka Hladky <jhladky@redhat.com>
Closes: https://lore.kernel.org/all/CAE4VaGBLJxpd=NeRJXpSCuw=REhC5LWJpC29kDy-Zh2ZDyzQZA@mail.gmail.com/
Reported-by: Srikanth Aithal <Srikanth.Aithal@amd.com>
Reported-by: Suneeth D <Suneeth.D@amd.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Hladky <jhladky@redhat.com>
Cc: Libo Chen <libo.chen@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-07-09 21:07:56 -07:00
..
2025-05-07 11:25:02 +02:00
2025-05-21 14:33:28 +02:00
2025-04-03 21:35:32 +02:00
2025-04-25 15:53:19 +02:00
2025-04-28 09:30:41 +02:00
2025-05-09 23:09:01 +02:00
2025-05-08 19:43:51 -07:00
2025-05-27 15:22:01 -07:00
2025-05-11 17:54:10 -07:00
2025-05-21 14:20:31 +01:00
2025-05-22 10:03:55 -06:00
2025-06-05 08:49:30 -07:00
2025-06-03 09:46:41 +01:00
2025-05-05 11:44:37 -04:00
2025-05-14 16:59:17 +02:00
2025-06-29 22:10:47 +01:00
2025-05-09 11:35:43 -07:00
2025-04-30 12:55:59 +01:00
2025-04-11 17:18:03 +05:30
2025-05-21 10:09:47 +02:00
2025-06-30 13:42:11 +03:00
2025-06-05 14:03:07 -07:00
2025-05-19 11:41:43 +01:00
2025-05-31 19:12:53 -07:00
2025-06-25 23:38:33 +02:00
2025-06-05 08:07:24 -07:00
2025-06-29 22:10:52 +01:00
2025-06-03 16:13:32 -07:00
2025-06-24 15:42:55 +01:00
2025-06-03 08:39:20 -07:00
2025-05-21 11:34:06 +01:00
2025-05-25 00:53:48 -07:00
2025-05-07 21:56:55 +02:00
2025-06-09 11:24:43 +01:00
2025-05-08 13:35:22 +01:00
2025-05-23 16:30:55 +00:00
2025-06-17 18:42:44 -07:00
2025-04-15 15:20:37 +02:00
2025-04-17 20:10:08 -07:00
2025-04-10 10:39:03 +01:00
2025-05-20 08:44:33 +02:00
2025-04-21 10:27:59 +02:00
2025-06-13 06:19:34 -06:00
2025-04-29 15:58:38 -04:00
2025-04-29 15:58:38 -04:00
2025-04-29 15:58:38 -04:00
2025-04-29 15:58:38 -04:00
2025-05-13 12:08:27 -06:00
2025-05-07 07:31:07 -06:00
2025-06-03 15:54:46 -07:00
2025-05-27 14:09:12 -07:00
2025-05-28 15:52:42 -07:00
2025-05-19 08:17:08 -07:00
2025-04-17 10:50:55 -07:00
2025-04-22 18:16:08 +02:00
2025-04-29 15:58:38 -04:00
2025-06-13 06:20:17 -06:00
2025-05-19 10:30:02 -10:00
2025-05-27 20:59:53 -07:00
2025-04-09 20:47:29 +02:00
2025-06-05 22:02:23 -07:00
2025-05-31 19:12:53 -07:00
2025-05-08 09:42:06 -07:00
2025-04-29 15:58:38 -04:00
2025-04-25 11:44:35 +02:00
2025-05-21 13:41:03 +02:00
2025-05-21 13:39:45 +02:00
2025-05-02 14:28:47 +02:00
2025-05-14 11:56:17 +01:00
2025-06-07 14:22:56 +02:00
2025-05-07 21:17:56 +02:00
2025-05-08 21:50:19 +02:00
2025-06-03 07:39:23 -07:00
2025-05-12 23:50:33 -07:00
2025-05-21 10:48:21 -07:00
2025-05-21 10:48:21 -07:00
2025-05-13 20:37:16 -07:00
2025-05-28 15:24:36 -07:00
2025-05-05 18:20:45 +08:00
2025-05-12 23:50:29 -07:00
2025-05-26 08:02:43 -07:00
2025-04-11 18:58:10 -07:00
2025-04-21 10:27:59 +02:00
2025-05-04 11:35:05 +02:00
2025-04-28 09:30:40 +02:00
2025-05-28 15:52:42 -07:00
2025-05-05 13:29:44 -04:00
2025-05-06 08:36:53 +02:00
2025-05-27 20:09:06 -07:00
2025-05-20 05:34:27 +02:00
2025-05-23 13:24:53 -07:00
2025-04-17 10:56:11 +02:00
2025-05-13 14:34:18 +02:00
2025-04-29 08:27:10 +02:00
2025-05-22 15:32:00 +02:00
2025-06-11 11:20:52 +02:00
2025-05-25 18:12:14 +09:00
2025-05-30 07:30:47 +02:00
2025-05-06 15:46:54 +00:00
2025-05-19 22:46:34 +02:00
2025-04-10 10:39:14 +01:00
2025-04-22 18:16:09 +02:00
2025-04-08 10:28:07 +02:00
2025-05-15 20:24:40 +02:00
2025-05-21 14:34:38 +02:00
2025-04-21 10:27:59 +02:00
2025-07-04 09:06:49 -07:00
2025-05-21 14:35:34 +02:00
2025-05-29 10:34:26 -07:00
2025-06-06 18:05:18 -07:00
2025-06-23 14:50:37 +02:00
2025-04-15 18:10:57 +02:00
2025-05-22 14:55:37 -07:00
2025-05-21 14:21:34 +01:00
2025-05-13 15:59:03 +02:00
2025-04-10 10:50:57 +02:00
2025-05-30 08:40:25 -07:00
2025-05-12 06:06:42 -04:00
2025-05-12 06:06:42 -04:00
2025-04-05 10:30:17 +02:00
2025-04-09 21:00:42 +02:00
2025-05-12 23:50:34 -07:00
2025-06-05 22:02:24 -07:00
2025-05-11 17:54:07 -07:00
2025-06-03 08:39:20 -07:00
2025-05-22 11:07:05 +02:00
2025-05-19 22:23:57 +02:00
2025-05-20 22:49:39 +02:00
2025-04-01 18:03:46 -07:00
2025-06-17 14:29:19 +02:00
2025-04-29 15:54:54 -04:00
2025-05-27 08:25:42 +02:00
2025-05-08 16:03:37 +03:00
2025-04-15 14:13:36 +03:00
2025-04-15 14:13:36 +03:00
2025-04-24 14:31:03 +02:00
2025-05-17 18:47:18 -06:00
2025-05-20 15:04:13 +01:00
2025-05-01 09:43:48 -07:00
2025-05-28 09:26:07 +02:00
2025-05-30 10:44:20 -07:00
2025-05-07 17:25:48 -05:00
2025-05-27 08:00:46 -07:00
2025-05-27 08:15:26 -07:00
2025-05-20 10:31:12 -04:00
2025-04-30 09:06:23 +02:00
2025-05-11 17:54:06 -07:00
2025-05-12 23:50:40 -07:00
2025-05-31 19:12:53 -07:00
2025-06-11 11:57:14 -07:00
2025-05-22 14:55:38 -07:00
2025-06-25 15:55:03 -07:00
2025-05-28 06:29:17 -04:00
2025-04-10 10:39:10 +01:00
2025-05-14 09:25:09 +01:00
2025-04-10 10:39:13 +01:00
2025-06-10 14:08:24 +02:00
2025-05-11 17:54:14 -07:00
2025-05-14 13:16:24 +02:00
2025-05-27 19:40:34 -07:00
2025-04-23 09:04:56 -07:00
2025-04-11 17:32:35 -07:00
2025-05-26 16:23:39 -05:00
2025-05-11 17:48:29 -07:00
2025-05-27 17:35:25 -07:00
2025-05-12 23:50:39 -07:00
2025-05-31 22:46:08 -07:00
2025-05-11 17:48:07 -07:00
2025-05-21 09:55:15 -07:00
2025-05-13 10:23:24 +02:00
2025-04-07 07:36:33 -04:00
2025-05-22 14:55:37 -07:00
2025-06-02 16:00:26 -07:00
2025-07-09 21:07:55 -07:00
2025-05-20 22:49:38 -07:00
2025-05-31 15:44:16 -07:00
2025-05-31 22:46:13 -07:00
2025-06-02 16:00:26 -07:00
2025-06-06 12:45:35 -07:00
2025-06-11 11:20:51 +02:00
2025-06-23 14:01:49 -04:00
2025-05-16 17:53:48 -07:00
2025-05-16 21:32:20 +02:00
2025-05-27 12:16:41 -04:00
2025-05-26 08:02:43 -07:00
2025-05-22 15:32:00 +02:00
2025-05-28 15:24:36 -07:00
2025-05-23 13:57:12 +02:00
2025-05-27 08:25:43 +02:00
2025-05-23 13:57:13 +02:00
2025-07-01 22:37:14 +02:00
2025-05-19 16:06:42 -07:00
2025-05-28 17:17:13 -04:00
2025-05-28 17:17:13 -04:00
2025-04-02 17:06:31 -07:00
2025-04-13 16:39:42 -04:00
2025-05-28 17:17:14 -04:00
2025-05-13 11:40:04 -04:00
2025-05-22 14:55:36 -07:00
2025-06-04 09:51:10 +02:00
2025-05-21 14:28:27 +02:00
2025-05-05 16:17:40 -05:00
2025-05-11 17:54:13 -07:00
2025-06-01 08:41:11 -07:00
2025-04-01 15:14:42 -07:00
2025-05-09 13:43:07 +01:00
2025-05-12 23:50:49 -07:00
2025-05-31 15:44:16 -07:00
2025-05-31 22:46:13 -07:00
2025-06-02 15:31:05 -07:00
2025-04-01 22:25:56 +02:00
2025-05-10 16:11:49 +08:00
2025-05-22 20:30:34 +02:00
2025-05-30 12:21:57 -05:00
2025-05-28 16:47:56 -05:00
2025-05-28 16:15:40 -05:00
2025-05-06 08:36:53 +02:00
2025-06-04 11:26:17 -07:00
2025-05-21 16:46:37 +02:00
2025-05-12 23:50:31 -07:00
2025-04-07 09:37:16 +02:00
2025-05-25 00:53:48 -07:00
2025-06-05 14:37:53 +02:00
2025-05-11 17:26:06 -07:00
2025-05-22 14:55:37 -07:00
2025-05-20 18:17:43 -07:00
2025-05-27 17:35:25 -07:00
2025-04-22 18:21:53 -07:00
2025-04-26 08:28:03 +02:00
2025-05-21 13:59:12 +02:00
2025-04-23 10:08:34 +02:00
2025-05-02 11:03:18 +05:30
2025-06-04 11:26:17 -07:00
2025-04-25 16:02:29 +02:00
2025-04-14 16:30:29 -07:00
2025-05-29 10:19:22 -07:00
2025-06-06 11:50:47 -07:00
2025-04-07 13:22:26 +08:00
2025-05-11 17:48:19 -07:00
2025-04-15 20:20:58 -07:00
2025-04-24 16:43:54 +02:00
2025-05-08 16:13:27 -07:00
2025-05-08 16:13:27 -07:00
2025-05-03 12:02:04 +02:00
2025-05-22 13:11:50 +01:00
2025-05-11 17:54:09 -07:00
2025-05-16 12:10:20 +02:00
2025-06-16 21:06:12 +02:00
2025-05-05 15:16:50 +02:00
2025-05-08 20:29:07 +02:00
2025-05-09 15:19:10 -04:00
2025-05-11 17:54:09 -07:00
2025-05-12 23:50:45 -07:00
2025-05-06 11:11:45 -06:00
2025-04-07 11:13:39 -07:00
2025-04-25 15:53:59 +02:00
2025-06-11 22:42:35 -07:00
2025-07-09 21:07:56 -07:00
2025-04-14 10:21:27 +01:00
2025-04-07 11:02:07 +02:00
2025-04-22 15:34:58 -04:00
2025-05-11 17:54:08 -07:00
2025-04-25 13:46:31 +02:00
2025-04-07 09:36:49 +02:00
2025-05-13 11:12:48 +02:00
2025-05-21 15:40:17 -07:00
2025-05-23 08:49:16 +01:00
2025-04-10 18:34:05 -07:00
2025-05-11 17:54:12 -07:00
2025-05-07 14:25:30 -07:00
2025-05-02 18:25:08 -07:00
2025-04-07 15:07:56 +01:00
2025-06-26 20:39:34 +02:00
2025-05-12 23:50:35 -07:00
2025-04-15 18:46:10 +02:00
2025-05-15 11:30:08 -07:00
2025-04-17 12:21:45 +03:00
2025-05-13 16:38:03 +02:00
2025-06-04 11:27:11 +02:00
2025-04-28 11:17:29 +02:00
2025-06-08 09:07:37 +02:00
2025-06-03 07:39:23 -07:00
2025-04-10 16:20:06 +02:00
2025-05-15 04:49:15 +03:00
2025-05-14 11:19:32 -04:00
2025-05-08 19:17:33 -07:00
2025-05-02 12:52:16 -07:00
2025-04-25 13:44:28 +02:00
2025-04-04 15:44:16 +02:00
2025-05-11 17:54:06 -07:00
2025-05-07 11:21:35 +01:00
2025-05-02 10:54:37 -07:00
2025-06-02 16:00:26 -07:00
2025-04-30 21:53:35 +02:00
2025-05-11 17:48:18 -07:00
2025-06-19 12:36:19 +02:00
2025-05-31 19:12:53 -07:00
2025-05-08 09:42:06 -07:00
2025-05-28 03:19:03 -04:00
2025-05-26 19:04:21 +02:00
2025-04-18 10:05:49 -04:00
2025-07-09 21:07:56 -07:00
2025-05-28 14:55:35 -07:00
2025-05-27 20:49:06 -07:00
2025-05-11 17:48:19 -07:00
2025-05-11 17:48:06 -07:00
2025-05-11 17:48:06 -07:00