Change-Id: I6d102cdc9c2668f2ad7dd86c797398d15a771685
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Change-Id: Ife916a2ff4bda4acaae63798e1c3e23f927ab1bc
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This way we avoid marking unncecarry IRQs as perf critical (sde for example)
Change-Id: Iebd1c358e888d187b4bd1673af455d7a78b16f25
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
After a dedicated grace-period workqueue was added to RCU in order to
benefit from rescuer threads, the relevant workers were moved to the new
workqueue away from system_power_efficient_wq. The old workqueue was
unbound, which is desirable for performance reasons. Making the workers
bound measurably regressed performance, so make them unbound again.
Change-Id: Ice04296b2c519fb74c7cc35213775a374ee51dd4
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
We want boosted tasks to run on big cores. But CAF's load balancer
changes do not account for SchedTune boosting, so this allows for
boosted tasks to be migrated to a suboptimal core. Let's mitigate
this by setting the LBF_IGNORE_STUNE_BOOSTED_TASKS for tasks
migrating from a larger capacity core to a min capacity one and
that have a schedtune boost > 10. If both are true, do
not migrate this task. If the next time the load balancer runs,
the same task is selected, we clear the
LBF_IGNORE_STUNE_BOOSTED_TASKS flag.
Change-Id: Ibd9f6616b482d446d5acce2a93418bfda4c35ffb
Signed-off-by: Zachariah Kennedy <zkennedy87@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
140MHz seems to be the lowest possible frequency to boot
and work with and is good enough for light loads such as
scrolling through applications without any lags.
Let's use a custom voltage level which is slightly higher
than the retention level and lower than the LOW SVS level,
and reduce the bus frequency as 140Mhz shouldn't be much
demanding, to reduce power consumption.
[ghostrider-reborn]
- Tested with a few days of normal usage and 3dmark runs at
140Mhz locked frequency, to see no crashes, artifacts or
GPU faults.
Change-Id: I027416cfc06cddf388f9cec14ad58d06ddac305d
Co-authored-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
s2idle wakes up faster than deep and can actually save more power
because RPM is able to put the CPUs into a very deep idle state in
firmware that is comparable to fully disabling them wrt. power
consumption while taking significantly less time. Hotplugging is slow
and inefficient, so it can actually waste more power than it saves.
Change-Id: I096114537c38a409167ec9072b48ee2f06d70fcf
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Although try_to_freeze_tasks() stops when there's a wakeup, it doesn't
return an error when it successfully freezes everything it wants to freeze.
As a result, the suspend attempt can continue even after a wakeup is
issued. Although the wakeup will be eventually caught later in the suspend
process, kicking the can down the road is suboptimal; when there's a wakeup
detected, suspend should be immediately aborted by returning an error
instead. Make try_to_freeze_tasks() do just that, and also move the wakeup
check above the `todo` check so that we don't miss a wakeup from a process
that successfully froze.
Change-Id: I229e582eea97722657dcbf77c7f0568fe849be46
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit b79360fb1702634573e8b18fcbd0e99a7fb77a12.
Change-Id: Iea151b3fef07740133cdbc3f3d68dc039820099b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
There is no point in stopping the scheduler tick if the expected
idle duration is shorter than the tick period length.
Change-Id: I8d499c9b2dcf1cd3c8401cc2002ee8b485023ff0
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit f2d74955d3d0f96907be291a7d6423a2e64ed61d.
Change-Id: I9a9c94e9c738161fa0fe76075e61be41b5c24f5b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 91f38cd16b48ab2c5fcda029ec6b467d49cf8692.
Change-Id: Ied510f86c87dfec8efd784b2f7cc8865f0aab2d7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit f4855d37f89e854234139c3017396a78d1d92bf5.
Change-Id: I8b34331e38d13e9ca9b938888ea1c9ae143bcab9
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit ed3425bab089e971abd263fca7377e8450ea5e66.
Change-Id: Ie35c37b4feab62b00e03d81f4a79f783bcf6cd6f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit a42bd2ac50d8e617fb513e0632c759a91285526a.
Change-Id: Icc2feebfdbe53a98c8d6ec150a7f52b32c523846
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 5caa8628e501315ffaaad003594ccca490145661.
Reason for revert: We do not use C2 for video, this is useful for OMX.
Change-Id: I2bdd191313300e86a108087a1854252dc457f54c
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
It's useful for me because I have to use standard chargers frequently.
Change-Id: I5aef00ce13f2b89e78c9b6349603be8855ca0917
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Change-Id: I6dbc2144869f6ef06e33d83b9af7814a19534ba6
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 1593bd8183dd337c81c5b4eb9ac629c3d90d4a4e.
Change-Id: I4604276fa8a9ea6341017f4c27d8d02328a31ff2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit be3df9c273a934b44a089a498e83718a46e55304.
Change-Id: Ief4f4aea6e2840aa2bd09d613d2abeb5610728ef
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 05bab47794fa05c106068c7f594fb50bb825a377.
Change-Id: Ie12e180bfb50657d8de8a6aa1e8c00e457613f41
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit c3058fc912b3ecd2f3ce2ebabf4358dba8289633.
Change-Id: I3e0333af0e8917ab9706470eb4ddce23155a93f2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 112243ebc3bbd5fe01d77cdba303be7e02940e0e.
Change-Id: I4542c494340ee6014540e7b29a222e8aa8101ab7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit f30864ac4b769ae63c2308d84e040ac64a7951c5.
Change-Id: I57de115b27e276106de769dd83506d33991e132e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit b0127a3d65c026ed584c0c427f97b3563ce04952.
Change-Id: Ied7e769dbce1f6c5ab2055dc63b9de3b0b5d083c
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
[ Upstream commit 44b73962cb25f1c8170ea695c4564b05a75e1fd4 ]
When a process dies, failed reply is sent to the sender of any transaction
queued on a dead thread's todo list. The sender asserts that the
received failed reply corresponds to the head of the transaction stack.
This assert can fail if the dead thread is allowed to send outgoing
transactions when there is already a transaction on its todo list,
because this new transaction can end up on the transaction stack of the
original sender. The following steps illustrate how this assertion can
fail.
1. Thread1 sends txn19 to Thread2
(T1->transaction_stack=txn19, T2->todo+=txn19)
2. Without processing todo list, Thread2 sends txn20 to Thread1
(T1->todo+=txn20, T2->transaction_stack=txn20)
3. T1 processes txn20 on its todo list
(T1->transaction_stack=txn20->txn19, T1->todo=<empty>)
4. T2 dies, T2->todo cleanup attempts to send failed reply for txn19, but
T1->transaction_stack points to txn20 -- assertion failes
Step 2. is the incorrect behavior. When there is a transaction on a
thread's todo list, this thread should not be able to send any outgoing
synchronous transactions. Only the head of the todo list needs to be
checked because only threads that are waiting for proc work can directly
receive work from another thread, and no work is allowed to be queued
on such a thread without waking up the thread. This patch also enforces
that a thread is not waiting for proc work when a work is directly
enqueued to its todo list.
Acked-by: Arve Hjønnevåg <arve@android.com>
Reviewed-by: Martijn Coenen <maco@android.com>
Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Ief18e5c6e478ae7347b4e7c4a955edb8841cf17f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Most of binder's memory allocations are tiny, and they're allocated
and freed extremely frequently. The latency from going through the page
allocator all the time for such small allocations ends up being quite
high, especially when the system is low on memory. Binder is
performance-critical, so this is suboptimal.
Instead of using kzalloc to allocate a struct every time, reserve caches
specifically for allocating each struct quickly.
Change-Id: I535d8eb25730babf404c1f9c5d917afcebd63f6e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Sending synchronous IPIs to other CPUs involves spinning with preemption
disabled in order to wait for each IPI to finish. Keeping preemption off
for long periods of time like this is bad for system jitter, not to mention
the watchdog's IPIs are sent and flushed one at a time for each CPU rather
than all at once for all the CPUs to be pinged.
Since the existing IPI ping machinery is quite lacking, rewrite it entirely
to address all of its performance shortcomings. This not only replaces the
synchronous IPIs with asynchronous ones, but also allows the IPIs to run in
parallel. The IPI ping and wait mechanisms are now much more efficient via
the use of generic_exec_single() (since smp_call_function_single_async()
disables preemption when all it really needs is migration disabled), and
by sleeping rather than spinning while waiting for the IPIs to finish.
This also does away with the ping_start and ping_end arrays as they don't
make sense with the parallel, asynchronous execution of the IPIs anymore.
They are instead replaced by a mask indicating which CPUs were pinged so
that a watchdog bark can still print out which CPU(s) stopped responding.
[Ken: Replace migrate_{disable|enable} with preempt_{disable|enable}]
Change-Id: Icf34a7b7e7f390b4db38c31207f7e667eb634eba
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: KenHV <yo@kenharris.xyz>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
generic_exec_single() is quite handy for sending asynchronous IPIs without
the baggage that comes with smp_call_function_single_async(). Make it
public so that it can be (carefully) utilized.
Change-Id: I4fc994e8449895b00c5cd455b01c1bcce5c0aac5
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 919eece679cd1097f13cbb9208e3f1f7668fac6a.
Change-Id: Id71d1a079d09a1aeff9c292f49d2486b28713ea9
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit 5f250a3f69b949eefec8a1062b3d64a32088047a.
Change-Id: I7cc97556c79dc85f0152092c6cdb175a2d48daa6
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This reverts commit f1786dc2072e9343706e84c5935d156766114c23.
Change-Id: I2c90d025a74f260848e0edc6d31035a282e146e2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This fixes the -Wfortify-source warning detected on Clang 18.0.0.
../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:270:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
270 | snprintf(p_str, 12, "0x%08x: ",
| ^
../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:275:3: warning: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 11 [-Wfortify-source]
275 | snprintf(p_str, 10, "%08x ", data);
| ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:46:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
46 | snprintf(p_str, 12, "0x%08x: ",
| ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:51:3: warning: 'snprintf' will always be truncated; specified size is 9, but format string expands to at least 10 [-Wfortify-source]
51 | snprintf(p_str, 9, "%08x ", data);
| ^
Change-Id: Ie444da3af1456d5ca5dc8230768bf172a3ac6ed3
Signed-off-by: Fiqri Ardyansyah <fiqri0927936@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
Small output size increase and build time increase due to additional vectorization and unrolling
Change-Id: I9b7ad449f7067342fae674a1d8b8efce51d3786c
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
KBUILD_LDFLAGS and LDFLAGS are the same Makefile variables.
And LDFLAGS was renamed to KBUILD_LDFLAGS in upstream.
Therefore, both of them do the same work, means they both
pass the flags exactly the same to the linker. Therefore,
drop the deprecated variable's usage and the flags that were
passed using it.
Change-Id: I94bfce9681e62b186682c4726cf96854b8c445bb
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>