Commit Graph

69 Commits

Author SHA1 Message Date
Rick Yiu
b8545ebadd ANDROID: sched: Add vendor hook for rt util update
Vendor may have need to track rt util.

Bug: 201261299
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I2f4e5142c6bc8574ee3558042e1fb0dae13b702d
2022-08-01 13:20:13 +00:00
Rick Yiu
e8762ad424 ANDROID: sched: Add vendor hook for util-update related functions
Vendor may have the need to implement their own util tracking.

Bug: 201260585
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I973902e6ff82a85ecd029ac5a78692d629df1ebe
2022-08-01 13:19:59 +00:00
Giuliano Procida
9a19ce82a2 ANDROID: GKI: forward declare struct cgroup_taskset in vendor hooks
The inclusion of the internal kernel/cgroup/cgroup-internal.h header
broke some androidci builds.

Bug: 233047575
Fixes: d5f809c84d ("ANDROID: GKI: use public type definitions in vendor hooks")
Change-Id: Iacca4b8518b9a9c45c927a58621383e66022cb5a
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-19 12:47:39 +00:00
Florian Fainelli
9738c794d6 ANDROID: Fix build error with CONFIG_UCLAMP_TASK disabled
After 7b26719a77 ("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: 7b26719a77 ("ANDROID: GKI: use internal type definitions in vendor hooks")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Change-Id: Iaa803d149150c1703435f9cfa52ea1406a9521fd
2022-07-19 12:47:39 +00:00
Giuliano Procida
76ed7e5d56 ANDROID: GKI: use internal type definitions in vendor hooks
This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.

The following types are now fully defined in ABI XML.

* `struct binder_transaction`
* `struct binder_thread`
* `struct binder_proc`
* `struct printk_ringbuffer`
* `struct printk_record`

symbol '__alloc_pages' changed
  CRC changed from 0x6497cbd to 0x230fd8e5

symbol '__find_vma' changed
  CRC changed from 0xf11b619f to 0xb0069a61

symbol '__free_pages' changed
  CRC changed from 0xba5eeb68 to 0xdc394265

... 195 omitted; 198 symbols have only CRC changes

Bug: 233047575
Change-Id: I807227f6161f0a44ec3657dc8cdb8a3fdffc40b3
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-19 12:47:36 +00:00
Giuliano Procida
45d3ead9a8 ANDROID: GKI: use public type definitions in vendor hooks
This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.

The following type is now fully defined in ABI XML.

* `struct timekeeper`

symbol '__traceiter_android_rvh_account_irq' changed
  CRC changed from 0x18e0dccf to 0x4e82c102

symbol '__traceiter_android_rvh_after_dequeue_task' changed
  CRC changed from 0x7efc419b to 0x1c0066e1

symbol '__traceiter_android_rvh_after_enqueue_task' changed
  CRC changed from 0xd6f0f603 to 0xf7eaafb8

... 75 omitted; 78 symbols have only CRC changes

Bug: 233047575
Change-Id: I8c04eede1b9d9e788abce95cb31dbd19916774ef
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-19 12:47:36 +00:00
Liujie Xie
78ac5ea5e3 ANDROID: vendor_hooks: Add hooks for account process tick
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>
(cherry picked from commit 63399b4e2e)
2022-07-19 03:52:55 +00:00
Liangliang Li
bafafe0ec4 ANDROID: vendor_hooks: Add hooks to dup_task_struct
Add hook to dup_task_struct for vendor data fields initialisation.

Bug: 188004638

Change-Id: I4b58604ee822fb8d1e0cc37bec72e820e7318427
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit f66d96b14a)
2022-07-19 03:52:54 +00:00
Liangliang Li
bf3b384e08 ANDROID: vendor_hooks: Add hooks for account irqtime process tick
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>
(cherry picked from commit fe580539f6)
2022-07-19 03:52:53 +00:00
Abhijeet Dharmapurikar
fd0301b6de ANDROID: sched/core: pass the target cpu in rvh_ttwu_cond hook
Allow the vendor module to know the target cpu for better decisions on
whether to enforce __ttwu_queue_wakelist() based wakeup.

Bug: 234483895
Change-Id: Ic27054a5f6adc040fa3cadbd57d37608bf353c5f
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-07-19 03:52:38 +00:00
Shaleen Agrawal
aec40de3d7 ANDROID: cputime: seprate irq entry and exit tracehooks
Currently the code has single hook for tracking irqs. However
modules need to deduce start and end of the irq.

Create separate hooks for irq start and end since the
cputime has already figured it out.

Bug: 231341763
Change-Id: Ie0dd503b283d83f69d01171ebd1cd6127c3bafd0
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2022-05-12 10:02:42 +05:30
Shaleen Agrawal
7045a3408d ANDROID: sched: Add flags parameter to enq/deq after tracehooks
Currently, the enqueue and dequeue tracehooks pass in the flags
parameter, however, the after tracehooks that follow do not.

Bug: 226570047
Change-Id: I51cb50054562893271e5d3efd7c6bd028977622d
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-05-04 13:39:14 -07:00
Stephen Dickey
457758d86c ANDROID: update is_cpu_allowed hook prototype
Vendor module needs access to the task structure
through is_cpu_allowed tracehook to better
assess whether the chosen cpu can be allowed.

Update the existing is_cpu_allowed tracehook to
pass the task struct of the task currently being
handled.

Bug: 228392842
Change-Id: I882b593ccb77da0755e076c7e636db304ee74b42
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-04-20 17:38:57 +00:00
Stephen Dickey
40bcf12c6b ANDROID: sched: vendor hook for sched_getaffinity
Just as sched_getaffinity updates the affinity based upon the
active_mask, the vendor hook needs to be able to constrain
the task's affinity.

Introduce a hook to sched_getaffinity such that vendor modules
are able to update the affinity.

Bug: 229133948
Change-Id: I5c501e9204d4fcc6688f675a41be60ef5a2d1075
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-04-20 00:30:01 +00:00
Abhijeet Dharmapurikar
fad13230ac ANDROID: sched: create trace points for 32bit execve
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>
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-04-19 22:23:21 +00:00
Saravana Kannan
0ef21e1c1a ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
When vendor hooks are added to a file that previously didn't have any
vendor hooks, we end up indirectly including linux/tracepoint.h.  This
causes some data types that used to be opaque (forward declared) to the
code to become visible to the code.

Modversions correctly catches this change in visibility, but we don't
really care about the data types made visible when linux/tracepoint.h is
included. So, hide this from modversions in the central vendor_hooks.h file
instead of having to fix this on a case by case basis.

This change itself will cause a one time CRC breakage/churn because it's
fixing the existing vendor hook headers, but should reduce unnecessary CRC
churns in the future.

To avoid future pointless CRC churn, vendor hook header files that include
vendor_hooks.h should not include linux/tracepoint.h directly.

Bug: 227513263
Bug: 226140073
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b
2022-04-06 08:31:36 -07:00
Xuewen Yan
c6fb9f6636 ANDROID: Add vendor hook to the effective_cpu_util
android_rvh_effective_cpu_util:
	To perform vendor-specific cpu util, it is used in EAS/schedutil/thermal.

The effective_cpu_util would be called when thermal calc the dynamic power,
it's non-atomic context, so set the hook be restricted.

Bug: 226686099
Test: build pass

Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Change-Id: I6fd77f44ca4328f5ef37d96989aa2e08d65e29bb
2022-04-01 17:12:18 +00:00
Xuewen Yan
74710cbec0 ANDROID: Add vendor hook to the deadline scheduler
android_rvh_select_task_rq_dl:
    To perform vendor-specific DL task placement.

Bug: 207585485
Test: build pass

Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Change-Id: Ibe147276b52a1be877802a2e53e87ba3eb8c9161
(cherry picked from commit 478f3ee1d3e5be03ecd3603643abfc1186468881)
2022-03-16 14:10:39 +08:00
Namkyu Kim
f79e49085d ANDROID: Add a vendor hook that allow a module to modify the wake flag
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
(cherry picked from commit 97368fc2dc)
(cherry picked from commit 0d0f0c5020bc425c9a51c8d17b16ca831c2598fb)
2022-02-19 17:08:19 +00:00
Rick Yiu
97d6c580df ANDROID: sched: Add trace for __setscheduler_uclamp
To know per-task uclamp request.

Bug: 191973176
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: Ibd40391f2228db5daa410198339237879e67a078
Signed-off-by: Will McVicker <willmcvicker@google.com>
2022-02-08 11:33:22 -08:00
Rick Yiu
265615cfd3 ANDROID: sched: Add vendor hook for util_est_update
Vendor may have its own estimated utilization.

Bug: 170508405
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I6055907de75ace4586c3ad854d40f42e3bf40147
Signed-off-by: Will McVicker <willmcvicker@google.com>
2022-02-08 11:33:22 -08:00
Rick Yiu
abf44714df ANDROID: sched: Add vendor hook for uclamp_eff_get
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
Signed-off-by: Will McVicker <willmcvicker@google.com>
2022-02-08 11:33:22 -08:00
Rick Yiu
87475cbbe1 ANDROID: sched: Add vendor hook for cpu_overutilized
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>
(cherry picked from commit f5998fbf2d)
2022-02-08 11:33:21 -08:00
Stephen Dickey
1050e6e021 ANDROID: sched: core: hook for get_nohz_timer_target
Allow module to control behavior of get_nohz_timer_target.

Bug: 205164003
Change-Id: I38cb201ebf06db7bbce0d6cb68dbbe3729355be8
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-01-24 19:25:26 +00:00
Stephen Dickey
a243208877 ANDROID: kernel: sched: tracehook for is_cpu_allowed
To support the replacement of pause, is_cpu_allowed is the best
place to hook into the code to restrict CPUs for a module based
implementation. This restricts select_fallback_rq, select_task_rq,
and __migate_task, to ensure the cpu is allowed.

Include a hook in is_cpu_allowed to allow the module to control
which cpu is allowed during a migration event.

Bug: 205164003
Change-Id: I665e4d39318079bdb99bd248969ecb9eb528f9df
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-01-24 19:25:13 +00:00
Choonghoon Park
cabf26b4eb ANDROID: sched: Add vendor hook to select ilb cpu
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>
2022-01-10 17:11:39 +00:00
Choonghoon Park
25d620ba79 ANDROID: GKI: sched: add rvh for new cfs task util
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
2022-01-10 17:11:30 +00:00
Park Bumgyu
ca6883251a ANDROID: sched: add rvh for rebalance domains
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>
2022-01-10 17:11:25 +00:00
Tengfei Fan
46161882da ANDROID: sched: add hook point in do_sched_yield()
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>
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
2021-12-14 15:21:59 +00:00
Satya Durga Srinivasu Prabhala
c44fcf911c ANDROID: sched/fair: fix place_entity() vendor hook
place_entity() vendor hook is meant to tweak vruntime by vendor
modules as needed, but with current form of the hook that is not
possible as vruntime is passed by it's value. Fix it by switching
to pass by reference.

Bug: 175448877
Change-Id: Ibb51592f94da31019fa98a6767d080ec61daafe6
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2021-12-03 22:17:58 +00:00
Shaleen Agrawal
12d9e3b85d ANDROID: Add vendor hook while registering energy model
Vendor architectures may contain CPUs running on the same clock line
which contain different capacities. Add a tracehook in this path to
allow vendor modules to skip implicit check to prevent crashes.

Bug: 206602617
Change-Id: Ica01a214689607b8d79b370c20bc9a8c44ca2117
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-11-18 20:49:39 +00:00
Shaleen Agrawal
b8146375bb ANDROID: sched: Add parameter to android_rvh_set_iowait
While overriding sugov behavior, it is also necessary to know the
runqueue on which the task is going to be enqueued.

Bug: 171598214
Change-Id: I1491a2be34a6e615c5d4bc68e095647744870233
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-11-09 12:30:01 -08:00
Stephen Dickey
81a0b58261 ANDROID: sched: add hook to rto_next_cpu
Restricted vendor hook to modify the cpu selected in rto_next_cpu,
which is needed for the implementation of CPU Pause.

Bug: 205164003
Change-Id: I0dc675e54f7f116d538840262fbb0ba6d28246f4
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2021-11-09 00:42:30 +00:00
Stephen Dickey
a027f0d72e ANDROID: sched: add hook to set_cpus_allowed_ptr_locked
It is necessary to update the valid mask to implement CPU Pause
from a vendor module. Introduce a hook to allow this.

Bug: 205164003
Change-Id: Ic99b74d17f361453b044e115a54698e566db13b6
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2021-11-09 00:42:19 +00:00
lijianzhong
bc70904edc ANDROID: sched: Add vendor hooks for sched.
Add vendor hooks in scheduler to support OEM's value adds.

Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I8415958749948b3702e411f835c227ad4f8d8e92
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-10-18 15:11:09 +00:00
Pavankumar Kondeti
f7ede2b168 ANDROID: sched: Update android_rvh_check_preempt_wakeup hook
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>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-10-14 23:21:43 +00:00
Pavankumar Kondeti
771633a2e9 ANDROID: sched: Add restricted vendor hooks in CFS scheduler
Add restricted vendor hooks in CFS scheduler class to allow
customizations in vendor modules.

Bug: 180668820
Change-Id: I69bd90e11220d7607b075a3aa687059deaa60439
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2021-10-12 15:36:45 -07:00
Pavankumar Kondeti
1085eff98a ANDROID: sched: Add restrict vendor hooks for balance_rt()
Add rvh called android_rvh_sched_balance_rt to influence
balance_rt() from vendor modules.

Bug: 178572414
Change-Id: I555c8ebcf5a3a5d8e3ab881ab9aa507f325285c2
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-10-12 15:36:44 -07:00
Pavankumar Kondeti
30c8f87544 ANDROID: sched: Add android_rvh_cpu_cgroup_online hook
Add a restricted vendor hook to notify that a cpu controller
cgroup is online.

Bug: 200103201
Change-Id: I7d37f38c24ce146eabb4716a959aee703d71926e
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2021-09-22 23:17:15 +00:00
xieliujie
09e27d4f36 ANDROID: vendor_hooks: Add hooks for scheduler
Add hooks to support oem's scheduler feature.

Bug: 200103201
Change-Id: I31023844b20923bed1ca216831e7a2431e9ab0c9
Signed-off-by: xieliujie <xieliujie@oppo.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2021-09-22 23:17:07 +00:00
Shaleen Agrawal
99545883fb ANDROID: Sched: Add hooks for scheduler
Add vendors hooks for to facilitate various scheduler value adds.

Bug: 200103201
Change-Id: I5d488ae78ce05f81e6c73b69c56128b065647fec
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2021-09-22 23:16:57 +00:00
Satya Durga Srinivasu Prabhala
c0ba33609e ANDROID: sched: add trace hook to enable EAS for SMP systems
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: 200103201
Change-Id: I583272cc89d44f3e3a4b1c43e3f75d731092ebf6
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2021-09-22 23:16:46 +00:00
Ashay Jaiswal
ca60d78542 Revert "Revert "ANDROID: Sched: Add restricted vendor hooks for scheduler""
This reverts commit 627a494ef3.
Reverting commit to add the vendor hooks back, this is to facilitate
various scheduler value adds.

Bug: 200103201
Change-Id: Ifbd7d235f863e01848c22b8185c4ec94da8c862c
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2021-09-22 23:16:25 +00:00
Frankie Chang
4e77c99cd7 ANDROID: sched: move vendor hook to check scheduling nice value
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)
2021-03-08 17:33:00 +00:00
Greg Kroah-Hartman
627a494ef3 Revert "ANDROID: Sched: Add restricted vendor hooks for scheduler"
This reverts commit 292f430816 as the
upstream scheduler changes causes too many merge conflicts such that the
placement of these hooks can no longer guaranteed to be correct.

Bug: 173725277
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I204571a761d6aecdd6ea99e2e8a3e6824f5261cb
2021-01-25 10:03:24 +01:00
Yun Hsiang
b5a8eefc03 ANDROID: sched: add em_cpu_energy vendor hook
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: 178022444

Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: Iae772cf07881602eea3f27aeb75fba753e7c2635
2021-01-21 12:15:20 +00:00
Choonghoon Park
efd8dbe42d ANDROID: sched: Add rvh for cpu controller cgroup can attach
Add a restricted vendor hook to check whether a set of tasks can
move to other cgroup.

Bug: 175808144

Signed-off-by: Choonghoon Park <choong.park@samsung.com>
Change-Id: If7bac83e0d2d1069b1436331989c3926645eab19
2021-01-21 09:43:08 +09:00
Yun Hsiang
a2d89d4f3a ANDROID: schedutil: add vendor hook for adjusting util to freq calculation
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: 177845439

Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I9aa9079f00af7d3380b19f2fe21b75cddd107d15
(cherry picked from commit 3122e3ec9672036384304fdeaa1b1815f60ba817)
2021-01-19 19:02:25 +00:00
Todd Kjos
943c3b3124 ANDROID: simplify vendor hooks for non-GKI builds
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
2021-01-14 19:03:46 +00:00
Park Bumgyu
a3c57fcffc ANDROID: add flags to android_rvh_enqueue_task/dequeue_task parameter
"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
2021-01-08 16:45:50 +00:00