menu "MTK runqueue statistic calculation and CPU affinity"
config MTK_CPU_AFFINITY
	bool "Enhance CPU affinity in hotplug"
	depends on HOTPLUG_CPU
	help
	  The CPU affinity library for Hotplug enhancement is to achieve set CPU
	  affinity without take care kernel behavior and to avoid affect the original
	  Linux design.
endmenu

menu "MTK load balance and schedule enhancement"
config MTK_LOAD_BALANCE_ENHANCEMENT
	bool "mtk load balance enhancement"
	depends on SMP
	default n
	help
	  Mediatek aggressive load balance, include
	   1. shorten the schedule migration cost and let the idle balance more aggregative,
	   2. aggressive load balance in hmp noHz.
	   3. aggressive cluster-migration in idle balancing & GTS balacing

config MTK_SCHED_INTEROP
	bool "mtk scheduling interopation enhancement"
	default n
	help
	   Original Linux Design, RT & CFS do load balance seperatedly,
	   and let would result in unload balance.
	   that is, one CPU has more than 2 tasks, however, one CPU is IDLE
	   We make RT & CFS to check each other and make load more balance.

config MTK_SCHED_TRACE
	bool "mt scheduling trace, output mtk schedule trace into FTRACE"
	default n
	help
	   Provide RT info via ftrace,
	   mt_sched_printf for scheduling module to output info and
	   RT scheduling info to ftrace,
	   including select_task_rq, check_preempt, find_lowest_rq.
	   Say no if not sure.

config MTK_SCHED_DEBUG
	bool "mt scheduling log, also output the scheduling log into Kernel log"
	depends on MTK_SCHED_TRACE
	default n
	help
	   MTK scheduling log, add scheduling log into Kernel log.
	   Including print scheduler debug information at KE and print load balance
	   information at kernel log.
	   Say no if not sure.

config MTK_DEBUG_PREEMPT
	bool "debug preempt, output the preempt enable/disable to FTRACE"
	default n
	help
	   Provide preempt debug.
	   Dump preempt disable/enable backtrace into ftrace.
	   Dump preempt count in kernel log.
	   Say no if not sure.

config MTK_RT_THROTTLE_MON
	bool "mt rt throttle monitor"
	default n
	help
	  MTK_RT_THROTTLE_MON is used to monitor rt throttle. When rt throttle activated
	  print 5 longest execusion time rt tasks. Say Y here to enable rt throttle
	  monitor. If you are not sure about whether to enable it or not, please set n.

endmenu

menu "MTK Cluster MultiProcessor Scheduler"
config MTK_CPU_TOPOLOGY
	bool "MTK cpu topology infrastructure"
	depends on (64BIT && OF && SMP) || (ARM_CPU_TOPOLOGY && OF)
	default n
	help
	  Say N if you want to build up another wheel
	  sched_init -> cmp_cputopo_domain_seutp()
	  rest_init -> fork kernel_init -> kernel_init_freeable ... -> parse_dt_topology
	  we focus to build up cpu topology and domain before scheduler runs.
endmenu

menu "MTK runqueue statistic calculation"
config MTK_SCHED_RQAVG_KS
	bool "Enable runqueue statistic calculation used in kernel space operation"
	depends on SMP
	help
		MTK ruqueue statistic kernel space CPUfreq governors, e.g., hotplug
		TLP estimation,
		heavy task detection and
		per CPU load for kernel space CPUfreq governors

config MTK_SCHED_RQAVG_US
	bool "Enable runqueue staticsic calculation used in user space operation"
	depends on SMP && HIGH_RES_TIMERS
	help
		TLP estimation for user space CPUfreq governors
endmenu

menu "MTK Energy Aware Scheduler Plus"

config MTK_SCHED_EAS_PLUS
	bool "(EXPERIMENTAL) Energy Aware Scheduling"
	depends on SCHED_MC
	help
		Experimental scheduler optimizations in heterogeneous platforms for
		energy-awared. Attempts to introspectively select task affinity to
		optimize power and performance according to power estimation.
		There is currently support for Hotplug and all core all online.

config MTK_SCHED_EAS_POWER_SUPPORT
	bool "Enable MTK power calculation for EAS"
	depends on MTK_SCHED_EAS_PLUS
	default n
	help
		Power calculation for mtk Soc.
		According to platform characters(share-buck..etc), return correct power
		of core and cluster for scheduler to refer.
endmenu

menu "MTK Heterogenous MultiProcessor Scheduler"

config SCHED_HMP
	bool "(EXPERIMENTAL) Heterogenous multiprocessor scheduling"
	depends on SCHED_MC && FAIR_GROUP_SCHED && !SCHED_AUTOGROUP
	help
	  Experimental scheduler optimizations for heterogeneous platforms.
	  Attempts to introspectively select task affinity to optimize power
	  and performance. Basic support for multiple (>2) cpu types is in place,
	  but it has only been tested with two types of cpus.
	  There is currently no support for migration of task groups, hence
	  !SCHED_AUTOGROUP.

config SCHED_HMP_PRIO_FILTER
	bool "(EXPERIMENTAL) Filter HMP migrations by task priority"
	help
	  Enables task priority based HMP migration filter. Any task with
	  a NICE value above the threshold will always be on low-power cpus
	  with less compute capacity.
	  If unsure say N here.

config SCHED_HMP_PRIO_FILTER_VAL
	int "NICE priority threshold"
	default 5
	depends on SCHED_HMP_PRIO_FILTER

config HMP_FREQUENCY_INVARIANT_SCALE
	bool "(EXPERIMENTAL) Frequency-Invariant Tracked Load for HMP"
	depends on !ARCH_SCALE_INVARIANT_CPU_CAPACITY
	help
	  Scales the current load contribution in line with the frequency
	  of the CPU that the task was executed on.
	  In this version, we use a simple linear scale derived from the
	  maximum frequency reported by CPUFreq.
	  Restricting tracked load to be scaled by the CPU's frequency
	  represents the consumption of possible compute capacity
	  (rather than consumption of actual instantaneous capacity as
	   normal) and allows the HMP migration's simple threshold
	  migration strategy to interact more predictably with CPUFreq's
	  asynchronous compute capacity changes.

config HMP_TRACER
	bool "(EXPERIMENTAL) Profile HMP scheduler"
	help
	  Profile HMP scheduler
	  Trace the update of cfs rq, load, and hmp_statisics to evaluate if
	  the schedule decision is as expected.
	  If unsure say N here.

config SCHED_HMP_PLUS
	bool "(EXPERIMENTAL) Corepilot enhancement"
	depends on SCHED_HMP
	default n
	help
	  Corepilot hmp enhancement.
	  1. Do hmp_idle_pull at idle_balance
	  2. At global balance, consider the tasks in rq, move heaviest/lightest
	  of first 5 tasks in rq.
	  3. Enhance down migration rule: Do not migrate task when big core
	  is idle
endmenu
