scx_sdt.bpf.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Arena-based task data scheduler. This is a variation of scx_simple
  4. * that uses a combined allocator and indexing structure to organize
  5. * task data. Task context allocation is done when a task enters the
  6. * scheduler, while freeing is done when it exits. Task contexts are
  7. * retrieved from task-local storage, pointing to the allocated memory.
  8. *
  9. * The main purpose of this scheduler is to demostrate arena memory
  10. * management.
  11. *
  12. * Copyright (c) 2024-2025 Meta Platforms, Inc. and affiliates.
  13. * Copyright (c) 2024-2025 Emil Tsalapatis <etsal@meta.com>
  14. * Copyright (c) 2024-2025 Tejun Heo <tj@kernel.org>
  15. *
  16. */
  17. #include <scx/common.bpf.h>
  18. #include <scx/bpf_arena_common.bpf.h>
  19. #include "scx_sdt.h"
  20. char _license[] SEC("license") = "GPL";
  21. UEI_DEFINE(uei);
  22. struct {
  23. __uint(type, BPF_MAP_TYPE_ARENA);
  24. __uint(map_flags, BPF_F_MMAPABLE);
  25. #if defined(__TARGET_ARCH_arm64) || defined(__aarch64__)
  26. __uint(max_entries, 1 << 16); /* number of pages */
  27. __ulong(map_extra, (1ull << 32)); /* start of mmap() region */
  28. #else
  29. __uint(max_entries, 1 << 20); /* number of pages */
  30. __ulong(map_extra, (1ull << 44)); /* start of mmap() region */
  31. #endif
  32. } arena __weak SEC(".maps");
  33. #define SHARED_DSQ 0
  34. #define DEFINE_SDT_STAT(metric) \
  35. static inline void \
  36. stat_inc_##metric(struct scx_stats __arena *stats) \
  37. { \
  38. cast_kern(stats); \
  39. stats->metric += 1; \
  40. } \
  41. __u64 stat_##metric; \
  42. DEFINE_SDT_STAT(enqueue);
  43. DEFINE_SDT_STAT(init);
  44. DEFINE_SDT_STAT(exit);
  45. DEFINE_SDT_STAT(select_idle_cpu);
  46. DEFINE_SDT_STAT(select_busy_cpu);
  47. /*
  48. * Necessary for cond_break/can_loop's semantics. According to kernel commit
  49. * 011832b, the loop counter variable must be seen as imprecise and bounded
  50. * by the verifier. Initializing it from a constant (e.g., i = 0;), then,
  51. * makes it precise and prevents may_goto from helping with converging the
  52. * loop. For these loops we must initialize the loop counter from a variable
  53. * whose value the verifier cannot reason about when checking the program, so
  54. * that the loop counter's value is imprecise.
  55. */
  56. static __u64 zero = 0;
  57. /*
  58. * XXX Hack to get the verifier to find the arena for sdt_exit_task.
  59. * As of 6.12-rc5, The verifier associates arenas with programs by
  60. * checking LD.IMM instruction operands for an arena and populating
  61. * the program state with the first instance it finds. This requires
  62. * accessing our global arena variable, but scx methods do not necessarily
  63. * do so while still using pointers from that arena. Insert a bpf_printk
  64. * statement that triggers at most once to generate an LD.IMM instruction
  65. * to access the arena and help the verifier.
  66. */
  67. static volatile bool scx_arena_verify_once;
  68. __hidden void scx_arena_subprog_init(void)
  69. {
  70. if (scx_arena_verify_once)
  71. return;
  72. bpf_printk("%s: arena pointer %p", __func__, &arena);
  73. scx_arena_verify_once = true;
  74. }
  75. private(LOCK) struct bpf_spin_lock alloc_lock;
  76. private(POOL_LOCK) struct bpf_spin_lock alloc_pool_lock;
  77. /* allocation pools */
  78. struct sdt_pool desc_pool;
  79. struct sdt_pool chunk_pool;
  80. /* Protected by alloc_lock. */
  81. struct scx_alloc_stats alloc_stats;
  82. /* Allocate element from the pool. Must be called with a then pool lock held. */
  83. static
  84. void __arena *scx_alloc_from_pool(struct sdt_pool *pool)
  85. {
  86. __u64 elem_size, max_elems;
  87. void __arena *slab;
  88. void __arena *ptr;
  89. elem_size = pool->elem_size;
  90. max_elems = pool->max_elems;
  91. /* If the chunk is spent, get a new one. */
  92. if (pool->idx >= max_elems) {
  93. slab = bpf_arena_alloc_pages(&arena, NULL,
  94. div_round_up(max_elems * elem_size, PAGE_SIZE), NUMA_NO_NODE, 0);
  95. if (!slab)
  96. return NULL;
  97. pool->slab = slab;
  98. pool->idx = 0;
  99. }
  100. ptr = (void __arena *)((__u64) pool->slab + elem_size * pool->idx);
  101. pool->idx += 1;
  102. return ptr;
  103. }
  104. /* Alloc desc and associated chunk. Called with the allocator spinlock held. */
  105. static sdt_desc_t *scx_alloc_chunk(void)
  106. {
  107. struct sdt_chunk __arena *chunk;
  108. sdt_desc_t *desc;
  109. sdt_desc_t *out;
  110. chunk = scx_alloc_from_pool(&chunk_pool);
  111. if (!chunk)
  112. return NULL;
  113. desc = scx_alloc_from_pool(&desc_pool);
  114. if (!desc) {
  115. /*
  116. * Effectively frees the previous chunk allocation.
  117. * Index cannot be 0, so decrementing is always
  118. * valid.
  119. */
  120. chunk_pool.idx -= 1;
  121. return NULL;
  122. }
  123. out = desc;
  124. desc->nr_free = SDT_TASK_ENTS_PER_CHUNK;
  125. desc->chunk = chunk;
  126. alloc_stats.chunk_allocs += 1;
  127. return out;
  128. }
  129. static int pool_set_size(struct sdt_pool *pool, __u64 data_size, __u64 nr_pages)
  130. {
  131. if (unlikely(data_size % 8))
  132. return -EINVAL;
  133. if (unlikely(nr_pages == 0))
  134. return -EINVAL;
  135. pool->elem_size = data_size;
  136. pool->max_elems = (PAGE_SIZE * nr_pages) / pool->elem_size;
  137. /* Populate the pool slab on the first allocation. */
  138. pool->idx = pool->max_elems;
  139. return 0;
  140. }
  141. /* Initialize both the base pool allocators and the root chunk of the index. */
  142. __hidden int
  143. scx_alloc_init(struct scx_allocator *alloc, __u64 data_size)
  144. {
  145. size_t min_chunk_size;
  146. int ret;
  147. _Static_assert(sizeof(struct sdt_chunk) <= PAGE_SIZE,
  148. "chunk size must fit into a page");
  149. ret = pool_set_size(&chunk_pool, sizeof(struct sdt_chunk), 1);
  150. if (ret != 0)
  151. return ret;
  152. ret = pool_set_size(&desc_pool, sizeof(struct sdt_desc), 1);
  153. if (ret != 0)
  154. return ret;
  155. /* Wrap data into a descriptor and word align. */
  156. data_size += sizeof(struct sdt_data);
  157. data_size = round_up(data_size, 8);
  158. /*
  159. * Ensure we allocate large enough chunks from the arena to avoid excessive
  160. * internal fragmentation when turning chunks it into structs.
  161. */
  162. min_chunk_size = div_round_up(SDT_TASK_MIN_ELEM_PER_ALLOC * data_size, PAGE_SIZE);
  163. ret = pool_set_size(&alloc->pool, data_size, min_chunk_size);
  164. if (ret != 0)
  165. return ret;
  166. bpf_spin_lock(&alloc_lock);
  167. alloc->root = scx_alloc_chunk();
  168. bpf_spin_unlock(&alloc_lock);
  169. if (!alloc->root)
  170. return -ENOMEM;
  171. return 0;
  172. }
  173. static
  174. int set_idx_state(sdt_desc_t *desc, __u64 pos, bool state)
  175. {
  176. __u64 __arena *allocated = desc->allocated;
  177. __u64 bit;
  178. if (unlikely(pos >= SDT_TASK_ENTS_PER_CHUNK))
  179. return -EINVAL;
  180. bit = (__u64)1 << (pos % 64);
  181. if (state)
  182. allocated[pos / 64] |= bit;
  183. else
  184. allocated[pos / 64] &= ~bit;
  185. return 0;
  186. }
  187. static __noinline
  188. int mark_nodes_avail(sdt_desc_t *lv_desc[SDT_TASK_LEVELS], __u64 lv_pos[SDT_TASK_LEVELS])
  189. {
  190. sdt_desc_t *desc;
  191. __u64 u, level;
  192. int ret;
  193. for (u = zero; u < SDT_TASK_LEVELS && can_loop; u++) {
  194. level = SDT_TASK_LEVELS - 1 - u;
  195. /* Only propagate upwards if we are the parent's only free chunk. */
  196. desc = lv_desc[level];
  197. ret = set_idx_state(desc, lv_pos[level], false);
  198. if (unlikely(ret != 0))
  199. return ret;
  200. desc->nr_free += 1;
  201. if (desc->nr_free > 1)
  202. return 0;
  203. }
  204. return 0;
  205. }
  206. /*
  207. * Free the allocated struct with the given index. Called with the
  208. * allocator lock taken.
  209. */
  210. __hidden
  211. int scx_alloc_free_idx(struct scx_allocator *alloc, __u64 idx)
  212. {
  213. const __u64 mask = (1 << SDT_TASK_ENTS_PER_PAGE_SHIFT) - 1;
  214. sdt_desc_t *lv_desc[SDT_TASK_LEVELS];
  215. sdt_desc_t * __arena *desc_children;
  216. struct sdt_chunk __arena *chunk;
  217. sdt_desc_t *desc;
  218. struct sdt_data __arena *data;
  219. __u64 level, shift, pos;
  220. __u64 lv_pos[SDT_TASK_LEVELS];
  221. int ret;
  222. int i;
  223. if (!alloc)
  224. return 0;
  225. desc = alloc->root;
  226. if (unlikely(!desc))
  227. return -EINVAL;
  228. /* To appease the verifier. */
  229. for (level = zero; level < SDT_TASK_LEVELS && can_loop; level++) {
  230. lv_desc[level] = NULL;
  231. lv_pos[level] = 0;
  232. }
  233. /* Find the leaf node containing the index. */
  234. for (level = zero; level < SDT_TASK_LEVELS && can_loop; level++) {
  235. shift = (SDT_TASK_LEVELS - 1 - level) * SDT_TASK_ENTS_PER_PAGE_SHIFT;
  236. pos = (idx >> shift) & mask;
  237. lv_desc[level] = desc;
  238. lv_pos[level] = pos;
  239. if (level == SDT_TASK_LEVELS - 1)
  240. break;
  241. chunk = desc->chunk;
  242. desc_children = (sdt_desc_t * __arena *)chunk->descs;
  243. desc = desc_children[pos];
  244. if (unlikely(!desc))
  245. return -EINVAL;
  246. }
  247. chunk = desc->chunk;
  248. pos = idx & mask;
  249. data = chunk->data[pos];
  250. if (likely(data)) {
  251. *data = (struct sdt_data) {
  252. .tid.genn = data->tid.genn + 1,
  253. };
  254. /* Zero out one word at a time. */
  255. for (i = zero; i < alloc->pool.elem_size / 8 && can_loop; i++) {
  256. data->payload[i] = 0;
  257. }
  258. }
  259. ret = mark_nodes_avail(lv_desc, lv_pos);
  260. if (unlikely(ret != 0))
  261. return ret;
  262. alloc_stats.active_allocs -= 1;
  263. alloc_stats.free_ops += 1;
  264. return 0;
  265. }
  266. static inline
  267. int ffs(__u64 word)
  268. {
  269. unsigned int num = 0;
  270. if ((word & 0xffffffff) == 0) {
  271. num += 32;
  272. word >>= 32;
  273. }
  274. if ((word & 0xffff) == 0) {
  275. num += 16;
  276. word >>= 16;
  277. }
  278. if ((word & 0xff) == 0) {
  279. num += 8;
  280. word >>= 8;
  281. }
  282. if ((word & 0xf) == 0) {
  283. num += 4;
  284. word >>= 4;
  285. }
  286. if ((word & 0x3) == 0) {
  287. num += 2;
  288. word >>= 2;
  289. }
  290. if ((word & 0x1) == 0) {
  291. num += 1;
  292. word >>= 1;
  293. }
  294. return num;
  295. }
  296. /* find the first empty slot */
  297. __hidden
  298. __u64 chunk_find_empty(sdt_desc_t __arg_arena *desc)
  299. {
  300. __u64 freeslots;
  301. __u64 i;
  302. for (i = 0; i < SDT_TASK_CHUNK_BITMAP_U64S; i++) {
  303. freeslots = ~desc->allocated[i];
  304. if (freeslots == (__u64)0)
  305. continue;
  306. return (i * 64) + ffs(freeslots);
  307. }
  308. return SDT_TASK_ENTS_PER_CHUNK;
  309. }
  310. /*
  311. * Find and return an available idx on the allocator.
  312. * Called with the task spinlock held.
  313. */
  314. static sdt_desc_t * desc_find_empty(sdt_desc_t *desc, __u64 *idxp)
  315. {
  316. sdt_desc_t *lv_desc[SDT_TASK_LEVELS];
  317. sdt_desc_t * __arena *desc_children;
  318. struct sdt_chunk __arena *chunk;
  319. sdt_desc_t *tmp;
  320. __u64 lv_pos[SDT_TASK_LEVELS];
  321. __u64 u, pos, level;
  322. __u64 idx = 0;
  323. int ret;
  324. for (level = zero; level < SDT_TASK_LEVELS && can_loop; level++) {
  325. pos = chunk_find_empty(desc);
  326. /* If we error out, something has gone very wrong. */
  327. if (unlikely(pos > SDT_TASK_ENTS_PER_CHUNK))
  328. return NULL;
  329. if (pos == SDT_TASK_ENTS_PER_CHUNK)
  330. return NULL;
  331. idx <<= SDT_TASK_ENTS_PER_PAGE_SHIFT;
  332. idx |= pos;
  333. /* Log the levels to complete allocation. */
  334. lv_desc[level] = desc;
  335. lv_pos[level] = pos;
  336. /* The rest of the loop is for internal node traversal. */
  337. if (level == SDT_TASK_LEVELS - 1)
  338. break;
  339. /* Allocate an internal node if necessary. */
  340. chunk = desc->chunk;
  341. desc_children = (sdt_desc_t * __arena *)chunk->descs;
  342. desc = desc_children[pos];
  343. if (!desc) {
  344. desc = scx_alloc_chunk();
  345. if (!desc)
  346. return NULL;
  347. desc_children[pos] = desc;
  348. }
  349. }
  350. /*
  351. * Finding the descriptor along with any internal node
  352. * allocations was successful. Update all levels with
  353. * the new allocation.
  354. */
  355. bpf_for(u, 0, SDT_TASK_LEVELS) {
  356. level = SDT_TASK_LEVELS - 1 - u;
  357. tmp = lv_desc[level];
  358. ret = set_idx_state(tmp, lv_pos[level], true);
  359. if (ret != 0)
  360. break;
  361. tmp->nr_free -= 1;
  362. if (tmp->nr_free > 0)
  363. break;
  364. }
  365. *idxp = idx;
  366. return desc;
  367. }
  368. __hidden
  369. void __arena *scx_alloc(struct scx_allocator *alloc)
  370. {
  371. struct sdt_data __arena *data = NULL;
  372. struct sdt_chunk __arena *chunk;
  373. sdt_desc_t *desc;
  374. __u64 idx, pos;
  375. if (!alloc)
  376. return NULL;
  377. bpf_spin_lock(&alloc_lock);
  378. /* We unlock if we encounter an error in the function. */
  379. desc = desc_find_empty(alloc->root, &idx);
  380. if (unlikely(desc == NULL)) {
  381. bpf_spin_unlock(&alloc_lock);
  382. return NULL;
  383. }
  384. chunk = desc->chunk;
  385. /* Populate the leaf node if necessary. */
  386. pos = idx & (SDT_TASK_ENTS_PER_CHUNK - 1);
  387. data = chunk->data[pos];
  388. if (!data) {
  389. data = scx_alloc_from_pool(&alloc->pool);
  390. if (!data) {
  391. scx_alloc_free_idx(alloc, idx);
  392. bpf_spin_unlock(&alloc_lock);
  393. return NULL;
  394. }
  395. }
  396. chunk->data[pos] = data;
  397. /* The data counts as a chunk */
  398. alloc_stats.data_allocs += 1;
  399. alloc_stats.alloc_ops += 1;
  400. alloc_stats.active_allocs += 1;
  401. data->tid.idx = idx;
  402. bpf_spin_unlock(&alloc_lock);
  403. return data;
  404. }
  405. /*
  406. * Task BPF map entry recording the task's assigned ID and pointing to the data
  407. * area allocated in arena.
  408. */
  409. struct scx_task_map_val {
  410. union sdt_id tid;
  411. __u64 tptr;
  412. struct sdt_data __arena *data;
  413. };
  414. struct {
  415. __uint(type, BPF_MAP_TYPE_TASK_STORAGE);
  416. __uint(map_flags, BPF_F_NO_PREALLOC);
  417. __type(key, int);
  418. __type(value, struct scx_task_map_val);
  419. } scx_task_map SEC(".maps");
  420. static struct scx_allocator scx_task_allocator;
  421. __hidden
  422. void __arena *scx_task_alloc(struct task_struct *p)
  423. {
  424. struct sdt_data __arena *data = NULL;
  425. struct scx_task_map_val *mval;
  426. mval = bpf_task_storage_get(&scx_task_map, p, 0,
  427. BPF_LOCAL_STORAGE_GET_F_CREATE);
  428. if (!mval)
  429. return NULL;
  430. data = scx_alloc(&scx_task_allocator);
  431. if (unlikely(!data))
  432. return NULL;
  433. mval->tid = data->tid;
  434. mval->tptr = (__u64) p;
  435. mval->data = data;
  436. return (void __arena *)data->payload;
  437. }
  438. __hidden
  439. int scx_task_init(__u64 data_size)
  440. {
  441. return scx_alloc_init(&scx_task_allocator, data_size);
  442. }
  443. __hidden
  444. void __arena *scx_task_data(struct task_struct *p)
  445. {
  446. struct sdt_data __arena *data;
  447. struct scx_task_map_val *mval;
  448. scx_arena_subprog_init();
  449. mval = bpf_task_storage_get(&scx_task_map, p, 0, 0);
  450. if (!mval)
  451. return NULL;
  452. data = mval->data;
  453. return (void __arena *)data->payload;
  454. }
  455. __hidden
  456. void scx_task_free(struct task_struct *p)
  457. {
  458. struct scx_task_map_val *mval;
  459. scx_arena_subprog_init();
  460. mval = bpf_task_storage_get(&scx_task_map, p, 0, 0);
  461. if (!mval)
  462. return;
  463. bpf_spin_lock(&alloc_lock);
  464. scx_alloc_free_idx(&scx_task_allocator, mval->tid.idx);
  465. bpf_spin_unlock(&alloc_lock);
  466. bpf_task_storage_delete(&scx_task_map, p);
  467. }
  468. static inline void
  469. scx_stat_global_update(struct scx_stats __arena *stats)
  470. {
  471. cast_kern(stats);
  472. __sync_fetch_and_add(&stat_enqueue, stats->enqueue);
  473. __sync_fetch_and_add(&stat_init, stats->init);
  474. __sync_fetch_and_add(&stat_exit, stats->exit);
  475. __sync_fetch_and_add(&stat_select_idle_cpu, stats->select_idle_cpu);
  476. __sync_fetch_and_add(&stat_select_busy_cpu, stats->select_busy_cpu);
  477. }
  478. s32 BPF_STRUCT_OPS(sdt_select_cpu, struct task_struct *p, s32 prev_cpu, u64 wake_flags)
  479. {
  480. struct scx_stats __arena *stats;
  481. bool is_idle = false;
  482. s32 cpu;
  483. stats = scx_task_data(p);
  484. if (!stats) {
  485. scx_bpf_error("%s: no stats for pid %d", __func__, p->pid);
  486. return 0;
  487. }
  488. cpu = scx_bpf_select_cpu_dfl(p, prev_cpu, wake_flags, &is_idle);
  489. if (is_idle) {
  490. stat_inc_select_idle_cpu(stats);
  491. scx_bpf_dsq_insert(p, SCX_DSQ_LOCAL, SCX_SLICE_DFL, 0);
  492. } else {
  493. stat_inc_select_busy_cpu(stats);
  494. }
  495. return cpu;
  496. }
  497. void BPF_STRUCT_OPS(sdt_enqueue, struct task_struct *p, u64 enq_flags)
  498. {
  499. struct scx_stats __arena *stats;
  500. stats = scx_task_data(p);
  501. if (!stats) {
  502. scx_bpf_error("%s: no stats for pid %d", __func__, p->pid);
  503. return;
  504. }
  505. stat_inc_enqueue(stats);
  506. scx_bpf_dsq_insert(p, SHARED_DSQ, SCX_SLICE_DFL, enq_flags);
  507. }
  508. void BPF_STRUCT_OPS(sdt_dispatch, s32 cpu, struct task_struct *prev)
  509. {
  510. scx_bpf_dsq_move_to_local(SHARED_DSQ);
  511. }
  512. s32 BPF_STRUCT_OPS_SLEEPABLE(sdt_init_task, struct task_struct *p,
  513. struct scx_init_task_args *args)
  514. {
  515. struct scx_stats __arena *stats;
  516. stats = scx_task_alloc(p);
  517. if (!stats) {
  518. scx_bpf_error("arena allocator out of memory");
  519. return -ENOMEM;
  520. }
  521. stats->pid = p->pid;
  522. stat_inc_init(stats);
  523. return 0;
  524. }
  525. void BPF_STRUCT_OPS(sdt_exit_task, struct task_struct *p,
  526. struct scx_exit_task_args *args)
  527. {
  528. struct scx_stats __arena *stats;
  529. stats = scx_task_data(p);
  530. if (!stats) {
  531. scx_bpf_error("%s: no stats for pid %d", __func__, p->pid);
  532. return;
  533. }
  534. stat_inc_exit(stats);
  535. scx_stat_global_update(stats);
  536. scx_task_free(p);
  537. }
  538. s32 BPF_STRUCT_OPS_SLEEPABLE(sdt_init)
  539. {
  540. int ret;
  541. ret = scx_task_init(sizeof(struct scx_stats));
  542. if (ret < 0) {
  543. scx_bpf_error("%s: failed with %d", __func__, ret);
  544. return ret;
  545. }
  546. ret = scx_bpf_create_dsq(SHARED_DSQ, -1);
  547. if (ret) {
  548. scx_bpf_error("failed to create DSQ %d (%d)", SHARED_DSQ, ret);
  549. return ret;
  550. }
  551. return 0;
  552. }
  553. void BPF_STRUCT_OPS(sdt_exit, struct scx_exit_info *ei)
  554. {
  555. UEI_RECORD(uei, ei);
  556. }
  557. SCX_OPS_DEFINE(sdt_ops,
  558. .select_cpu = (void *)sdt_select_cpu,
  559. .enqueue = (void *)sdt_enqueue,
  560. .dispatch = (void *)sdt_dispatch,
  561. .init_task = (void *)sdt_init_task,
  562. .exit_task = (void *)sdt_exit_task,
  563. .init = (void *)sdt_init,
  564. .exit = (void *)sdt_exit,
  565. .name = "sdt");