Commit Graph

16 Commits

Author SHA1 Message Date
Avaneesh Kumar Dwivedi
7bb7779ce4 core_ctl: Add check for available cpus before accessing per_cpus
For qultivate target its trying to call per_cpu() for
cpu's which are fused out and leading to crash So, Add
a check for available cpu's before calling per_cpu.

Change-Id: Idfd97fcfc83baa59afe9010396e7b6314087bf13
Signed-off-by: Avaneesh Kumar Dwivedi <quic_akdwived@quicinc.com>
Signed-off-by: Chetan C R <quic_cchinnad@quicinc.com>
2022-11-24 22:22:42 +05:30
Stephen Dickey
40770d9b70 sched/walt: eval_need code and trace cleanup
Improve the naming and types of variables in eval_need,
reduce computation and adjust the tracepoint to reflect
the new names of variables.

Change-Id: Ifc19bc802bbc8382577b0e4ed4b4c9be77ffe99e
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:36 -07:00
Stephen Dickey
e185ebca55 sched/walt: Improve the scheduler
Improve core_ctl tracing such that the necessary flags for
debugging eval_need are present in the trace, and so that
all returns go through the same tracepoint, unlocking, and
return functionality.

Change-Id: I61d5ab86ba7650bea77e4416b0ffa9a07869bbf3
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:23 -07:00
Abhijeet Dharmapurikar
208b88eff2 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I42edf6c6df05f0bf72e4c57ee701916860773428
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:07 -07:00
Abhijeet Dharmapurikar
ebbfc8d0bf sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I17cca453e5a4e6bbf4d0b55440d9f776dc2583cb
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:47:50 -07:00
Maria Yu
ad5c648756 sched/walt: Check if necessary for sched_boost modify
Check if necessary to do exit and next_boost enter
oprations instead of doing it regardlessly.
Core control boost refcounts has been wrong if doing
current sched_boost exit and next_boost enter by mistake.

Change-Id: Ie40ebf0be0e1b99291d07d160ebef5964d44ba16
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:47:27 -07:00
Lingutla Chandrasekhar
3282382a54 Sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I78a13f15f7b95d7b6583222fbc68b828e651b802
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-09-13 05:53:43 -07:00
Lingutla Chandrasekhar
da935c6b63 sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: Ib0ed25f0b83a6a7bbc0f600ef2a9351d578bffb5
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-08-17 09:43:36 +05:30
qctecmdr
20a7522917 Merge "sched: walt: resurrect walt_high_irqload tunable" 2021-07-18 20:01:52 -07:00
Lingutla Chandrasekhar
7214dad554 sched: walt: resurrect walt_high_irqload tunable
Re-introduce walt_high_irqload tunable to decide whether cpu is high irq
loaded or not.

This tunable takes 50 to 100 in pct, and scaled to sched_ravg_window.

ex:
echo 90 > /proc/sys/kernel/sched_cpu_high_irqload

If 90, cpu's irq load is greater than 90% of window size, then cpu
treated as high irq loaded.

Change-Id: I018d424d5eea470a640bba3aabf5691ffc227f47
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-07-07 16:51:44 +05:30
Lingutla Chandrasekhar
34afd1c16e sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I37d6cb75ca8b08d9ca155b86b7d71ff369f46e14
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-07-07 10:51:31 +05:30
Pavankumar Kondeti
dc23aae552 sched: walt: Fix stale walt CPU reservation flag
When CPU trying to move a task to other cpu in active load balance or
by other means, then the other helping cpu marked as reserved to avoid
 it for other scheduler decisions. Once the task moved successfully,
the reservation will be cleared enables for other scheduler decisions.
The reserved flag is been analogously protected with busy cpu’s
rq->active_balance, which is protected with runqueue locks. So whenever
rq->active_balance is set for busy cpu, then reserved flag would set for
helping cpu.

Sometimes, it is observed that, cpu is marked as reserved with no cpu's
rq->active_balance set. There are some unlikely possible corner cases
may cause this behavior:
 - On active load balance path, cpu stop machine returns queued status
   of active_balance work on cpu_stopper, which is not checked on active
   balance path. so when stop machine is not able to queue ( unlikely),
   then reserved flag wouldn't be cleared.

   So, catch the return value and on failure, clear reserved flag for cpu.

 - Clear_walt_request() called on the cpu to clear any pending walt works,
   it may possible that, push_task might have changed or cleared, then
   reserved cpu would be left uncleared.

   So clear the push_cpu independent of push_task.

Change-Id: I75d032bf399cb3da8e807186b1bc903114168a4e
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-05-10 12:24:29 +05:30
Tengfei Fan
7d806449c6 sched/walt: consider average max_nr when compare max_nr
There is frequent Ping-Pong effect if only consider max_nr
in core control, so also consider average max_nr which in
many windows, this will make core control more smooth.

Change-Id: Ic5f3285db604357f7c953b02ec40379ac49b95e0
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-04-30 16:42:36 +08:00
Pavankumar Kondeti
ed709b862b sched/walt: Remove weak symbols
The weak symbols are no longer needed as the WALT code is
moved from techpack to kernel.

Change-Id: I2918ac475d264482b039ee8b65357657c427eb28
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-10 17:06:11 +05:30
Pavankumar Kondeti
40119a104b sched/walt: sched: Improve the scheduler
This change is for general scheduler improvemnts.

Change-Id: If28d00691bc42b62cc4fc96a49d601c7ac5e3e34
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-10 17:06:11 +05:30
Pavankumar Kondeti
5b3db45955 sched/walt: Move scheduler techpack to kernel
The scheduler techpack sources are moved to kernel to ease
the development.

The weak symbol definitions for WALT functions are no longer
required to cover the case of compiling kernel without syncing
the scheduler techpack. So remove all the weak symbol references.

Change-Id: Ief85bccd3dceaf60dda44aef9893b4138dc63380
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-01-28 17:23:24 +05:30