This reverts commit 242b11e574.
The hook android_vh_pidfd_open is not used by any vendor, so remove it
to help with merge issues with future LTS releases.
If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.
Bug: 203756332
Bug: 238725692
Cc: xiaofeng <xiaofeng5@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I77afe002bebc3b3e97ea7a28faae74e9cb8a6718
This reverts commit 8b19ed264b.
The hook android_vh_mmput is not used by any vendor, so remove it to
help with merge issues with future LTS releases.
If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.
Bug: 203756332
Bug: 238821038
Cc: xiaofeng <xiaofeng5@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idd40f231640723d2342a9dbac7e9206a800e82dd
Add vendor hook when detecting process status through
pidfd_open.
Bug: 238725692
Change-Id: I565988cb8bf6dd44ab4dc15c410c2dcf50703def
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
The inclusion of the internal kernel/cgroup/cgroup-internal.h header
broke some androidci builds.
Bug: 233047575
Fixes: 1590a0e8e1 ("ANDROID: GKI: include more type definitions in vendor hooks")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I3139b63e5bea277c6687ce1c3c69db35059f3825
After 7b26719a77c4 ("ANDROID: GKI: use internal type definitions in
vendor hooks") we stopped providing a forward declaration of 'struct
uclamp_se' and instead relied on pulling its definition from
linux/sched.h. the 'uclamp_se' structure is conditionally defined based
upon CONFIG_UCLAMP_TASK therefore causing a build error to show up for
the android_rvh_uclamp_eff_get trace point.
Fix this by providing a forward declaration of 'struct uclamp_se' like
before.
Fixes: 7b26719a77c4 ("ANDROID: GKI: use internal type definitions in vendor hooks")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Change-Id: Iaa803d149150c1703435f9cfa52ea1406a9521fd
This reverts commit cadbca1c5e.
The hook android_vh_set_task_comm is not used by any vendor, so remove
it to help with merge issues with future LTS releases.
If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.
Bug: 203756332
Bug: 189352151
Cc: ted.lin <ted.lin@oneplus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I005ad1c1a55f8646e5bbccd142827eed553411f6
This reverts part of commit 54f66141a8.
The hook android_rvh_entity_tick is not used by any vendor, so remove
it to help with merge issues with future LTS releases.
If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.
Bug: 203756332
Bug: 183674818
Cc: lijianzhong <lijianzhong@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I92acc11802939d1ebfcc8253490193019567695d
This reverts part of commit 53e8099784.
The hook android_rvh_check_preempt_wakeup_ignore is not used by any
vendor, so remove it to help with merge issues with future LTS releases.
If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.
Bug: 203756332
Bug: 182441701
Cc: xieliujie <xieliujie@oppo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I69bdc14143760bfdd07bbd72ed3d5a4127fbc4c8
When a task yields, it relinquishes the cpu and
scheduler is tasked to find another task.
However our vendor scheduler logic implementation
could return the same task leading to a loop where
the yielded task gets to run back, so add hook point
in do_sched_yield() for vendor can do some work
before task is scheduled.
Bug: 205804537
Change-Id: I6528c3f4b0ee360559ef9c97cb1eb2b2d1357870
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
These hooks will do the following works:
a) record the time of the process in various states
b) Make corresponding optimization strategies in different hooks
Bug: 205938967
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
As restricted hooks have been introduced, regular vendor hooks are no
longer necessary.
Bug: 187917024
Change-Id: Ia70e9dd1bd7373e19bdc82e90a2384201076bc0b
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Pre and post tracepoints in force_compatible_cpus_allowed_ptr() need
to be restricted hooks so that they can sleep.
The old non-restricted versions need to stay in place temporarily for
KMI stability. They will be removed by aosp/1742588.
Bug: 187917024
Change-Id: If630554b1c8fa2e8ccb79c89945c55e17756e6a8
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Module code would like to hold some locks when affinity is being updated
for 32 bit task exec.
Create pre and post tracepoints in force_compatible_cpus_allowed_ptr()
Bug: 187917024
Change-Id: I95bff9f4d5b5d37c1d5440acbd6857d2855c2b43
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Add android_rvh_find_new_ilb to select a next ilb cpu for vendors.
Bug: 190228983
Change-Id: Iba1a0cd9cdc22dcf628dd33f8d838fe513a4818f
Signed-off-by: Choonghoon Park <choong.park@samsung.com>
Add a hook to tag task by its comm.
Easy way to identity a task by its tag.
Bug: 189352151
Signed-off-by: ted.lin <ted.lin@oneplus.com>
Change-Id: I32f2f7cec6643f4bd48312b9cffa770c902cebf3
Add hook to dup_task_struct for vendor data fields initialisation.
Bug: 188004638
Change-Id: I4b58604ee822fb8d1e0cc37bec72e820e7318427
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
Add a hook in irqtime_account_process_tick, which helps to get
information about the high load task.
Bug: 187904818
Change-Id: I644f7d66b09d047ca6b0a0fbd2915a6387c8c007
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
Add vh before and after __update_load_avg_se
in order to collect load change of tasks.
Bug: 185557444
Change-Id: I210973f7e388164b68ed766074d1420cdf9d4c32
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
add vendor hooks to compute new cpu freq for oem feature.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I232d2e1ae885d6736eca9e4709870f4272b4873d
add vendor hooks for cpu affinity to support oem's feature.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I3402abec4d9faa08f564409bfb8db8d7902f3aa2
android_rvh_check_preempt_wakeup hook is in place to allow vendor
modules to force the running task preemption by the waking task.
Update the tracepoint to accept another input to not preempting
the current running task. The hook is moved further down so that
it can be updated to pass the sched_entity structure corresponding
to waking and running tasks in the next patch.
Bug: 184575210
Change-Id: Id4f45ba2819802636b6b86ed34c124771d0d69eb
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
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>
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 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>
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
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
move hook to collect scheduling information and apply vendor's
tuning before task's scheduling priority is changed
Bug: 163431711
Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
Change-Id: I61a7ab663316c0fbcb28d1b6e523649a6374b492
(cherry picked from commit 5cf5bc7523bd5608590de487de896c1026161a18)
Vendor may have their own behavior for determing uclamp value.
Bug: 170507972
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I33f8adc7240f6a44f16446421536047db2794989
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
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 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
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
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>
Vendor hooks required explicitly defining macros or inline functions
to handle the non-GKI build case (!CONFIG_ANDROID_VENDOR_HOOKS). Added
support for generating them automatically so the macros are no longer
required.
Both models are now supported so we can transition.
Bug: 177416721
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I01acc389d315a5d509b0c48116854342a42e1058
Fix an issue for non-GKI builds found by the 0-day test bot:
kernel/sched/fair.c: In function 'select_task_rq_fair':
>> kernel/sched/fair.c:6766:6: error: implicit declaration of function
'trace_android_rvh_select_task_rq_fair_enabled';
did you mean 'trace_android_rvh_select_task_rq_fair'?
6766 | if (trace_android_rvh_select_task_rq_fair_enabled())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| trace_android_rvh_select_task_rq_fair
cc1: some warnings being treated as errors
Reported-by: kernel test robot <lkp@intel.com>
Fixes: c7ba09ce6a ("ANDROID: sched/fair: Sync task util for strf hook")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I1b15b9ada83dc5b2678cef3910a7aedc0d19f174
"flags" is added to the vendor hook parameter so that the module can know
the event type of task enqueue/dequeue.
Bug: 176917922
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
Change-Id: I7cc60908e301d75393bdf84861878a94de80d683
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>
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