sched_rt.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. /*
  2. * Real-Time Scheduling Class (mapped to the SCHED_FIFO and SCHED_RR
  3. * policies)
  4. */
  5. #ifdef CONFIG_SMP
  6. static cpumask_t rt_overload_mask;
  7. static atomic_t rto_count;
  8. static inline int rt_overloaded(void)
  9. {
  10. return atomic_read(&rto_count);
  11. }
  12. static inline cpumask_t *rt_overload(void)
  13. {
  14. return &rt_overload_mask;
  15. }
  16. static inline void rt_set_overload(struct rq *rq)
  17. {
  18. cpu_set(rq->cpu, rt_overload_mask);
  19. /*
  20. * Make sure the mask is visible before we set
  21. * the overload count. That is checked to determine
  22. * if we should look at the mask. It would be a shame
  23. * if we looked at the mask, but the mask was not
  24. * updated yet.
  25. */
  26. wmb();
  27. atomic_inc(&rto_count);
  28. }
  29. static inline void rt_clear_overload(struct rq *rq)
  30. {
  31. /* the order here really doesn't matter */
  32. atomic_dec(&rto_count);
  33. cpu_clear(rq->cpu, rt_overload_mask);
  34. }
  35. #endif /* CONFIG_SMP */
  36. /*
  37. * Update the current task's runtime statistics. Skip current tasks that
  38. * are not in our scheduling class.
  39. */
  40. static void update_curr_rt(struct rq *rq)
  41. {
  42. struct task_struct *curr = rq->curr;
  43. u64 delta_exec;
  44. if (!task_has_rt_policy(curr))
  45. return;
  46. delta_exec = rq->clock - curr->se.exec_start;
  47. if (unlikely((s64)delta_exec < 0))
  48. delta_exec = 0;
  49. schedstat_set(curr->se.exec_max, max(curr->se.exec_max, delta_exec));
  50. curr->se.sum_exec_runtime += delta_exec;
  51. curr->se.exec_start = rq->clock;
  52. cpuacct_charge(curr, delta_exec);
  53. }
  54. static inline void inc_rt_tasks(struct task_struct *p, struct rq *rq)
  55. {
  56. WARN_ON(!rt_task(p));
  57. rq->rt.rt_nr_running++;
  58. #ifdef CONFIG_SMP
  59. if (p->prio < rq->rt.highest_prio)
  60. rq->rt.highest_prio = p->prio;
  61. if (rq->rt.rt_nr_running > 1)
  62. rt_set_overload(rq);
  63. #endif /* CONFIG_SMP */
  64. }
  65. static inline void dec_rt_tasks(struct task_struct *p, struct rq *rq)
  66. {
  67. WARN_ON(!rt_task(p));
  68. WARN_ON(!rq->rt.rt_nr_running);
  69. rq->rt.rt_nr_running--;
  70. #ifdef CONFIG_SMP
  71. if (rq->rt.rt_nr_running) {
  72. struct rt_prio_array *array;
  73. WARN_ON(p->prio < rq->rt.highest_prio);
  74. if (p->prio == rq->rt.highest_prio) {
  75. /* recalculate */
  76. array = &rq->rt.active;
  77. rq->rt.highest_prio =
  78. sched_find_first_bit(array->bitmap);
  79. } /* otherwise leave rq->highest prio alone */
  80. } else
  81. rq->rt.highest_prio = MAX_RT_PRIO;
  82. if (rq->rt.rt_nr_running < 2)
  83. rt_clear_overload(rq);
  84. #endif /* CONFIG_SMP */
  85. }
  86. static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup)
  87. {
  88. struct rt_prio_array *array = &rq->rt.active;
  89. list_add_tail(&p->run_list, array->queue + p->prio);
  90. __set_bit(p->prio, array->bitmap);
  91. inc_cpu_load(rq, p->se.load.weight);
  92. inc_rt_tasks(p, rq);
  93. }
  94. /*
  95. * Adding/removing a task to/from a priority array:
  96. */
  97. static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep)
  98. {
  99. struct rt_prio_array *array = &rq->rt.active;
  100. update_curr_rt(rq);
  101. list_del(&p->run_list);
  102. if (list_empty(array->queue + p->prio))
  103. __clear_bit(p->prio, array->bitmap);
  104. dec_cpu_load(rq, p->se.load.weight);
  105. dec_rt_tasks(p, rq);
  106. }
  107. /*
  108. * Put task to the end of the run list without the overhead of dequeue
  109. * followed by enqueue.
  110. */
  111. static void requeue_task_rt(struct rq *rq, struct task_struct *p)
  112. {
  113. struct rt_prio_array *array = &rq->rt.active;
  114. list_move_tail(&p->run_list, array->queue + p->prio);
  115. }
  116. static void
  117. yield_task_rt(struct rq *rq)
  118. {
  119. requeue_task_rt(rq, rq->curr);
  120. }
  121. /*
  122. * Preempt the current task with a newly woken task if needed:
  123. */
  124. static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p)
  125. {
  126. if (p->prio < rq->curr->prio)
  127. resched_task(rq->curr);
  128. }
  129. static struct task_struct *pick_next_task_rt(struct rq *rq)
  130. {
  131. struct rt_prio_array *array = &rq->rt.active;
  132. struct task_struct *next;
  133. struct list_head *queue;
  134. int idx;
  135. idx = sched_find_first_bit(array->bitmap);
  136. if (idx >= MAX_RT_PRIO)
  137. return NULL;
  138. queue = array->queue + idx;
  139. next = list_entry(queue->next, struct task_struct, run_list);
  140. next->se.exec_start = rq->clock;
  141. return next;
  142. }
  143. static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
  144. {
  145. update_curr_rt(rq);
  146. p->se.exec_start = 0;
  147. }
  148. #ifdef CONFIG_SMP
  149. /* Only try algorithms three times */
  150. #define RT_MAX_TRIES 3
  151. static int double_lock_balance(struct rq *this_rq, struct rq *busiest);
  152. static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep);
  153. static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
  154. {
  155. if (!task_running(rq, p) &&
  156. (cpu < 0 || cpu_isset(cpu, p->cpus_allowed)))
  157. return 1;
  158. return 0;
  159. }
  160. /* Return the second highest RT task, NULL otherwise */
  161. static struct task_struct *pick_next_highest_task_rt(struct rq *rq,
  162. int cpu)
  163. {
  164. struct rt_prio_array *array = &rq->rt.active;
  165. struct task_struct *next;
  166. struct list_head *queue;
  167. int idx;
  168. assert_spin_locked(&rq->lock);
  169. if (likely(rq->rt.rt_nr_running < 2))
  170. return NULL;
  171. idx = sched_find_first_bit(array->bitmap);
  172. if (unlikely(idx >= MAX_RT_PRIO)) {
  173. WARN_ON(1); /* rt_nr_running is bad */
  174. return NULL;
  175. }
  176. queue = array->queue + idx;
  177. BUG_ON(list_empty(queue));
  178. next = list_entry(queue->next, struct task_struct, run_list);
  179. if (unlikely(pick_rt_task(rq, next, cpu)))
  180. goto out;
  181. if (queue->next->next != queue) {
  182. /* same prio task */
  183. next = list_entry(queue->next->next, struct task_struct, run_list);
  184. if (pick_rt_task(rq, next, cpu))
  185. goto out;
  186. }
  187. retry:
  188. /* slower, but more flexible */
  189. idx = find_next_bit(array->bitmap, MAX_RT_PRIO, idx+1);
  190. if (unlikely(idx >= MAX_RT_PRIO))
  191. return NULL;
  192. queue = array->queue + idx;
  193. BUG_ON(list_empty(queue));
  194. list_for_each_entry(next, queue, run_list) {
  195. if (pick_rt_task(rq, next, cpu))
  196. goto out;
  197. }
  198. goto retry;
  199. out:
  200. return next;
  201. }
  202. static DEFINE_PER_CPU(cpumask_t, local_cpu_mask);
  203. /* Will lock the rq it finds */
  204. static struct rq *find_lock_lowest_rq(struct task_struct *task,
  205. struct rq *this_rq)
  206. {
  207. struct rq *lowest_rq = NULL;
  208. int cpu;
  209. int tries;
  210. cpumask_t *cpu_mask = &__get_cpu_var(local_cpu_mask);
  211. cpus_and(*cpu_mask, cpu_online_map, task->cpus_allowed);
  212. for (tries = 0; tries < RT_MAX_TRIES; tries++) {
  213. /*
  214. * Scan each rq for the lowest prio.
  215. */
  216. for_each_cpu_mask(cpu, *cpu_mask) {
  217. struct rq *rq = &per_cpu(runqueues, cpu);
  218. if (cpu == this_rq->cpu)
  219. continue;
  220. /* We look for lowest RT prio or non-rt CPU */
  221. if (rq->rt.highest_prio >= MAX_RT_PRIO) {
  222. lowest_rq = rq;
  223. break;
  224. }
  225. /* no locking for now */
  226. if (rq->rt.highest_prio > task->prio &&
  227. (!lowest_rq || rq->rt.highest_prio > lowest_rq->rt.highest_prio)) {
  228. lowest_rq = rq;
  229. }
  230. }
  231. if (!lowest_rq)
  232. break;
  233. /* if the prio of this runqueue changed, try again */
  234. if (double_lock_balance(this_rq, lowest_rq)) {
  235. /*
  236. * We had to unlock the run queue. In
  237. * the mean time, task could have
  238. * migrated already or had its affinity changed.
  239. * Also make sure that it wasn't scheduled on its rq.
  240. */
  241. if (unlikely(task_rq(task) != this_rq ||
  242. !cpu_isset(lowest_rq->cpu, task->cpus_allowed) ||
  243. task_running(this_rq, task) ||
  244. !task->se.on_rq)) {
  245. spin_unlock(&lowest_rq->lock);
  246. lowest_rq = NULL;
  247. break;
  248. }
  249. }
  250. /* If this rq is still suitable use it. */
  251. if (lowest_rq->rt.highest_prio > task->prio)
  252. break;
  253. /* try again */
  254. spin_unlock(&lowest_rq->lock);
  255. lowest_rq = NULL;
  256. }
  257. return lowest_rq;
  258. }
  259. /*
  260. * If the current CPU has more than one RT task, see if the non
  261. * running task can migrate over to a CPU that is running a task
  262. * of lesser priority.
  263. */
  264. static int push_rt_task(struct rq *this_rq)
  265. {
  266. struct task_struct *next_task;
  267. struct rq *lowest_rq;
  268. int ret = 0;
  269. int paranoid = RT_MAX_TRIES;
  270. assert_spin_locked(&this_rq->lock);
  271. next_task = pick_next_highest_task_rt(this_rq, -1);
  272. if (!next_task)
  273. return 0;
  274. retry:
  275. if (unlikely(next_task == this_rq->curr)) {
  276. WARN_ON(1);
  277. return 0;
  278. }
  279. /*
  280. * It's possible that the next_task slipped in of
  281. * higher priority than current. If that's the case
  282. * just reschedule current.
  283. */
  284. if (unlikely(next_task->prio < this_rq->curr->prio)) {
  285. resched_task(this_rq->curr);
  286. return 0;
  287. }
  288. /* We might release this_rq lock */
  289. get_task_struct(next_task);
  290. /* find_lock_lowest_rq locks the rq if found */
  291. lowest_rq = find_lock_lowest_rq(next_task, this_rq);
  292. if (!lowest_rq) {
  293. struct task_struct *task;
  294. /*
  295. * find lock_lowest_rq releases this_rq->lock
  296. * so it is possible that next_task has changed.
  297. * If it has, then try again.
  298. */
  299. task = pick_next_highest_task_rt(this_rq, -1);
  300. if (unlikely(task != next_task) && task && paranoid--) {
  301. put_task_struct(next_task);
  302. next_task = task;
  303. goto retry;
  304. }
  305. goto out;
  306. }
  307. assert_spin_locked(&lowest_rq->lock);
  308. deactivate_task(this_rq, next_task, 0);
  309. set_task_cpu(next_task, lowest_rq->cpu);
  310. activate_task(lowest_rq, next_task, 0);
  311. resched_task(lowest_rq->curr);
  312. spin_unlock(&lowest_rq->lock);
  313. ret = 1;
  314. out:
  315. put_task_struct(next_task);
  316. return ret;
  317. }
  318. /*
  319. * TODO: Currently we just use the second highest prio task on
  320. * the queue, and stop when it can't migrate (or there's
  321. * no more RT tasks). There may be a case where a lower
  322. * priority RT task has a different affinity than the
  323. * higher RT task. In this case the lower RT task could
  324. * possibly be able to migrate where as the higher priority
  325. * RT task could not. We currently ignore this issue.
  326. * Enhancements are welcome!
  327. */
  328. static void push_rt_tasks(struct rq *rq)
  329. {
  330. /* push_rt_task will return true if it moved an RT */
  331. while (push_rt_task(rq))
  332. ;
  333. }
  334. static int pull_rt_task(struct rq *this_rq)
  335. {
  336. struct task_struct *next;
  337. struct task_struct *p;
  338. struct rq *src_rq;
  339. cpumask_t *rto_cpumask;
  340. int this_cpu = this_rq->cpu;
  341. int cpu;
  342. int ret = 0;
  343. assert_spin_locked(&this_rq->lock);
  344. /*
  345. * If cpusets are used, and we have overlapping
  346. * run queue cpusets, then this algorithm may not catch all.
  347. * This is just the price you pay on trying to keep
  348. * dirtying caches down on large SMP machines.
  349. */
  350. if (likely(!rt_overloaded()))
  351. return 0;
  352. next = pick_next_task_rt(this_rq);
  353. rto_cpumask = rt_overload();
  354. for_each_cpu_mask(cpu, *rto_cpumask) {
  355. if (this_cpu == cpu)
  356. continue;
  357. src_rq = cpu_rq(cpu);
  358. if (unlikely(src_rq->rt.rt_nr_running <= 1)) {
  359. /*
  360. * It is possible that overlapping cpusets
  361. * will miss clearing a non overloaded runqueue.
  362. * Clear it now.
  363. */
  364. if (double_lock_balance(this_rq, src_rq)) {
  365. /* unlocked our runqueue lock */
  366. struct task_struct *old_next = next;
  367. next = pick_next_task_rt(this_rq);
  368. if (next != old_next)
  369. ret = 1;
  370. }
  371. if (likely(src_rq->rt.rt_nr_running <= 1))
  372. /*
  373. * Small chance that this_rq->curr changed
  374. * but it's really harmless here.
  375. */
  376. rt_clear_overload(this_rq);
  377. else
  378. /*
  379. * Heh, the src_rq is now overloaded, since
  380. * we already have the src_rq lock, go straight
  381. * to pulling tasks from it.
  382. */
  383. goto try_pulling;
  384. spin_unlock(&src_rq->lock);
  385. continue;
  386. }
  387. /*
  388. * We can potentially drop this_rq's lock in
  389. * double_lock_balance, and another CPU could
  390. * steal our next task - hence we must cause
  391. * the caller to recalculate the next task
  392. * in that case:
  393. */
  394. if (double_lock_balance(this_rq, src_rq)) {
  395. struct task_struct *old_next = next;
  396. next = pick_next_task_rt(this_rq);
  397. if (next != old_next)
  398. ret = 1;
  399. }
  400. /*
  401. * Are there still pullable RT tasks?
  402. */
  403. if (src_rq->rt.rt_nr_running <= 1) {
  404. spin_unlock(&src_rq->lock);
  405. continue;
  406. }
  407. try_pulling:
  408. p = pick_next_highest_task_rt(src_rq, this_cpu);
  409. /*
  410. * Do we have an RT task that preempts
  411. * the to-be-scheduled task?
  412. */
  413. if (p && (!next || (p->prio < next->prio))) {
  414. WARN_ON(p == src_rq->curr);
  415. WARN_ON(!p->se.on_rq);
  416. /*
  417. * There's a chance that p is higher in priority
  418. * than what's currently running on its cpu.
  419. * This is just that p is wakeing up and hasn't
  420. * had a chance to schedule. We only pull
  421. * p if it is lower in priority than the
  422. * current task on the run queue or
  423. * this_rq next task is lower in prio than
  424. * the current task on that rq.
  425. */
  426. if (p->prio < src_rq->curr->prio ||
  427. (next && next->prio < src_rq->curr->prio))
  428. goto bail;
  429. ret = 1;
  430. deactivate_task(src_rq, p, 0);
  431. set_task_cpu(p, this_cpu);
  432. activate_task(this_rq, p, 0);
  433. /*
  434. * We continue with the search, just in
  435. * case there's an even higher prio task
  436. * in another runqueue. (low likelyhood
  437. * but possible)
  438. */
  439. /*
  440. * Update next so that we won't pick a task
  441. * on another cpu with a priority lower (or equal)
  442. * than the one we just picked.
  443. */
  444. next = p;
  445. }
  446. bail:
  447. spin_unlock(&src_rq->lock);
  448. }
  449. return ret;
  450. }
  451. static void schedule_balance_rt(struct rq *rq,
  452. struct task_struct *prev)
  453. {
  454. /* Try to pull RT tasks here if we lower this rq's prio */
  455. if (unlikely(rt_task(prev)) &&
  456. rq->rt.highest_prio > prev->prio)
  457. pull_rt_task(rq);
  458. }
  459. static void schedule_tail_balance_rt(struct rq *rq)
  460. {
  461. /*
  462. * If we have more than one rt_task queued, then
  463. * see if we can push the other rt_tasks off to other CPUS.
  464. * Note we may release the rq lock, and since
  465. * the lock was owned by prev, we need to release it
  466. * first via finish_lock_switch and then reaquire it here.
  467. */
  468. if (unlikely(rq->rt.rt_nr_running > 1)) {
  469. spin_lock_irq(&rq->lock);
  470. push_rt_tasks(rq);
  471. spin_unlock_irq(&rq->lock);
  472. }
  473. }
  474. /*
  475. * Load-balancing iterator. Note: while the runqueue stays locked
  476. * during the whole iteration, the current task might be
  477. * dequeued so the iterator has to be dequeue-safe. Here we
  478. * achieve that by always pre-iterating before returning
  479. * the current task:
  480. */
  481. static struct task_struct *load_balance_start_rt(void *arg)
  482. {
  483. struct rq *rq = arg;
  484. struct rt_prio_array *array = &rq->rt.active;
  485. struct list_head *head, *curr;
  486. struct task_struct *p;
  487. int idx;
  488. idx = sched_find_first_bit(array->bitmap);
  489. if (idx >= MAX_RT_PRIO)
  490. return NULL;
  491. head = array->queue + idx;
  492. curr = head->prev;
  493. p = list_entry(curr, struct task_struct, run_list);
  494. curr = curr->prev;
  495. rq->rt.rt_load_balance_idx = idx;
  496. rq->rt.rt_load_balance_head = head;
  497. rq->rt.rt_load_balance_curr = curr;
  498. return p;
  499. }
  500. static struct task_struct *load_balance_next_rt(void *arg)
  501. {
  502. struct rq *rq = arg;
  503. struct rt_prio_array *array = &rq->rt.active;
  504. struct list_head *head, *curr;
  505. struct task_struct *p;
  506. int idx;
  507. idx = rq->rt.rt_load_balance_idx;
  508. head = rq->rt.rt_load_balance_head;
  509. curr = rq->rt.rt_load_balance_curr;
  510. /*
  511. * If we arrived back to the head again then
  512. * iterate to the next queue (if any):
  513. */
  514. if (unlikely(head == curr)) {
  515. int next_idx = find_next_bit(array->bitmap, MAX_RT_PRIO, idx+1);
  516. if (next_idx >= MAX_RT_PRIO)
  517. return NULL;
  518. idx = next_idx;
  519. head = array->queue + idx;
  520. curr = head->prev;
  521. rq->rt.rt_load_balance_idx = idx;
  522. rq->rt.rt_load_balance_head = head;
  523. }
  524. p = list_entry(curr, struct task_struct, run_list);
  525. curr = curr->prev;
  526. rq->rt.rt_load_balance_curr = curr;
  527. return p;
  528. }
  529. static unsigned long
  530. load_balance_rt(struct rq *this_rq, int this_cpu, struct rq *busiest,
  531. unsigned long max_load_move,
  532. struct sched_domain *sd, enum cpu_idle_type idle,
  533. int *all_pinned, int *this_best_prio)
  534. {
  535. struct rq_iterator rt_rq_iterator;
  536. rt_rq_iterator.start = load_balance_start_rt;
  537. rt_rq_iterator.next = load_balance_next_rt;
  538. /* pass 'busiest' rq argument into
  539. * load_balance_[start|next]_rt iterators
  540. */
  541. rt_rq_iterator.arg = busiest;
  542. return balance_tasks(this_rq, this_cpu, busiest, max_load_move, sd,
  543. idle, all_pinned, this_best_prio, &rt_rq_iterator);
  544. }
  545. static int
  546. move_one_task_rt(struct rq *this_rq, int this_cpu, struct rq *busiest,
  547. struct sched_domain *sd, enum cpu_idle_type idle)
  548. {
  549. struct rq_iterator rt_rq_iterator;
  550. rt_rq_iterator.start = load_balance_start_rt;
  551. rt_rq_iterator.next = load_balance_next_rt;
  552. rt_rq_iterator.arg = busiest;
  553. return iter_move_one_task(this_rq, this_cpu, busiest, sd, idle,
  554. &rt_rq_iterator);
  555. }
  556. #else /* CONFIG_SMP */
  557. # define schedule_tail_balance_rt(rq) do { } while (0)
  558. # define schedule_balance_rt(rq, prev) do { } while (0)
  559. #endif /* CONFIG_SMP */
  560. static void task_tick_rt(struct rq *rq, struct task_struct *p)
  561. {
  562. update_curr_rt(rq);
  563. /*
  564. * RR tasks need a special form of timeslice management.
  565. * FIFO tasks have no timeslices.
  566. */
  567. if (p->policy != SCHED_RR)
  568. return;
  569. if (--p->time_slice)
  570. return;
  571. p->time_slice = DEF_TIMESLICE;
  572. /*
  573. * Requeue to the end of queue if we are not the only element
  574. * on the queue:
  575. */
  576. if (p->run_list.prev != p->run_list.next) {
  577. requeue_task_rt(rq, p);
  578. set_tsk_need_resched(p);
  579. }
  580. }
  581. static void set_curr_task_rt(struct rq *rq)
  582. {
  583. struct task_struct *p = rq->curr;
  584. p->se.exec_start = rq->clock;
  585. }
  586. const struct sched_class rt_sched_class = {
  587. .next = &fair_sched_class,
  588. .enqueue_task = enqueue_task_rt,
  589. .dequeue_task = dequeue_task_rt,
  590. .yield_task = yield_task_rt,
  591. .check_preempt_curr = check_preempt_curr_rt,
  592. .pick_next_task = pick_next_task_rt,
  593. .put_prev_task = put_prev_task_rt,
  594. #ifdef CONFIG_SMP
  595. .load_balance = load_balance_rt,
  596. .move_one_task = move_one_task_rt,
  597. #endif
  598. .set_curr_task = set_curr_task_rt,
  599. .task_tick = task_tick_rt,
  600. };