Commit Graph

98 Commits

Author SHA1 Message Date
Prakash Gupta
4d7fc7aaec ANDROID: mm, oom: add vendor hook to prevent oom panic
In some cases we would like to bypass oom panic and give the system more
time to cleanup memory. Add vendor hook to allow skipping the oom panic.

Bug: 186875166
Change-Id: I64e74b2c013d6f18d74504777c6559d9ae07e008
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
2022-01-25 23:20:59 +00:00
Gokul krishna Krishnakumar
24bfd162f9 ANDROID: rproc: Add vendor hook for recovery
Add vendor hook for rproc recovery to allow vendor enhancements.

Bug: 215224270
Change-Id: If6f0846c141a4ad40748d552002f65b94d9c52d5
Signed-off-by: Siddharth Gupta <quic_sidgup@quicinc.com>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-01-25 19:16:52 +00:00
Sangmoon Kim
b35a3d1bad ANDROID: Re-apply vendor hooks for rt_mutex information of blocked tasks
This reverts commit bf2290a48a (Revert "ANDROID: vendor_hooks: set
debugging data when rt_mutex is working")

The original patch has been reverted to resolve merge issues.
This patch adds again the vendor hooks for the original purpose.

Bug: 216016261

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I00162d88e2a446e9ece4804def098fcdc63fceb9
(cherry picked from commit d497887b00ac3e5e380123cac4a303d009b570ee)
2022-01-25 12:05:42 +09:00
Sangmoon Kim
3aabda4d52 ANDROID: Re-apply vendor hooks for information of blocked tasks
This reverts commit 31c9ccb138 (Revert "ANDROID: vendor_hooks: add
waiting information for blocked tasks")

And also revert portions of 396a501b1743 (Revert "ANDROID: rwsem: Add
vendor hook to the rw-semaphore")

The original patch has been reverted to resolve merge issues.
This patch adds again the vendor hooks for the original purpose.

Bug: 216016261

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I04ed7b055eee40f7975bd5d74fb73dd080cd76bf
(cherry picked from commit c23da05eac0d35441695caff0b7d0220f92ca8a0)
2022-01-25 12:04:38 +09: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
Hajun Sung
9c25e5d6f5 ANDROID: gic: Add vendor hook to GIC
Add vendor hook for affinity setting to GIC irqchip driver.

GIC irqchip driver support only single CPU for affinity setting.
But GIC HW can support multi target IRQ action, any available CPU can
service IRQ when requested irq arised. This feature is very useful
for some fast irq action required device.
So Add vendor hook to support multi target affinity setting.

Bug: 210559155
Change-Id: If44b2244bb623bf8d4755109a6dca32ac35df795
Signed-off-by: Hajun Sung <hajun.sung@samsung.com>
2022-01-17 08:32:50 +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
Liujie Xie
f4450be6e7 ANDROID: vendor_hooks: Add hooks for improving binder trans
Recognize important binder proc & binder thread and improve their sched
lantency.

Bug: 182952552
Change-Id: I174949bf90a4215a6d27f24abbc7d324a321e662
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2021-12-06 15:14:18 -08:00
Greg Kroah-Hartman
ae4825a553 Revert "ANDROID: rwsem: Add vendor hook to the rw-semaphore"
This reverts commit df18d99dab.

And also revert portions of 9ad8ff902e ("ANDROID: vendor_hooks: add
waiting information for blocked tasks")

In the 5.15.6 kernel release, the rwsem code was reworked such that the
existing Android trace hooks became incorrect and were causing major
merge issues.  Revert the hooks and if they are still needed, they can
be added back later.

Bug: 161400830
Bug: 162776704
Cc: Sangmoon Kim <sangmoon.kim@samsung.com>
Cc: JianMin Liu <jian-min.liu@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifb3d2ed0bdc73b70718820fbf31e775fedb387c5
2021-12-01 13:17:46 +01:00
Mukesh Ojha
0820d8e399 ANDROID: logbuf: Add new logbuf vendor hook to support pr_cont()
Add new logbuf vendor hook android_vh_logbuf_pr_cont()
to capture pr_cont logs.

Bug: 199236943
Change-Id: I76b310fc9caac71b344b6cc25ea36f7f81cb7148
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
(cherry picked from commit 01f2392e13)
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-11-23 09:43:15 +00:00
Mukesh Ojha
976f1840da ANDROID: logbuf: vendor hook for logbuf dump on oops
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: 199236943
Change-Id: I706824aeb566c09ecaf4b5900973d6cee8a2f35b
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
(cherry picked from commit 34fde61f72)
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-11-23 09:43:07 +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
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
Kuan-Ying Lee
c68c223735 ANDROID: syscall_check: add vendor hook for bpf syscall
Through this vendor hook, we can get the timing to check
current running task for the validation of its credential
and bpf operations.

Bug: 191291287

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Ie4ed8df7ad66df2486fc7e52a26d9191fc0c176e
(cherry picked from commit 38abaebab7)
2021-10-29 14:20:14 +08:00
Kuan-Ying Lee
996496b8ea ANDROID: syscall_check: add vendor hook for open syscall
Through this vendor hook, we can get the timing to check
current running task for the validation of its credential
and open operation.

Bug: 191291287

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Ia644ceb02dbc230ee1d25cad3630c2c3f908e41a
(cherry picked from commit a7a3b31d58)
2021-10-29 14:20:13 +08:00
Kuan-Ying Lee
e13e55eae1 ANDROID: syscall_check: add vendor hook for mmap syscall
Through this vendor hook, we can get the timing to check
current running task for the validation of its credential
and related operations.

Bug: 191291287

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: If20bd8bb8311ad10a374033734fbdc7ef61a7704
(cherry picked from commit a5543c9cd7)
2021-10-29 14:20:12 +08:00
Kuan-Ying Lee
f2d4bb3c0e ANDROID: selinux: add restricted vendor hook in selinux
Add restricted vendor hook for selinux_state, so we can
know if the selinux_state is initialized

Bug: 186363840

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Ideed051a1d53ed1bce7d7915e38366264a7d77eb
2021-10-29 14:20:11 +08:00
Kuan-Ying Lee
5ebe162306 ANDROID: module: Add vendor hook
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
2021-10-29 14:20:11 +08:00
Kuan-Ying Lee
1abc68878a ANDROID: kernel: Add restricted vendor hook in creds
Add restricted 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
2021-10-29 14:20:10 +08:00
Kuan-Ying Lee
6605f296d3 ANDROID: security: selinux: Add restricted vendor hook in avc
Add restricted 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
2021-10-29 14:20:10 +08: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
Shaleen Agrawal
632bb51100 ANDROID: sched: add restricted hook to override show_cpufinfo_max_freq
Need to update to restricted hook since the module code registering for
this hook needs to take the task lock and walk over the linked
libraries.

Bug: 194431527
Change-Id: I7093b66f95c3b9c473386ade60d8897426ddbb13
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-10-14 23:21:14 +00:00
Sudarshan Rajagopalan
55b46b6236 ANDROID: mm: vmscan: support equal reclaim for anon and file pages
When performing memory reclaim, support treating anonymous and
file backed pages equally. Swapping anonymous pages out to memory
can be efficient enough to justify treating anonymous and file backed
pages equally.
Create a vendor hook inside of get_scan_count so that equal reclaim of
anon and file pages can be enabled inside of the trace hook based on
certain conditions.

Bug: 175415908
Change-Id: Idac2f1468371549d20dd3e5652c7382dc3d7d9cf
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-10-13 22:25:19 +00:00
Pavankumar Kondeti
d4f032e36b ANDROID: cgroup: Add android_rvh_cgroup_force_kthread_migration
In Android GKI, CONFIG_FAIR_GROUP_SCHED is enabled [1] to help
prioritize important work. Given that CPU shares of root cgroup
can't be changed, leaving the tasks inside root cgroup will give
them higher share compared to the other tasks inside important
cgroups. This is mitigated by moving all tasks inside root cgroup to
a different cgroup after Android is booted. However, there are many
kernel tasks stuck in the root cgroup after the boot.

It is possible to relax kernel threads and kworkers migrations under
certain scenarios. However the patch [2] posted at upstream is not
accepted. Hence add a restricted vendor hook to notify modules when a
kernel thread is requested for cgroup migration. The modules can relax
the restrictions forced by the kernel and allow the cgroup migration.

[1] f08f049de1
[2] https://lore.kernel.org/lkml/1617714261-18111-1-git-send-email-pkondeti@codeaurora.org

Bug: 184594949
Change-Id: I445a170ba797c8bece3b4b59b7a42cdd85438f1f
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2021-10-12 16:44:41 -07:00
Pavankumar Kondeti
d723168991 ANDROID: cpufreq: Add a restricted vendor hook for freq transition
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>
2021-10-12 15:36:46 -07: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
Guangming Cao
f21e6e9178 ANDROID: iommu: Add vendor hook for iova allocation and free tracking
Add vendor hook for iommu_dma_alloc_iova and iommu_dma_free_iova
to allow vendor enhancement.

Bug: 187861158

Change-Id: I2ebe8b24318bd5292edc66a94d7109332d478212
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
(cherry picked from commit 15acc8fac6)
2021-10-12 02:45:53 +00:00
Abhijeet Dharmapurikar
93c605314b ANDROID: sched: Add vendor hooks for update_topology
Add a vendor hook for modules to know when the topology
code has determined the max capacity of cpus.

Bug: 200103201
Change-Id: Ia3e22479059d2e57500cbdd46504aa4773af6e4a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2021-09-22 23:17:22 +00: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
Satya Durga Srinivasu Prabhala
de3955742d ANDROID: binder: consolidate wakeup vendor hooks into one
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: 200103201
Change-Id: I44b472e7564eecbe8236ad2eb88b0433195f14d8
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2021-09-22 23:16:35 +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
Greg Kroah-Hartman
31c9ccb138 Revert "ANDROID: vendor_hooks: add waiting information for blocked tasks"
This reverts portions of commit 9ad8ff902e

The mutex code is rewritten in 5.15-rc1, so hooks like this are no
longer in the correct location, if even needed at all.  So remove them
for now, if vendors still need them, they can add them back in.

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib85c108e5bb306faea4fef5e0ca3b617a7f8f5c6
2021-09-03 15:23:46 +02:00
Greg Kroah-Hartman
bf2290a48a Revert "ANDROID: vendor_hooks: set debugging data when rt_mutex is working"
This reverts commit e289faa9f1.

The mutex code is rewritten in 5.15-rc1, so hooks like this are no
longer in the correct location, if even needed at all.  So remove them
for now, if vendors still need them, they can add them back in.

Cc: JINHO LIM <jordan.lim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idceef90a86c8794008e2f013d6ff958142661572
2021-09-03 11:53:16 +02:00
Maulik Shah
3567f51602 ANDROID: cpuidle-psci: Add vendor hook for cpuidle psci enter and exit
Add vendor hook for cpuidle to allow vendor modules for s2idle
enhancements.

Bug: 190353898
Bug: 195914333
Change-Id: I02b1393e6119e32eae96010ba5951405dbdada2b
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-14 17:04:43 +05:30
Lina Iyer
e114871401 ANDROID: PM / Domains: add vendor_hook to disallow domain idle state
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
Bug: 195914333
Change-Id: I403c0c7d272439fb338bbf54a346861559385047
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-14 17:04:41 +05:30
Huang Yiwei
1855071010 ANDROID: timer: Add vendor hook for timer calc index
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
2021-08-12 15:13:23 -07:00
Bae Soukjin
1da7910c1d ANDROID: vendor_hooks: Add vendor hook to the net
android_vh_ptype_head:
    To add a debugging chain to ptype list

  android_vh_kfree_skb
    To sniff the dropped packet at kernel network

Bug: 163716381

Signed-off-by: Bae Soukjin <soukjin.bae@samsung.com>
Change-Id: Ide80bf0a129da31a1824d4a33026ac42be327361
(cherry picked from commit d88b2969cf)
(cherry picked from commit a8021ba684)
2021-07-09 04:37:28 +00:00
Patrick Daly
8d56356b4f ANDROID: iommu: Add vendor hook for setting up DMA ops for IOMMU clients
Add vendor hook for arch_setup_dma_ops to allow vendor enhancement. This
hook can be used to setup vendor-specific DMA ops for certain IOMMU
clients based on their IOMMU configuration.

Bug: 179291683

Change-Id: Ie847a14d6536eb151cbd0a93452f6895ee451930
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
(cherry picked from commit 575ad9a263)
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-06-03 13:46:10 -07:00
Jing-Ting Wu
5025118c30 ANDROID: cgroup: add vendor hook to cgroup .attach()
Add a vendor hook when a set of tasks change the cgroups in
the controller for performance tuning.

Bug: 187972571
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
Change-Id: If0ea3d089e077a4650507c69b6e60952d102fa1d
2021-05-18 10:37:35 +08:00
JINHO LIM
e289faa9f1 ANDROID: vendor_hooks: set debugging data when rt_mutex is working
We already applied the 'vendor hook' for Dtask Debugging Information
in below issue.
(https://issuetracker.google.com/issues/162776704)

There are vendor hook call in mutex and rw_semaphore, but not for rt_mutex
Please refer to description in details as below,

1. Description
This feature writes rt mutex lock waiting information
on the task_struct structure. We can check mutex information and
mutex owner through the kernel log and custom analysis tools.
Like the previous feature in mutex and rw semaphore,
added data can be checked by ramdump analysis.

2. Vendor Hook Position
1) VENDOR_DATA
  - struct task_struct in sched.h

    VENDOR_DATA_ARRAY(2)

    [0] : type   // RTmutex (Mutex, Rwsem, ...)
    [1] : pointer   // address of lock
2) VENDOR_HOOKs
  - __rt_mutex_slowlock() in kernel/locking/rtmutex.c

3. Example
 - SysRq-w in kernel log
...
[   54.164463] [3:  kworker/u16:3:  253] kworker/3:2     D12736   418      2 0x00000228
[   54.164497] [3:  kworker/u16:3:  253] RTmutex: 0xffffffc051fa3ae8: owner[sh :9003]

[   54.167812] [3:  kworker/u16:3:  253] sh              D12848  9003   6900 0x04000200
[   54.167824] [3:  kworker/u16:3:  253] RTmutex: 0xffffffc051fa3b08: owner[kworker/3:2 :418]
...

Bug: 186567468

Signed-off-by: JINHO LIM <jordan.lim@samsung.com>
Change-Id: I93f9753be0b2c1fa1a6eaea09379d54c31d1ebcf
2021-05-03 15:24:28 +00:00
Jaegeuk Kim
289d4549c3 ANDROID: scsi: ufs: add hooks to track ufs commands
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
2021-03-19 22:37:32 +00:00