Add hooks to capture various per-zone memory stats when
a trigger threshold is hit.
Bug: 178721511
Change-Id: Ibe39263ddb05ffc3fa63b5225497a90c6480c8d7
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
Initial kernel bootup logs get overwritten after running
for a long time, and there can be debugging scenario where
we need initial ~100s bootup logs for debugging.
'android_vh_initial_logbuf' vendor hook is helping in
achieving this purpose.
Bug: 185182649
Change-Id: I706824aeb566c09ecaf4b5900973d6cee8a2f35b
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Add a restricted vendor hook to notify that a cpu controller
cgroup is online.
Bug: 184920911
Change-Id: I7d37f38c24ce146eabb4716a959aee703d71926e
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Add vendor hook to get signal for vendor-specific tuning.
Bug: 184898838
Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d
Vendor hook for making sinks comply to pSnkStby requirement.
Hook is an alternate to the following patch series:
https://patchwork.kernel.org/project/linux-usb/list/?series=461087
OOT_Bug:
Bug: 184607655
Bug: 168245874
Bug: 173252019
Bug: 162789342
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I39510690ed866cbbc74ef50a18136bf2d5a95aac
Add a hook after receiving the source capabilities from the partner
port. Pass the address of the source capability array so that vendor
code is able to access them.
OOT bug:
Bug: 181629276
Bug: 169215197
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I11c4a7919c248690e63c3bfbebfa6b8d711175a6
linux/usb/pd.h has a bunch of timers for which the Type-C spec defines
a range of values. These values have to be tuned based on the latency
observed in a specific architecture. However, linux opensource sets
them to a specific value without providing a mechanism to set board
specific values. While a generic way is figured out, a vendor hook
is needed in the interim.
For instance, tCCDebounce can have a value between 100msec - 200msec.
OOT_bug:
Bug: 184308605
Bug: 168245874
Bug: 173252019
Change-Id: I278b34654a7e48990b6ebe25fbe17e3aa4165098
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
A vendor hook is added in post_init_entity_util_avg before
a new cfs task's util is attached to cfs_rq's util so that
vendors can gather and modify se's information to modify
scheduling behavior and DVFS as they want.
trace_android_rvh_new_task_stats is not a proper hook because
it is called after the task's util is attached to cfs_rq's util,
which means updating cfs_rq's sched_avg and DVFS request are done.
Bug: 184219858
Signed-off-by: Choonghoon Park <choong.park@samsung.com>
Change-Id: I2deaa93297f8464895978496c9838cdffaa35b7f
Add vendor hook to get the binder message for vendor-specific tuning.
Bug: 182496370
Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: Id47e59c4e3ccd07b26eef758ada147b98cd1964e
timerfd doesn't create any wakelocks, but eventpoll can. When it does,
it names them after the underlying file descriptor, and since all
timerfd file descriptors are named "[timerfd]" (which saves memory on
systems like desktops with potentially many timerfd instances), all
wakesources created as a result of using the eventpoll-on-timerfd idiom
are called... "[timerfd]".
However, it becomes impossible to tell which "[timerfd]" wakesource is
affliated with which process and hence troubleshooting is difficult.
Adding vendor hooks to allow vendor to assign appropriate names to
timerfd descriptors and eventoll wakesource.
Bug: 155142106
Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: I330a42ab48bed4b26d5eb2f636925c66061165ec
Add a hook in account_process_tick, which help us to get information
about the high load task and the cpu they running on.
Bug: 183260319
Change-Id: I54162ce3c65bd69e08d2d4747e4d4883efe4c442
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
This hook is for addressing hardware anomalies where
TCPC_POWER_STATUS_VBUS_PRES bit can return 0 even before falling
below sSinkDisconnect threshold.
Handler has to set bypass to override the value that would otherwise
be returned by this function.
Handler can set vbus or clear vbus to indicate vbus present or absent
OOT_bug:
Bug: 183149028
Bug: 168245874
Bug: 173252019
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I2ca994d49b37bf8600c5913b892fde9acd0dc896
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Needed to implement chip specific features that are not defined
in the Type-C spec.
OOT_bug:
Bug: 169213252
Bug: 168245874
Bug: 173252019
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ibd7b9171f105321c3010fb5b0a67d76a91224800
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Needed to implement chip specific features that are not defined
in the Type-C spec.
OOT_bug:
Bug: 169213252
Bug: 168245874
Bug: 173252019
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I36fe75dddd8cd4e2054db01ed4fee7ea08dd8702
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Remove the set_sugov_sched_attr hook which is no longer needed with a
modular governor. The IOWait hook must stay, however.
Bug: 171598214
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Ie68df673bc78ca76c90ba1e6c32ecaa4bba10c89
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