This is to add capability for vendor to decide whether a cpufreq update
is needed, e.g. up/down rate limit.
Using restricted hook since it can be called from scheduler wakeup path.
Bug: 170511085
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: If9adea3a3e31efbf3858fbd009665a07dc70c638
(cherry picked from commit f9f3464532a045257f8138338b1beda86ef0a3be)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Upstream moved the sugov to DEADLINE class which has higher prio than RT
so it can potentially block many RT use case in Android.
Also currently iowait doesn't distinguish background/foreground tasks
and we have seen cases where device run to high frequency unnecessarily
when running some background I/O.
Bug: 171598214
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I21e9bfe9ef75a4178279574389e417c3f38e65ac
(cherry picked from commit 03177ef82bd942a3f163e826063491bae6ff0ac9)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Add hooks for vendor specific find_energy_efficient_cpu logic.
Bug: 170507310
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I064b501017e32d4f22f8128bed8bf3a1508ab15b
(cherry picked from commit 2f108e2ec6e89609cbae32c5d13d6ad9f2e858cb)
Signed-off-by: Will McVicker <willmcvicker@google.com>
android_rvh_sched_nohz_balancer_kick hook allows vendor modules to
select the busiest CPU in a group during load balance. When the
load balancer could not pull tasks from this busiest CPU due to
affinity restriction, the CPU is cleared from env->cpu. This must
be passed to the vendor module, otherwise we keep selecting the
exempted CPU as the busiest CPU.
Bug: 174338902
Change-Id: Iedaa389a51849da4c3e094d731fe5e39cd909d81
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The following restrict vendor hooks are added. The vendor hook
can selectively opt in for the default scheduler behavior by not
modifying the done argument.
- android_rvh_sched_newidle_balance: For newly idle load balance.
- android_rvh_sched_nohz_balancer_kick: For deciding if an idle
CPU is woken up to do nohz balance or not.
- android_rvh_find_busiest_queue: For selecting the busiest runqueue
among the CPUs in the busiest group selected in find_busiest_group.
- android_rvh_migrate_queued_task: Vendor implementations may require
both source and destination CPUs runqueue locks to be held while
calling set_task_cpu() during a task migration. Add a hook when
a queued task is migration so that vendor implementation can detach
the task and call set_task_cpu() with both runqueue locks held.
Bug: 173661641
Change-Id: I6a09226081061b6433e4231359be252a0f28f04b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Right now, invocation of find_lowest_rq() vendor hook is made before
error checks and also, cpupri_find() isn't exported either. It would be
appropriate to move invocation of find_lowest_rq() vendor hook after
error checks are done & calling cpupri_find().
Bug: 173559623
Change-Id: I298dffd39be0451b0b154930ace4e16763c6e78d
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Create a vendor hook for jiffies updates by the
tick_do_timer_cpu.
Bug: 148928265
Change-Id: Ia442e20d446b8ce4f2b3f2be76655e72919c76eb
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
Create a trace hook when RT tasks are throttled. This allows
vendors to debug long RT runs.
Bug: 172264047
Change-Id: I534959f8e8d714463aac2f9f1c5627d2e735f543
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
For modifying load balance policy, we add the hook on
find_busiest_group().
It allows us to modify load balance paths.
Bug: 168248326
Signed-off-by: YT Chang <yt.chang@mediatek.com>
Change-Id: I77ec043576139806551b978eb1bdf9f637442dfb
The hooks function of scheduler tick will need to
insert multiple instances, so that use vendor hook
instead of restricted vendor hook.
Bug: 165787557
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: I750da26452c657d83d5f8c520bf7008693c43a6b
Add hooks to collect scheduling information and apply vendor's
tuning when task's scheduling priority is changed
Bug: 163431711
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: Ic85835852690d0060666107d9108560f5023496b
Add vendor hooks for vendor-specific scheduling.
android_rvh_select_task_rq_rt:
To perform vendor-specific RT task placement.
android_rvh_select_fallback_rq:
To restrict cpu usage.
android_rvh_scheduler_tick:
To collect periodic scheduling information and to schedule tasks.
android_rvh_enqueue_tas/android_rvh_dequeue_task:
For vendor to be aware of the task schedule in/out.
android_rvh_can_migrate_task:
To limit task migration based on vendor requirements.
android_rvh_find_lowest_rq:
To find the lowest rq for RT task with vendor-specific way.
Bug: 155241766
Change-Id: I926458b0a911d564e5932e200125b12406c2deee
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
For modifying task placement policy, we add the hook on the top of
select_task_rq_fair(). It allows us to modify wakeup/fork/exec balance
paths.
Bug: 158263250
Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I80ff870453472e183ab2aae7381bff91e49ae296