features.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Using the avg_vruntime, do the right thing and preserve lag across
  4. * sleep+wake cycles. EEVDF placement strategy #1, #2 if disabled.
  5. */
  6. SCHED_FEAT(PLACE_LAG, true)
  7. /*
  8. * Give new tasks half a slice to ease into the competition.
  9. */
  10. SCHED_FEAT(PLACE_DEADLINE_INITIAL, true)
  11. /*
  12. * Preserve relative virtual deadline on 'migration'.
  13. */
  14. SCHED_FEAT(PLACE_REL_DEADLINE, true)
  15. /*
  16. * Inhibit (wakeup) preemption until the current task has either matched the
  17. * 0-lag point or until is has exhausted it's slice.
  18. */
  19. SCHED_FEAT(RUN_TO_PARITY, true)
  20. /*
  21. * Allow wakeup of tasks with a shorter slice to cancel RESPECT_SLICE for
  22. * current.
  23. */
  24. SCHED_FEAT(PREEMPT_SHORT, true)
  25. /*
  26. * Prefer to schedule the task we woke last (assuming it failed
  27. * wakeup-preemption), since its likely going to consume data we
  28. * touched, increases cache locality.
  29. */
  30. SCHED_FEAT(NEXT_BUDDY, false)
  31. /*
  32. * Allow completely ignoring cfs_rq->next; which can be set from various
  33. * places:
  34. * - NEXT_BUDDY (wakeup preemption)
  35. * - yield_to_task()
  36. * - cgroup dequeue / pick
  37. */
  38. SCHED_FEAT(PICK_BUDDY, true)
  39. /*
  40. * Consider buddies to be cache hot, decreases the likeliness of a
  41. * cache buddy being migrated away, increases cache locality.
  42. */
  43. SCHED_FEAT(CACHE_HOT_BUDDY, true)
  44. /*
  45. * Delay dequeueing tasks until they get selected or woken.
  46. *
  47. * By delaying the dequeue for non-eligible tasks, they remain in the
  48. * competition and can burn off their negative lag. When they get selected
  49. * they'll have positive lag by definition.
  50. *
  51. * DELAY_ZERO clips the lag on dequeue (or wakeup) to 0.
  52. */
  53. SCHED_FEAT(DELAY_DEQUEUE, true)
  54. SCHED_FEAT(DELAY_ZERO, true)
  55. /*
  56. * Allow wakeup-time preemption of the current task:
  57. */
  58. SCHED_FEAT(WAKEUP_PREEMPTION, true)
  59. SCHED_FEAT(HRTICK, false)
  60. SCHED_FEAT(HRTICK_DL, false)
  61. SCHED_FEAT(DOUBLE_TICK, false)
  62. /*
  63. * Decrement CPU capacity based on time not spent running tasks
  64. */
  65. SCHED_FEAT(NONTASK_CAPACITY, true)
  66. #ifdef CONFIG_PREEMPT_RT
  67. SCHED_FEAT(TTWU_QUEUE, false)
  68. #else
  69. /*
  70. * Queue remote wakeups on the target CPU and process them
  71. * using the scheduler IPI. Reduces rq->lock contention/bounces.
  72. */
  73. SCHED_FEAT(TTWU_QUEUE, true)
  74. #endif
  75. /*
  76. * When doing wakeups, attempt to limit superfluous scans of the LLC domain.
  77. */
  78. SCHED_FEAT(SIS_UTIL, true)
  79. /*
  80. * Issue a WARN when we do multiple update_rq_clock() calls
  81. * in a single rq->lock section. Default disabled because the
  82. * annotations are not complete.
  83. */
  84. SCHED_FEAT(WARN_DOUBLE_CLOCK, false)
  85. #ifdef HAVE_RT_PUSH_IPI
  86. /*
  87. * In order to avoid a thundering herd attack of CPUs that are
  88. * lowering their priorities at the same time, and there being
  89. * a single CPU that has an RT task that can migrate and is waiting
  90. * to run, where the other CPUs will try to take that CPUs
  91. * rq lock and possibly create a large contention, sending an
  92. * IPI to that CPU and let that CPU push the RT task to where
  93. * it should go may be a better scenario.
  94. */
  95. SCHED_FEAT(RT_PUSH_IPI, true)
  96. #endif
  97. SCHED_FEAT(RT_RUNTIME_SHARE, false)
  98. SCHED_FEAT(LB_MIN, false)
  99. SCHED_FEAT(ATTACH_AGE_LOAD, true)
  100. SCHED_FEAT(WA_IDLE, true)
  101. SCHED_FEAT(WA_WEIGHT, true)
  102. SCHED_FEAT(WA_BIAS, true)
  103. /*
  104. * UtilEstimation. Use estimated CPU utilization.
  105. */
  106. SCHED_FEAT(UTIL_EST, true)
  107. SCHED_FEAT(LATENCY_WARN, false)