Vendor may have its own estimated utilization.
Bug: 170508405
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I6055907de75ace4586c3ad854d40f42e3bf40147
Add vendor hook for module init, so we can get memory type and
use it to do memory type check for architecture
dependent page table setting.
Bug: 181639260
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: I95b70d7a57994f2548fddfb2290d4c9136f58785
Add vendor hook for bpf, so we can get memory type and
use it to do memory type check for architecture
dependent page table setting.
Bug: 181639260
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Icac325a040fb88c7f6b04b2409029b623bd8515f
Add vendor hook for creds, so we get the cred information
to monitor cred lifetime.
Bug: 181639260
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: I8f254464e07f9c88336995152479ce91deb13c75
Add vendor hook for avc, so we can get avc_node information
to monitor avc lifetime.
Bug: 181639260
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Idbebeca926c2cb407264f2872b032e1f18462697
Vendor may have their own behavior for determing uclamp value. Also
uclamp_eff_get() is used in uclamp_rq_inc_id() when task is enqueued,
and it is contained in uclamp_eff_value(), there is no much benefit to
hook uclamp_eff_value(), so remove the hook in uclamp_eff_value().
Bug: 170507972
Bug: 180859906
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: Ibf7c043188a77c40baf5b4040b198a4197236089
Add hooks to gather data of unsual aborts and summarize it with
other information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I5f44b12770ae4976a6e3b098bd95a05dea347764
Add a vendor hook after attaching a task to a cgroup to
recognize the group_id for performance tuning
Bug: 181917687
Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
Change-Id: I603afa3d893dd575a7dcb97f83bd9eacb8315bab
(cherry picked from commit de089a37a3d248608a1d5855a4ae82ebad3ec2ab)
A restricted vendor hook for cpufreq transition. The hook is
invoked per policy after changing the policy->cur and passes
policy as an argument.
Bug: 181889516
Change-Id: I6f89850779fdd63e178e227c293f42b7f66fd78d
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This adds some missing hooks for ufs commands, including request,
query, uic, task manager commands, and interrupt events for vendor.
Those can be used for vendor module to understand command history.
Bug: 172305874
Bug: 176940922
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ie447860290f4fbc1e03ad8ae5f50bd02121756cb
Vendor may have their own behavior for determing uclamp value.
Bug: 170507972
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I33f8adc7240f6a44f16446421536047db2794989
Like was done for the other non-upstream methods in
'struct ufs_hba_variant_ops', replace ->fill_prdt() with an Android
vendor hook. This is considered to be better because it avoids any
conflicts with upstream changes to 'struct ufs_hba_variant_ops'.
Note that as a side effect of this change, fill_prdt is no longer
allowed to sleep. That's fine for the only known use of this hook.
Bug: 162257402
Bug: 181359082
Change-Id: I8096932525c27b969193d769aff511a0114b35ad
Signed-off-by: Eric Biggers <ebiggers@google.com>
android_vh_do_wake_up_sync:
To modify the mode value of __wake_up_sync_key
android_vh_set_wake_flags:
To modify the wake flag from a module
Bug: 181743516
Signed-off-by: Namkyu Kim <namkyu78.kim@samsung.com>
Change-Id: I972e2469c3f139373d21f1e8c85974763388a693
This converts the existing android-specific hooks to official vendor hooks.
Per not-restricted hooks, vendor body should not enter into sleep mode by
mutex or similar.
Bug: 181359082
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ic66077b3c42e63a5496a1d0c107bad8ae3601f3c
Add vendor enable_thermal_genl_check logic.
To avoid thermal-hal being woken up all the time by thermal genl events,
only the selected thermal_zone and cooling_device can send events from
kernel.
Bug: 170682696
Test: boot and thermal-hal can receive thermal genl events from kernel
Change-Id: I8f49d67963bed9d6d1f11c74bd274dc8967407c1
Signed-off-by: davidchao <davidchao@google.com>
(cherry picked from commit 88133a5b0b63a55dfb138e2150a6fd22b81c65a2)
Signed-off-by: J. Avila <elavila@google.com>
Currently, cpu_overutilized uses the threshold 80% of cpu capacity, Add
vendor hook so that vendor could define other values.
Bug: 176722431
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: Ic10bd8ebb40f7321cfa10e33ac020e3347ca6550
(cherry picked from commit b199c6e8795791e008cfff6e214676857cd0651c)
Signed-off-by: J. Avila <elavila@google.com>
Add a vendor hook for pagecache hit/miss and other
vendor specific functions.
Bug: 174088128
Bug: 172987241
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: Ie9f14a69a86b8ed81de766e44e30f2eba1d9bd84
Add a vendor hook for costly order page counting
and other vendor specific functions.
Bug: 174521902
Bug: 172987241
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: I89206727a462548cc3500b695d85c83ff003eec7
Add hooks to gather data of kernel fault and summarize it with
other information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I527eddf08be22fa842680bee850f1ef1f5a2c0ed
Add hooks to gather data of bad scheduling and summarize it with
other information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I08a7097b60dd8eebc5c0205b31c463a36f576121
Add hooks to gather data of unfrozen tasks and summarize it
with other information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I6f3ed7320e828a8dd1e7ae5d4449420085a75b17
Add hook to gather data of softlockup and summarize it with
other information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I42b906f17ad689176f0cc5a1a46acd0b5971d6c5
Since we're expecting timers more precisely in short period, add
a vendor hook to calc_index when adding timers. Then we can modify
the index this timer used to make it accurate.
Bug: 178758017
Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
Change-Id: Ie0e6493ae7ad53b0cc57eb1bbcf8a0a11f652828
Include a vendor hook for cpu_up and cpu_down to force the
rebuilding of scheduling domains prior to issuing a new
cpu up/down. Include a Kernel Export for
cpuset_wait_for_hotplug such that vendor hooks may refer
to this functionality, to ensure scheduling domains are
complete.
Bug: 176152285
Change-Id: I778dbc5e4f9d613f39b8c61f244c0f33020a3dd3
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
We add a vendor hook for util to freq calculation in schedutil,
so we need to do corresponding change for energy calculation.
android_vh_em_cpu_energy
adjust energy calculation
Bug: 178047619
Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: Iae772cf07881602eea3f27aeb75fba753e7c2635
Add hook to gather data of bug trap and summarize it with other
information.
Bug: 177483057
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: Ic44fd1c3c4e43f04510a871a8dbeb25aafc45e95
Currently, the frequency is calculated by max freq * 1.25 * util / max cap.
Add a vendor hook to adjust the frequency when the calculation
overestimate.
android_vh_map_util_freq
adjust util to freq calculation
Bug: 177854431
Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I9aa9079f00af7d3380b19f2fe21b75cddd107d15
(cherry picked from commit 3122e3ec9672036384304fdeaa1b1815f60ba817)
Vendor scheduler may not want to rebalance between domains in some case.
New vendor hook is added for vendor to decide whether rebalance domains.
Bug: 176952463
Change-Id: Ie2edbd4b11679786096dd0170496904ae180583c
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
In order to debug critical domain and device power issues, it may be
necessary to disallow certain idle states at runtime. Enable a vendor
hook to check if a domain idle state is allowed for powering down the
domain.
Bug: 175718935
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Change-Id: I403c0c7d272439fb338bbf54a346861559385047
Add vendors hooks for to facilitate various scheduler value adds.
Bug: 176077958
Change-Id: I5d488ae78ce05f81e6c73b69c56128b065647fec
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
At present, EAS gets disabled when on ASYM Capacity systems
if all BIG or Little CPUs gets hot-plugged. Instead of disabling
EAS by default, add trace hook and let vendor decide if EAS should
be disabled or not.
Bug: 176964092
Change-Id: I583272cc89d44f3e3a4b1c43e3f75d731092ebf6
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
When entering cluster-wide or system-wide power mode, Exynos cpu
power management driver checks the next hrtimer events of cpu
composing the power domain to prevent unnecessary attempts to enter
the power mode. Since struct cpuidle_device has next_hrtimer, it
can be solved by passing cpuidle device as a parameter of vh.
In order to improve responsiveness, it is necessary to prevent
entering the deep idle state in boosting scenario. So, vendor
driver should be able to control the idle state.
Due to above requirements, the parameters required for idle enter
and exit different, so the vendor hook is separated into
cpu_idle_enter and cpu_idle_exit.
Bug: 176198732
Change-Id: I2262ba1bae5e6622a8e76bc1d5d16fb27af0bb8a
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
Add a restricted vendor hook to check whether a set of tasks can
move to other cgorup.
Bug: 175808144
Signed-off-by: Choonghoon Park <choong.park@samsung.com>
Change-Id: If7bac83e0d2d1069b1436331989c3926645eab19
There are few vendor hooks available for binder wakeup related
functionality. As they both essentially do the same thing, we can
consolidate them into one.
Bug: 174219217
Change-Id: I44b472e7564eecbe8236ad2eb88b0433195f14d8
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Add a restricted vendor hook when a set of tasks change the cgroups in
the cpu controller. This facilitates various scheduler value adds.
Bug: 175045928
Change-Id: I544046d631f4d6c9bc2b999e054b5a296ec31a81
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Incorporate a vendor hook in the resume cpus path
so that vendor specific activities may take place.
Bug: 161210528
Change-Id: I74d03247491b004e891dbcfe06a478d00a95ba9f
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
We have debug infrastructure built on top of preempt/irq disable/enable
events. This requires modifications to the kernel tracing code. Since
this is not feasible with GKI, we started with registering to the
existing preemptirq trace events. However the performance of wide
variety of use cases are regressed as the rate of preemptirq events
is super high and generic trace events are slow.
Since GKI allows optimized trace events via restricted trace hooks,
add the same for preemptirq event.
Bug: 174541725
Change-Id: Ic8d3cdd1c1aa6a9267d0b755694fedffa2ea8e36
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Create a vendor hook inside of gfp_zone() to modify which allocations
get to enter ZONE_MOVABLE, by zeroing out __GFP_HIGHMEM inside of the
trace hook based on certain conditions.
Separately, create separate trace hooks in the swap-in and readahead
paths to affect the behavior of the tracehook in gfp_zone().
Bug: 158645321
Change-Id: I4a4f0b724267ee120a1e5661f6da5d43d7ef6fc6
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Vendors might want to change tasks affinity settings when they are
moving from one cpuset into the other. Add vendor hook to give control
to vendor to implement what they need.
Bug: 174125747
Change-Id: Icee0405be0bca432002dae4a26ebe945082ce052
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Vendors might want to change tasks affinity settings when they are
moving from one cpuset into the other. Add vendor hook to give control
to vendor to implement what they need in sched_setaffinity().
Bug: 174125747
Change-Id: Ie703448147377cd62e76a58b620a7ab849a04924
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>