menu "MTK load balance and schedule enhancement"

config MTK_IDLE_BALANCE_ENHANCEMENT
	bool "mtk load balance enhancement"
	depends on SMP
	default n
	help
	  Mediatek aggressive idle balance, include
	  1. for runnable tasks with idle prefer attributes
	  2. for runnable and running tasks with min_cap(dynamic floor)
	  3. migrate runnable task directly and
		use stop machine to migrate running task

config MTK_SCHED_INTEROP
	bool "mtk scheduling interopation enhancement"
	default y
	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 "mtk scheduling trace, output mtk schedule trace into FTRACE"
	default n
	help
	  MTK scheduling trace, output schedule trace into FTRACE
	  the ftrace api for scheduling is mt_sched_printf and
	  used for scheduling module to output info to ftrace
	  Say Y to enable mtk scheduling trace

config MTK_SCHED_DEBUG
	bool "mtk scheduling log, also output schedule 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.

endmenu
menu "MTK Energy Aware Scheduler Plus"
config MTK_SCHED_EAS_POWER_SUPPORT
	bool "Enable MTK power calculation for EAS"
	depends on MTK_UNIFY_POWER
	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 "Heterogenous multiprocessor scheduling"
	default n
	depends on SCHED_MC && FAIR_GROUP_SCHED && !SCHED_AUTOGROUP
	help
	  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"
	default y
	depends on SCHED_HMP
	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 SCHED_HMP_PLUS
	bool "(EXPERIMENTAL) Corepilot enhancement"
	depends on SCHED_HMP
	default y
	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

config MTK_SCHED_BOOST
	bool "mtk scheduling boost enhancement"
	depends on SCHED_DEBUG && CPUSETS && SCHED_HMP && \
		DEFAULT_USE_ENERGY_AWARE
	default n
	help
	  Sched Boost type:
	  0:  cancel sched boost
	  1:  prefer boost  ALL tasks to big cores
	  2:  foreground task move to big cores
endmenu

menu "MTK runqueue statistic calculation"

config MTK_SCHED_RQAVG_KS
	bool "Enable runqueue stat calculation used in kernel space operation"
	depends on SMP && SCHED_HMP
	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 stat calculation used in user space operation"
	depends on SMP && SCHED_HMP && HIGH_RES_TIMERS
	help
	  MTK runqueue staticsic calculation
	  used in user space operation.
	  TLP estimation for user space
	  CPUfreq governors.

config MTK_SCHED_CPULOAD
	bool "Enable timing-base CPU loading tracking in scheduler"
	depends on MTK_SCHED_RQAVG_US
	help
	  Support timing-base CPU loading tracking
	  in scheduler tick.
	  Which helps load tracking in time-base view
	  and more quick response in loading change.

config MTK_SCHED_SYSHINT
	bool "Enable asynchronus hint to get loading change in time"
	help
	  Support asynchronus hint for external modules
	  to get loading change notification from scheduler
	  in time that helps resource control
	  in low latency.

config MTK_RT_THROTTLE_MON
	bool "mtk 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
