Commit Graph

1115891 Commits

Author SHA1 Message Date
Abhijeet Dharmapurikar
3abcd9269f sched/walt: disable cpu packing when current freq is high
This in addition to other criteria already present in the code.

Change-Id: Ief3a21eb159bed8eb724427c0acca327a3cbb272
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-21 15:36:25 -07:00
Shaleen Agrawal
e3e14e56fb sched/walt: Ensure frequency bump to fmax under walt rotation
Previously, frequencies would jump to fmax when walt rotation was
enabled. This was done through the early detection path. But, as a
consequence of early detection boost optimizations, frequencies
regressed under walt rotation.

Change-Id: I40f91ba873a9cc179fcfb23291dc4839e857428a
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-21 15:36:25 -07:00
Shaleen Agrawal
b30e1d54a5 sched: walt: enable early migrate for topapp
Create nodes to enable top-app tasks to upmigrate faster to gold cores.

Change-Id: If06ddf23b13d6277e66cf5dffa537a75e7902089
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-21 15:36:24 -07:00
Stephen Dickey
d5e0c218f3 kernel/sched/walt: validate runqueue entries
Instead of traversing the entire process list
to determine if there are any tasks left on
this cpu's rq, track any tasks that get
re-enqueued during the balance_callbacks
operation.

Change-Id: Iff8322172b17c98c2c6b2a8f75653f557cebcbb6
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-09-21 15:36:23 -07:00
Stephen Dickey
f6c65099e9 kernel/sched/walt/halt: drain needs __balance_callbacks
drain_rq_cpu_stop as written, can and will add a call
to the balance_callbacks queue. This is possible with
the below calling sequence

  drain_rq_cpu_stop
  migrate_tasks
  pick_migrate_task
  pick_next_task
  pick_next_task-rt (first==true)
  set_next_task_rt
  rt_queue_push_tasks
  queue_balance_calllback (if rq has pushable tasks)
  --> entry added to balance_callbacks queue.

drain_rq_cpu_stop will release the rq lock and enable
interrupts without performing a balance callback. If
an interrupt which will attempt to acquire the rq
lock happens before this context switches out, the
balance callback will not have happened, and an
attempt to reaquire the rq lock will WARN.

Correct the warn by handling the callbacks prior to
releasing the locks and re-enabling interrupts.

Change-Id: I36f7b20cfaedac556a5a2418a299551bc2c34eb3
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-09-21 15:36:23 -07:00
Shaleen Agrawal
aca97f0a06 sched/walt: Ensure capacities are updated when policy max changes
If the cluster fmax is changed, ensure the cpu capacity is updated
instantly.

Change-Id: I1328c8b5e74e176b1e55091314cb65a4ef5f783d
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-21 15:36:22 -07:00
Shaleen Agrawal
1d077fe1d4 sched/walt: Early Detect Boost Optimizations
Currently, if an ED task is detected on a cluster, the entire cluster's
frequency is raised to fmax. However, since ED tasks are only classified
under boosted scenarios anyways, this degree of boost may not be
necessary. This patch introduces a tunable, sched_ed_boost, which can be
used to boost the highest load on the cluster with an ED task by x%, x
being the set tunable.

Change-Id: I90ce6e7435b89ed27d307a164fdd7b8f6c8f5c9e
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-21 15:36:22 -07:00
Abhijeet Dharmapurikar
f1b09a77f5 sched/walt: move predictive freq to wakeup enqueue
This will update the freq as soon the rqlock is dropped and also avoids
us from acquiring a rq lock as enqueue is called with rq lock held.

Change-Id: I24b91309b753f61a38d1eb8e26af451544fa3f52
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-21 15:36:21 -07:00
Abhijeet Dharmapurikar
90ec01ea12 walt_cfs: MVP: rearrange priorities
Update to prefer low_latency and pipeline as having higher priority than
others.

Change-Id: Ib5ba973d483cf923f886a906a158907335ccab9b
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-21 15:36:20 -07:00
Abhijeet Dharmapurikar
f970f604f2 sched/walt: use sched_idle_enough to skip packing
When sysctl_sched_idle_enough is not set, the current code still finds a
pakcing cpu only to reject it later. Fix this i.e. don't even bother
finding a packing cpu when idle_enough is zero.

Change-Id: I5cdce5e06072eee75593aa1e36953a2946e20efa
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-21 15:36:07 -07:00
Shaleen Agrawal
37f5cf75ef sched/walt: Ensure crash only on initialized task
In the event where a task is being dequeued from a CPU other than the
CPU WALT has recorded as the previous enqueue cpu, a crash is induced.
However, it could be the case during WALT initialization that due to a
race where task is in the middle of being forked, an attempt is made to
dequeue a task where the prev_on_cpu_rq member is not properly
initialized.

Change-Id: I3a52da5d6cc5ae5b71800d0f8097e6debb3b7187
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-20 12:19:58 -07:00
Stephen Dickey
9698b4fcb0 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: Ifa74c7c827ed5a5a8b23fcb9d6de2325dfeb788f
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-20 12:19:58 -07:00
Shaleen Agrawal
3400232478 sched/walt: Update cpu capacity during window rollover
Ensure that all thermal pressure gets accounted in capacity_orig
within the window rollover period.

Change-Id: I3858c21aff31ff517f5e521df765b119bf5d3244
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
2022-09-20 12:19:57 -07:00
Abhijeet Dharmapurikar
fe61e5329a sched/walt_lb: pull task based on their utilizations
Currently the code simply pulls the last task in the rq. Instead make it
visit at least 5 tasks in the RQ and find a suitable util task to pull.

Change-Id: Ied5fa689ec94296f8655232cef5a3301f0cbc813
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
2022-09-20 12:19:56 -07:00
Abhijeet Dharmapurikar
a112baf5fb sched/walt: help farthest cluster under rotation
When rotation is enabled, the system is under heavy load, allow farthest
cluster to help each other.

Change-Id: Idd402fa120baa47e8506d7dc2439765dd6d5bcc9
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-20 12:19:56 -07:00
Ashay Jaiswal
48c24c7316 sched: walt: update newidle balancing
There is a case where when big cluster(Gold/Prime) is entering idle it
fails to pull task from lower cluster if lower cluster is only having a
single big task in it's runqueue.
The reason for failure is, walt skips newidle balance for above condition
if "idle_cpu" check fails for destination core and for newidle balance
destination core is entering idle (not yet idle) thus "idle_cpu" returns
false. Fix this by skipping "idle_cpu" check for new idle balancing.

Change-Id: Id973bd8a67fbfcd9d47bec9a0894b697412f2c90
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
2022-09-20 12:19:55 -07:00
Sai Harshini Nimmala
ff2d763574 sched/walt: Handle -ve cpu capacity
There are instances where rt and irq load exceeds thermally limited
capacity and results in a very high cpu_capacity.

Fix it by comparing it against 0.

Change-Id: Ice6e71cd8b5e0635ec1d79c7338a964cef70271d
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
2022-09-20 12:19:55 -07:00
Blagovest Kolenichev
ec30ed6a75 sched: walt: fix build issue
With latest Android Kernel update, below errors are seen

kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:111:1: error: declaration specifier missing, defaulting to 'int' [-Werror]
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:111:23: error: a parameter list without types is only allowed in a function definition
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:114:1: error: declaration specifier missing, defaulting to 'int' [-Werror]
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:114:23: error: a parameter list without types is only allowed in a function definition
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:117:1: error: declaration specifier missing, defaulting to 'int' [-Werror]
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:117:23: error: a parameter list without types is only allowed in a function definition
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:120:1: error: declaration specifier missing, defaulting to 'int' [-Werror]
kernel_platform/msm-kernel/include/../drivers/android/binder_internal.h:120:23: error: a parameter list without types is only allowed in a function definition

Fix these build issues by including right header file.

Change-Id: I4ff2f484b05ebae9b9929b4d2c3b7b1e717769b4
Signed-off-by: Blagovest Kolenichev <quic_c_bkolen@quicinc.com>
2022-09-20 12:19:54 -07:00
Abhijeet Dharmapurikar
8c2844c025 sched/walt: fix busy time accounting for tasks moving between groups
Currently the code subtracts busy time when a task is being migrated.
IOW migrate_busy_time_subtraction is called in set_task_cpu hook.

And the code adds busy time in an after-migration enqueue IOW
enqueue_after_migration is seen set in enqueue hook.

Both the above operations happen under the prev_cpu and next cpu rq
lock respt.

Now a task could exit or enter group after the migration and before
the enqueue i.e. transfer_busy_time could be called when
enqueue_after_migration is set. This could lead to -ve load bugs as
we have  only subtracted the load and not added it.

To address this, complete the addition step in
transfer_busy_time() itself,  prior to moving the busy time,
if a task is found to be migrating.

Change-Id: Ifa7a2b017763392431dfa5407ec9dbde76d90019
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
2022-09-20 12:19:53 -07:00
qctecmdr
2c7855a1a8 Merge "ARM: config: msm: Enabling config for GENI based serial drivers" 2022-09-20 05:45:43 -07:00
qctecmdr
6356615785 Merge "soc: qcom: smem: Add inline function when SMEM is not enabled" 2022-09-20 02:26:33 -07:00
Anil Veshala Veshala
9dc6a7af57 ARM: config: msm: Enabling config for GENI based serial drivers
Enable compilation for GENI based peripheral protocols like i2c, i3c,
spi, uart, gsi.

Change-Id: Ic3ac6596ba912135f56f3583442cd92714978269
Signed-off-by: Anil Veshala Veshala <quic_aveshala@quicinc.com>
2022-09-19 22:57:52 -07:00
qctecmdr
067e89239a Merge "usb: phy: Turn on PHY clks with phy_init() when EUD is enabled" 2022-09-19 17:42:35 -07:00
qctecmdr
6a5734f701 Merge "coresight: Add trace noc support" 2022-09-19 13:27:16 -07:00
qctecmdr
e59f6b2192 Merge "iio: adc: qcom-spmi-adc5-gen3: Increase HS_READY poll wait time to 15 ms" 2022-09-19 11:39:44 -07:00
qctecmdr
eda9d87efa Merge "defconfig: pineapple-consolidate: enable CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG" 2022-09-19 11:39:44 -07:00
qctecmdr
e0bc90b427 Merge "ANDROID: abi_gki_aarch64_qcom: Update symbol list" 2022-09-19 09:00:31 -07:00
Mao Jinlong
10de05b8fe coresight: Add trace noc support
This driver provides the support to program the hardware of
Trace Noc component when enable the source which is connected to
Trace Noc.  Trace NoC is a interconnect that is used
to collect trace from various subsystems and transport it
QDSS trace sink.

Change-Id: I70ebda4142be066bc15d8809d7ffe3bdbee10fb9
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
2022-09-18 23:04:40 -07:00
qctecmdr
a5b6faf118 Merge "bus: mhi: host: Add snapshot of MHI bus misc driver" 2022-09-18 20:39:10 -07:00
qctecmdr
30ea05d7e3 Merge "defconfig: pineapple-gki: enable qti-fixed-regulator driver" 2022-09-16 22:04:56 -07:00
David Collins
bf9c8bd72f defconfig: pineapple-gki: enable qti-fixed-regulator driver
Enable the qti-fixed-regulator driver so that proxy consumer
voting and debug features may be used for fixed regulator
devices.

Change-Id: Ia7946a3d82f12b22463e5446a9540e27970c7679
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-09-16 17:39:18 -07:00
Subbaraman Narayanamurthy
be9c6d09a2 defconfig: pineapple-consolidate: enable CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG
Enable CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG in pineapple-consolidate
defconfig so that debug features can be enabled in altmode-glink,
qti_battery_debug and qti_battery_charger drivers.

Change-Id: I2d0ef18d061237a256c008aa971096879141a5fa
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-09-16 13:17:11 -07:00
Subbaraman Narayanamurthy
a4f4568bfb defconfig: pineapple: enable PMIC_GLINK driver and its clients
Enable PMIC Glink driver and its clients for pineapple to support
battery charging, Type-C, altmode and the drivers that help with
debugging them.

Change-Id: Ib386a198d9de3e441e2fce650beca44a5bdfd6e3
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-09-16 13:15:00 -07:00
Cong Zhang
75dda42eb8 soc: qcom: smem: Add inline function when SMEM is not enabled
Add inline function to fix compile issue when smem is called but not
enabled.

Change-Id: If31fc795fb5f42a1f221780d3d98e362766cca59
Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
2022-09-15 23:02:23 -07:00
Cong Zhang
fa538cea6d soc: qcom: Dynamically allocate minidump table
Dynamically allocate minidump table when driver probe to decrease memory
usage.

Change-Id: I6575cedef615184ff5131acc5bd82c6419a81cbd
Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
2022-09-15 22:58:46 -07:00
qctecmdr
f5b4182b5b Merge "serial: msm_geni_serial: Add snapshot of serial UART driver" 2022-09-15 20:23:25 -07:00
qctecmdr
d0cc8e457b Merge "spi: spi-msm-geni: Add SPI GENI driver snapshot for pineapple" 2022-09-15 20:23:24 -07:00
qctecmdr
474d61ff87 Merge "bus: mhi: devices: Add snapshot of MHI devices driver" 2022-09-15 20:23:24 -07:00
qctecmdr
23281288c6 Merge "bus: mhi: controllers: Add snapshot of MHI controller driver" 2022-09-15 20:23:24 -07:00
qctecmdr
d40ff4f7b0 Merge "i2c:i2c-msm-geni: Add I2C GENI driver snapshot for pineapple" 2022-09-15 19:02:02 -07:00
qctecmdr
1f0605da88 Merge "i3c: i3c-master-qcom-geni: Add I3C GENI driver snapshot" 2022-09-15 19:01:58 -07:00
qctecmdr
048f6d5b62 Merge "defconfig: pineapple-gki: Enable QCOM_RAMDUMP" 2022-09-15 17:38:22 -07:00
qctecmdr
fa073dcc43 Merge "soc: qcom: Add snapshot of ramdump driver" 2022-09-15 16:17:01 -07:00
qctecmdr
2bd9e0a08f Merge "soc: qcom: socinfo: correct partid conditional check" 2022-09-15 14:55:18 -07:00
qctecmdr
633ded3358 Merge "gunyah: gh_rm_drv: Add RM interface for minidump support" 2022-09-15 13:28:34 -07:00
qctecmdr
82fe4ec23e Merge "coresight-tmc: Add usb support to coresight tmc etr" 2022-09-15 13:28:33 -07:00
qctecmdr
57624c29c3 Merge "input: qcom-hv-haptics: update configuration for PATx_MEM mode" 2022-09-15 07:27:55 -07:00
qctecmdr
e9121ba6f6 Merge "input: qcom-hv-haptics: Toggle EN_CTL for PM5100 v1.0" 2022-09-15 06:04:33 -07:00
qctecmdr
1b01aeed5c Merge "input: qcom-hv-haptics: move predefined effect preload logging" 2022-09-15 04:34:28 -07:00
Anil Veshala Veshala
06641312bd i3c: i3c-master-qcom-geni: Add I3C GENI driver snapshot
This is a snapshot of I3C GENI driver and associated file as of msm-5.15
'commit 9b48a7431cacec7 ("i3c: i3c-master-msm-geni: Fix DAA process
from GENI I3C master")'.

Change-Id: I5cead40609c9489bf60c23e49349171c25579fe6
Signed-off-by: Anil Veshala Veshala <quic_aveshala@quicinc.com>
2022-09-14 23:25:35 -07:00