Commit graph

23 commits

Author SHA1 Message Date
Satya Durga Srinivasu Prabhala
f177186646 sched/fair: Add policy for restricting prefer_spread to newly idle balance
Add policy for restricting prefer_spread to newly idle load balance
by expanding the tunable range.

To allow lower capacity CPUs to do aggressive newly idle load balance:
echo 3 > /proc/sys/kernel/sched_prefer_spread

To allow bother lower capacity and higher capacity CPUs to do
aggressive newly idle load balance:
echo 4 > /proc/sys/kernel/sched_prefer_spread

Change-Id: Ia62ddb29bdf592a956a9688f277178ef71dee1b3
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Co-developed-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[pkondeti@codeaurora.org: The tunable range is expanded]
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-08-05 09:27:20 +05:30
Pavankumar Kondeti
291a2ce67c sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I4da8fd848f9cd43d510ac2ae63605f051e723775
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-08-03 11:04:05 +05:30
Lingutla Chandrasekhar
1bb7bbeb1d sched: Fix compilation errors with !WALT
When WALT disabled, compilation fails with some WALT specific functions.
Fix them.

Change-Id: I1f46894110f0c5fc46995f6af6e2daf04b71c068
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2020-04-28 18:59:50 +05:30
qctecmdr
eba274e93f Merge "sched: core_ctl: Improve the scheduler" 2020-01-27 00:38:45 -08:00
Pavankumar Kondeti
aaa6f4cef9 sched: walt: fix use after free in walt_task_dump()
When SCHED_BUG_ON() is hit, we are printing the current tasks of
all online CPUs. Accessing the task on the remote CPU is racy. It
can be made safe by incrementing the task struct reference and also
adding a check against the exiting flag. The WALT CPU load pointers
are freed only after setting the exiting flag. This exiting flag
check helps is not accessing the freed memory.

Change-Id: I2fcbd37e9e4f096da5372be041aec2b60da26341
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-01-16 11:11:14 +05:30
Lingutla Chandrasekhar
e9f5b375b2 sched: core_ctl: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: If6802317f94e31230efd34773bb0d75ba62a5968
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2020-01-03 17:21:40 +05:30
Abhijeet Dharmapurikar
7d99db092e sched: walt: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: Ib8505248b91fb33395fe53f2dfacc8ec68c0273c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2019-12-20 10:50:45 +05:30
Abhijeet Dharmapurikar
13dd4dd603 sched: walt: improve the scheduler
This change is for general scheduler improvements.

Change-Id: I567213580a970abc374d95e3d1fdc0aa73eaf705
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2019-12-19 10:07:04 +05:30
Lingutla Chandrasekhar
b690ed7000 sched: walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I752b5518fd72f9c239d3f96e4c3e021a98a75684
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2019-12-04 05:06:27 -08:00
Lingutla Chandrasekhar
d6a3e2d307 sched: walt: fix sched_cluster initialization
If cluster topology parsing failed or system booted with single cpu,
then topology possible sibling mask could be empty. This leads to
initialization of sched_clusters with empty cpus and there are many
call sites, which use the cluster cpu mask without checking for empty mask.
They lead to accessing invalid cpus ( minus one) leading to crashes.
Fix it by resetting to an initial cluster structure that has all possible
cpus as cluster mask. Also, warn when an empty cluster is detected.

To continue using init_cluster on device tree failures:
- Use init_cluster as default entry in cluster_head, and once
  cluster topology parsed successfully, cluster_head gets updated with
  proper cpu cluster information.
- If cluster topology parsing failed, free allocated sched_clusters and
  make sure rq points to init_cluster instead of invalid address.
- Remove unused cluster id bitmaps.

Change-Id: Ic65ba86ff90a271098fb593221d1679d634930b1
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2019-11-21 18:11:24 +05:30
Lingutla Chandrasekhar
34102ccdd5 sched: walt: Dump walt status on BUG_ON
If walt causes BUG_ON, then dump all cpu's current walt status.

Change-Id: Ie4b0f19f9598714a5479dd6426d0cc769ec562b1
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
2019-11-18 15:40:14 -08:00
Jonathan Avila
2eefeaa5c5 sched/walt: Improve the scheduler
This change is for scheduler improvement.

Change-Id: Ie922b3a672686e7a8f52dcaacdea03948e630a1c
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
2019-11-18 15:38:47 -08:00
Jonathan Avila
50db4a3909 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: Ic6be9069f6119d52e3915ea032f72ea35d27ee3e
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
2019-11-18 15:37:24 -08:00
Shaleen Agrawal
a0a23b2f98 sched: walt: Improve the Scheduler
This change is for general scheduler improvement.

Change-Id: Ida39a3ee5e6b4b0d3255bfef95601890afd80709
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2019-09-17 11:01:40 -07:00
Amir Vajid
d12365dfeb sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I8ff4768d56d8e63b2cfa78e5f34cb156ee60e3da
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2019-09-11 10:03:51 -07:00
Amir Vajid
f6e1b9181c sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I737751f065df6a5ed3093e3bda5e48750a14e4c9
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2019-09-10 17:47:11 -07:00
Pavankumar Kondeti
e193cefc36 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I310bbdc19bb65a0c562ec6a208f2da713eba954d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2019-09-06 09:08:18 +05:30
Pavankumar Kondeti
3d2c3f6bab sched/core_ctl: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I05a6645db80cc04993b45d7ec25a3fb7a112cf3e
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2019-07-16 09:57:03 +05:30
Lingutla Chandrasekhar
c9a7c3f48d sched: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I090ed8f91592646f11dd65bc83357945f02702cd
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2019-04-20 19:17:08 +05:30
Satya Durga Srinivasu Prabhala
b56e526526 sched: clean-up unused/duplicate functions & variables
Deprecate unused/duplicate functions & variables for better
readability.

Change-Id: Ifd91080585f516c4d8290fa4bb4f8dbaddd27d98
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-03-14 22:00:58 -07:00
Pavankumar Kondeti
6cda1dff73 sched: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I22994886e3a6128e9235e3cf698b0bb405275194
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[satyap@codeaurora.org: fix trivial merge conflict]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-01-18 12:49:08 -08:00
Satya Durga Srinivasu Prabhala
52e7ec2891 sched: sched_avg: Add snapshot of sched_avg
This snapshot is taken from msm-4.14 as of commit 43980276ecf9014
("sched/sched_avg: make number of running tasks conservative").

Change-Id: Ia5f608fe1c1715489e7c0fc6e5736b80bee5bae7
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-01-02 10:58:54 -08:00
Satya Durga Srinivasu Prabhala
7ebdf76d85 sched: Add snapshot of Window Assisted Load Tracking (WALT)
This snapshot is taken from msm-4.14 as of
commit 871eac76e6be567 ("sched: Improve the scheduler").

Change-Id: Ib4e0b39526d3009cedebb626ece5a767d8247846
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-01-02 10:56:07 -08:00