Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e671348 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Zvikomborero Vincent Zvikaramba
Browse files

core_ctl: Manage number of online cores based on system load



The core_ctl module takes input from userspace and CPU load information to
decide how many CPUs to keep online. User space has the following tunables:

- min_cpus: Minimum number of CPUs to keep online. This overrides other
  heuristics.
- max_cpus: Maximum number of CPUs to keep online. This overrides other
  heuristics.
- additional_cpus: Additional idle CPUs to keep ready for use.
- busy_up_thres: The normalized load% threshold that the CPU load should
  exceeded for the CPU to be go from not busy to busy.
  It could be a single threshold for all CPUs in a group, or num_cpus
  thresholds separated by spaces to specify different thresholds based on
  the current number of online CPUs.
- busy_down_thres: The normalized load% threshold that the CPU load should
  be lower than for the CPU to go from busy to not busy.
  It could be a single threshold for all CPUs in a group, or num_cpus
  thresholds separated by spaces to specify different thresholds based on
  the current number of online CPUs.
- offline_delay_ms: The time to wait for before offline cores when the
  number of needed CPUs goes down.

Mot-CRs-fixed: (CR)

Change-Id: Ied1d5bcbb8da5bbd5f3d1a3f042599babace6b65
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarRavi Chebolu <arc095@motorola.com>
Reviewed-on: http://gerrit.mot.com/866560


SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: default avatarJira Key <jirakey@motorola.com>
Reviewed-by: default avatarLian-Wei Wang <lian-wei.wang@motorola.com>
Reviewed-by: default avatarChristopher Fries <cfries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
parent daff3e84
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -554,6 +554,14 @@ config MSM_CORE_CTL_HELPER
	  system load and state. It also supports limiting min and
	  max online CPUs from userspace.

config MSM_CORE_CTL
        select MSM_CORE_CTL_HELPER
        tristate "Core control driver to dynamically hotplug CPUs"
        help
          Support for dynamicatlly hotplugging CPUs from kernel based on
          current system load and state. It also supports limiting min and
          max online CPUs from userspace.

config MSM_PERFORMANCE
	tristate "Core control driver to support userspace hotplug requests"
	help
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ obj-$(CONFIG_MSM_OCMEM) += ocmem_sched.o ocmem_api.o ocmem_rdm.o ocmem_core.o

obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o
obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o
obj-$(CONFIG_MSM_CORE_CTL) += core_ctl.o

ifdef CONFIG_MSM_SUBSYSTEM_RESTART
       obj-y += subsystem_notif.o
+1086 −0

File added.

Preview size limit exceeded, changes collapsed.