Kconfig 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. menu "MTK runqueue statistic calculation and CPU affinity"
  2. config MTK_SCHED_RQAVG_KS
  3. bool "Enable runqueue statistic calculation used in kernel space operation"
  4. depends on SMP
  5. help
  6. MTK ruqueue statistic kernel space CPUfreq governors, e.g., hotplug
  7. TLP estimation,
  8. heavy task detection and
  9. per CPU load for kernel space CPUfreq governors
  10. config MTK_SCHED_RQAVG_US
  11. bool "Enable runqueue staticsic calculation used in user space operation"
  12. depends on SMP && HIGH_RES_TIMERS
  13. help
  14. TLP estimation for user space CPUfreq governors
  15. config MT_CPU_AFFINITY
  16. bool "Enhance CPU affinity in hotplug"
  17. depends on HOTPLUG_CPU
  18. help
  19. The CPU affinity library for Hotplug enhancement is to achieve set CPU
  20. affinity without take care kernel behavior and to avoid affect the original
  21. Linux design.
  22. endmenu
  23. menu "MT load balance and schedule enhancement"
  24. config MT_LOAD_BALANCE_ENHANCEMENT
  25. bool "mt load balance enhancement"
  26. depends on SMP
  27. default n
  28. help
  29. Mediatek aggressive load balance, include 1. wake up load balance,
  30. 2. shorten the schedule migration cost and let the idle balance more aggregative,
  31. 3. force ignore the cache hot when current rq is idle and src cpu have more
  32. than 2 tasks,
  33. 4. migrate heavy load_weight task as long as RT tasks exist in busy cpu
  34. 5. when move tasks fil, force migration no matter cache-hot,
  35. use mt_ignore_cachehot_in_idle.
  36. config MT_RT_SCHED
  37. bool "mt RT scheduling enhancement for big.LITTLE"
  38. depends on SCHED_HMP
  39. default n
  40. help
  41. Mediatek big.LITTLE MP Scheduling for RT-class. Linux big.LITTLE MP Scheduling
  42. for RT-class don’t aware the different processor power (A15/A7). That would
  43. lead to priority inversion. We want to provide a solution to solve above problem
  44. and let the user experience, and system performance to achieve the best condition
  45. under the consideration with power-saving and following the policy of hotplug and
  46. DVFS (do not UP processor forcedly).
  47. config MTK_COMPAT
  48. bool "mt fast mode switching enhancement"
  49. depends on COMPAT
  50. default n
  51. help
  52. Current design will save/restore all registers in mode switching.
  53. However, when kernel layer is 64-bits and application layer is 32 bits,
  54. the 32-bits application use a part of registers.
  55. Save/restore all register will consume CPU cycles.
  56. To avoid the unnecessary save/restore registers behavior,
  57. we propose fast mode switching method to optimize the mode switching
  58. config MT_SCHED_INTEROP
  59. bool "mtk scheduling interopation enhancement"
  60. default n
  61. help
  62. Original Linux Design, RT & CFS do load balance seperatedly,
  63. and let would result in unload balance.
  64. that is, one CPU has more than 2 tasks, however, one CPU is IDLE
  65. We make RT & CFS to check each other and make load more balance.
  66. config MT_SCHED_TRACE
  67. bool "mt scheduling trace, output mtk schedule trace into FTRACE"
  68. default n
  69. help
  70. Provide RT info via ftrace,
  71. mt_sched_printf for scheduling module to output info and
  72. RT scheduling info to ftrace,
  73. including select_task_rq, check_preempt, find_lowest_rq.
  74. Say no if not sure.
  75. config MT_SCHED_DEBUG
  76. bool "mt scheduling log, also output the scheduling log into Kernel log"
  77. depends on MT_SCHED_TRACE
  78. default n
  79. help
  80. MTK scheduling log, add scheduling log into Kernel log.
  81. Including print scheduler debug information at KE and print load balance
  82. information at kernel log.
  83. Say no if not sure.
  84. config MT_DEBUG_PREEMPT
  85. bool "debug preempt, output the preempt enable/disable to FTRACE"
  86. default n
  87. help
  88. Provide preempt debug.
  89. Dump preempt disable/enable backtrace into ftrace.
  90. Dump preempt count in kernel log.
  91. Say no if not sure.
  92. endmenu
  93. menu "MTK Cluster MultiProcessor Scheduler"
  94. config MTK_CPU_TOPOLOGY
  95. bool "MTK cpu topology infrastructure"
  96. depends on (64BIT && OF && SMP) || (ARM_CPU_TOPOLOGY && OF)
  97. default n
  98. help
  99. Say N if you want to build up another wheel
  100. sched_init -> cmp_cputopo_domain_seutp()
  101. rest_init -> fork kernel_init -> kernel_init_freeable ... -> parse_dt_topology
  102. we focus to build up cpu topology and domain before scheduler runs.
  103. config MTK_SCHED_CMP
  104. bool "Enable CMP scheduler"
  105. depends on SMP && SCHED_MC && MTK_CPU_TOPOLOGY
  106. default n
  107. help
  108. CMP Scheduler Enhancement for MTK SoC.
  109. Attempts to introspectively select tasks to optimize
  110. energy and performance.
  111. say no if not sure.
  112. config MTK_SCHED_CMP_TGS
  113. bool "Enable thread group scheduling"
  114. depends on MTK_SCHED_CMP
  115. default n
  116. help
  117. CMP Scheduler Enhancement for MTK SoC.
  118. To utilize the nature of tasks in the same thread group, which eager
  119. to share data (pages) essentially. Balance the same parent’s tasks to
  120. the same CPU cluster Would get improvement with L2-cache Read-Hit/Miss
  121. and Write.
  122. config MTK_SCHED_CMP_TGS_WAKEUP
  123. bool "Enable thread group scheduling"
  124. depends on MTK_SCHED_CMP_TGS
  125. default n
  126. help
  127. CMP Scheduler Enhancement for MTK SoC.
  128. If the wakeup task is single thread, it will try to find idlest group
  129. and find idlest CPU. Else if the wakeup task has thread group, prefer
  130. the cluster which has idle CPU with most tasks in the same thread group.
  131. endmenu
  132. menu "MTK Heterogenous MultiProcessor Scheduler"
  133. config DISABLE_CPU_SCHED_DOMAIN_BALANCE
  134. bool "(EXPERIMENTAL) Disable CPU level scheduler load-balancing"
  135. help
  136. Disables scheduler load-balancing at CPU sched domain level.
  137. In hmp scheduler, use hmp global balance, a.k.a. force up/down
  138. migration, instead.
  139. If unsure say N here.
  140. config SCHED_HMP
  141. bool "(EXPERIMENTAL) Heterogenous multiprocessor scheduling"
  142. depends on SCHED_MC && FAIR_GROUP_SCHED && !SCHED_AUTOGROUP
  143. help
  144. Experimental scheduler optimizations for heterogeneous platforms.
  145. Attempts to introspectively select task affinity to optimize power
  146. and performance. Basic support for multiple (>2) cpu types is in place,
  147. but it has only been tested with two types of cpus.
  148. There is currently no support for migration of task groups, hence
  149. !SCHED_AUTOGROUP.
  150. config SCHED_HMP_PRIO_FILTER
  151. bool "(EXPERIMENTAL) Filter HMP migrations by task priority"
  152. help
  153. Enables task priority based HMP migration filter. Any task with
  154. a NICE value above the threshold will always be on low-power cpus
  155. with less compute capacity.
  156. If unsure say N here.
  157. config SCHED_HMP_PRIO_FILTER_VAL
  158. int "NICE priority threshold"
  159. default 5
  160. depends on SCHED_HMP_PRIO_FILTER
  161. config HMP_FREQUENCY_INVARIANT_SCALE
  162. bool "(EXPERIMENTAL) Frequency-Invariant Tracked Load for HMP"
  163. depends on !ARCH_SCALE_INVARIANT_CPU_CAPACITY
  164. help
  165. Scales the current load contribution in line with the frequency
  166. of the CPU that the task was executed on.
  167. In this version, we use a simple linear scale derived from the
  168. maximum frequency reported by CPUFreq.
  169. Restricting tracked load to be scaled by the CPU's frequency
  170. represents the consumption of possible compute capacity
  171. (rather than consumption of actual instantaneous capacity as
  172. normal) and allows the HMP migration's simple threshold
  173. migration strategy to interact more predictably with CPUFreq's
  174. asynchronous compute capacity changes.
  175. config HMP_TRACER
  176. bool "(EXPERIMENTAL) Profile HMP scheduler"
  177. help
  178. Profile HMP scheduler
  179. Trace the update of cfs rq, load, and hmp_statisics to evaluate if
  180. the schedule decision is as expected.
  181. If unsure say N here.
  182. config HMP_PACK_SMALL_TASK
  183. bool "(EXPERIMENTAL) Packing Small Tasks"
  184. depends on SCHED_HMP
  185. help
  186. This option enables Packing Small Tasks
  187. Packing small task mechanism is try to limit small tasks to run
  188. on as little CPUs as possible and meke better power efficiency.
  189. If unsure say N here.
  190. config SCHED_HMP_PLUS
  191. bool "(EXPERIMENTAL) Corepilot enhancement"
  192. depends on SCHED_HMP
  193. default n
  194. help
  195. Corepilot hmp enhancement.
  196. 1. Do hmp_idle_pull at idle_balance
  197. 2. At global balance, consider the tasks in rq, move heaviest/lightest
  198. of first 5 tasks in rq.
  199. 3. Enhance down migration rule: Do not migrate task when big core
  200. is idle
  201. endmenu