Tejun Heo
991ef53a48
sched_ext: Make scx_rq_online() also test cpu_active() in addition to SCX_RQ_ONLINE
...
scx_rq_online() currently only tests SCX_RQ_ONLINE. This isn't fully correct
- e.g. consume_dispatch_q() uses task_run_on_remote_rq() which tests
scx_rq_online() to see whether the current rq can run the task, and, if so,
calls consume_remote_task() to migrate the task to @rq. While the test
itself was done while locking @rq, @rq can be temporarily unlocked by
consume_remote_task() and nothing prevents SCX_RQ_ONLINE from going offline
before the migration takes place.
To address the issue, add cpu_active() test to scx_rq_online(). There is a
synchronize_rcu() between cpu_active() being cleared and the rq going
offline, so if an on-going scheduling operation sees cpu_active(), the
associated rq is guaranteed to not go offline until the scheduling operation
is complete.
Signed-off-by: Tejun Heo <tj@kernel.org >
Fixes: 60c27fb59f ("sched_ext: Implement sched_ext_ops.cpu_online/offline()")
Acked-by: David Vernet <void@manifault.com >
2024-08-08 13:38:19 -10:00
..
2024-07-24 20:59:29 +02:00
2024-07-14 18:04:03 -10:00
2024-07-03 12:24:19 +02:00
2024-06-21 15:49:29 +01:00
2024-07-19 07:27:28 +02:00
2024-03-12 13:23:32 +01:00
2024-07-25 13:32:25 -07:00
2024-05-06 17:39:09 +02:00
2024-06-15 10:43:06 -07:00
2024-07-22 14:02:19 -07:00
2024-06-06 11:21:14 -07:00
2024-07-02 16:56:18 +02:00
2024-07-18 17:27:43 -07:00
2024-07-09 17:01:46 +02:00
2024-07-03 19:30:01 -07:00
2024-07-25 13:18:41 -07:00
2024-07-04 13:54:17 -07:00
2024-08-08 13:38:19 -10:00
2024-07-27 10:19:55 -07:00
2024-07-24 20:59:29 +02:00
2024-04-24 09:43:53 +02:00
2024-02-09 11:13:59 -10:00
2024-04-04 16:24:16 +02:00
2024-04-04 16:24:16 +02:00
2024-01-25 10:12:22 -05:00
2023-07-21 12:17:25 -04:00
2024-06-13 14:26:50 -04:00
2023-10-13 18:34:46 +02:00
2024-06-24 22:24:55 -07:00
2024-04-29 08:29:29 -07:00
2023-08-08 16:48:47 -04:00
2024-03-22 11:18:18 +01:00
2024-07-15 19:36:01 -07:00
2024-05-19 14:02:03 -07:00
2024-06-24 22:25:08 -07:00
2024-02-23 17:33:31 -05:00
2024-07-24 20:59:29 +02:00
2024-02-23 17:48:22 -08:00
2024-07-21 17:15:46 -07:00
2023-09-21 12:03:50 -06:00
2024-07-30 09:30:11 -10:00
2023-12-23 15:52:13 +01:00
2024-05-30 01:13:20 +09:00
2023-09-29 11:28:39 -07:00
2024-07-24 20:59:29 +02:00
2023-08-21 13:37:28 -07:00
2024-06-11 11:25:24 +02:00
2024-07-20 16:33:21 +09:00
2024-04-25 20:55:57 -07:00
2024-07-20 16:33:21 +09:00
2023-10-19 11:02:48 +02:00
2024-02-23 17:48:22 -08:00
2024-08-01 07:08:01 -10:00
2024-06-15 10:43:08 -07:00
2024-07-24 20:59:29 +02:00
2024-04-23 14:59:01 +10:00
2024-02-23 17:48:22 -08:00
2024-04-23 14:59:01 +10:00
2024-07-24 20:59:29 +02:00
2024-05-02 19:48:26 +09:00
2024-05-06 14:22:02 -06:00
2024-07-24 20:59:29 +02:00
2024-02-23 17:48:22 -08:00
2024-03-01 12:23:37 +01:00
2023-12-20 19:26:30 -05:00
2024-04-12 15:07:51 +08:00
2024-06-24 22:25:05 -07:00
2023-12-01 09:51:44 -08:00
2024-07-24 20:59:29 +02:00
2024-07-24 20:59:29 +02:00
2024-03-13 12:53:53 -07:00
2024-04-27 11:17:48 -07:00
2024-02-22 15:38:52 -08:00
2024-04-24 09:43:53 +02:00
2024-04-25 21:07:03 -07:00
2023-12-29 12:22:27 -08:00
2024-06-28 19:36:30 -07:00
2024-05-28 11:14:14 -05:00
2024-05-30 15:31:51 -07:00
2024-07-24 20:59:29 +02:00
2024-07-11 01:51:44 -06:00
2024-07-10 22:40:39 +02:00
2023-10-04 10:41:57 -07:00
2024-04-29 05:03:51 +02:00
2024-07-24 20:59:29 +02:00
2023-12-29 12:22:29 -08:00
2024-07-18 12:19:20 -07:00
2024-05-22 09:56:00 -07:00
2024-06-03 15:20:37 +02:00
2024-07-24 20:59:29 +02:00
2024-07-09 13:26:34 +02:00
2023-10-04 10:41:57 -07:00
2024-05-30 15:31:38 -07:00
2024-07-12 16:39:53 -07:00
2024-05-17 17:31:24 -07:00
2024-07-24 20:59:29 +02:00
2023-09-13 14:59:24 +02:00
2024-02-22 15:38:52 -08:00
2024-05-06 17:39:09 +02:00
2024-07-24 20:59:29 +02:00
2024-05-22 08:31:15 -04:00
2024-07-20 16:33:21 +09:00
2023-12-21 13:17:54 +01:00
2024-07-17 21:11:34 -07:00
2024-07-24 20:59:29 +02:00
2023-08-07 15:57:22 -10:00
2024-07-15 14:01:14 -10:00