summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-10-14 01:24:37 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-10-14 01:24:37 -0600
commit2bddc21c9c64e791fb2dffe60bb7b9e2857da0b3 (patch)
tree01fd54343f1ac624c2f8d46cfc2b717367827bff /kernel
parent21d19f627386aebe3df1b7e8f78c55b7aa23c0fa (diff)
parentfac2c0da16c3567c4838de4af0b794ecc55f1d0a (diff)
Promotion of kernel.lnx.4.4-161014.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 1074879 Ib0cadbd390d1a0b6da3e39c98010cedb43e5bf60 sched: bucketize CPU c-state levels 1074879 If927f84f6c8ba719716d99669e5d1f1b19aaacbe sched: use wakeup latency as c-state determinant 1074660 Ie326495e012b693b47b33a4818ec11485afd88e9 ARM: dts: msm: Enable System sleep stats for MSM8998 1076523 I1eb5c61037004e200e8f261d6e39b73028f04ab4 clk: msm: clock-osm: enable WDOG status registers for ms 1074875 I94ef9c913e1d5be2801d553fdc859b80b62e8aa5 defconfig: msm: Turn on scheduler tuning configs 1066658 I7a5a89c32dc4b1284895d01202dcfdd8a90ccda0 msm: vidc: Don't print message queues in error cases 1072607 I9e4b0d7cc5f164b207a1a0e2c1ae24bdfd8fa063 clk: qcom: Add support for the turing vote clocks 1077079 I8f36906f508998c6369f30e0eadc1703c70533b9 net: core: Remove warning for cloned packets in ingress 1076109 Ied6e925070db6fbfec80677b9f368325777db7b4 msm: ADSPRPC: Support for dma-coherent devices 1076198 If2845efa942abc5849890b45de525222632b32db power_supply: add PARALLEL_DISABLE property 1076198 Ia9cd9d352935be19e9383141cf279a34796ff642 qpnp-smb2: add the PARALLEL_DISABLE property to usb psy 1076547 I8ef4a258e55e3dbbc3cd67472a5f2d3931d26c12 msm: wlan: Change Egypt regulatory rules 1076210 Icd717147adc018a076a72bd5ce1a52a765f34f7b smb-lib: smb138x-charger: add parallel current to parall 1074803 1076690 I2df3304029a05ce0f4cb11551e9ed768cd89f8b5 diag: Update msg, log and event information 1070186 I74bed6cfd9753765b15d17d69ba30f61875e87c8 ASoC: wcd-spi: Initialize local variables before usage 1076696 I681509b653c419159f6ca4172c5ff66a1cae1b79 diag: Add MSG SSID for DPM 1075605 Id38737dad70853ccd83685841d0c2498ee722ff2 msm: ipa: Add guard around nat entries read 1076109 I8ea271103c202cefdedae62f2717f1bee44c1d78 ARM: dts: msm: Enable cache coherency for fastrpc device 1072607 I0bad9d7bbee060ef70f3e8e6274fccc86fe9df6e ARM: dts: msm: Add support for GDSCs for MSMFalcon/MSMtr 1053516 I808e247669fab61a6a64131858fe2f9e19754242 msm: kgsl: restructure GPU power initialization 1074911 I38689d490a31a8e02688d0cacaa6f6028f6f79c8 msm: vidc: Fix the condition to check dcvs support 1077254 Iea45a4e8ab4560a093c44800ddd7b1311471c646 ASoC: wcd9xxx: Disable external clock buffer when mclk i 1073003 I0aba2165cd7e1a0d6f4227ccdcfb7ba9317bdc62 rpm-smd: Fix memory leak when rpm create request fails 1074875 I64585ff8cceb307904e20ff788e52eb05c000e1f sched/tune: Remove redundant checks for NULL css 1076632 Ia2803d6ca021d505ed2e711e676cbd701b11c492 ASoC: wcd-dsp-mgr: rename wdsp_intr_handler to wdsp_sign 1068034 Ib472c226b7e35079e6b8391848a0a0d1c38962c0 clk: msm: clock: Update the bimc clock mux index 1049521 1049615 I3e59e27534b8e1088d74b42c72e0075d2fe910e6 misc: qcom: qdsp6v2: Add missing initialization 1074300 I6090d4163e760dc02a7dce45f1246bb59b2e195b smb138x-charger: enable parallel current sensing 1076632 I79502c043f5e16947c895aab7cd584d72ad1a7dc ASoC: wcd-dsp-mgr: handle codec down and up events 1076632 Ideed297fde016b0623616be64875be094e688981 ASoC: wcd-spi: Move one time initializations to componen 1076646 I86a54a77c26cab5627256ea876929bc1af3e0d56 smb138x-charger: update FCC configuration parameters 994035 Ic2dac9bdc1cd9f9b8d236997eba2e63295d6b4c0 clk: msm: clock-osm: Set Nominal Fmax frequency for boot 1075219 I1005b135f5e16111257902413ef2b44c09cb1cfc qpnp-smb2: smb-lib: update reading charge_done property 1072782 I92df514e31d5168b8dff4b249f4d8fd3e70c0118 dwc3: gadget: Don't memset TRB ring with zero related to 1072656 I5e7bc2ed8dce0b1dde4931e653db4233e90ed1cd input: misc: add Kconfig and Makefile for pat9125 Change-Id: Ic27bce367e73a035de6b0d91acbd428b55c0c84e CRs-Fixed: 994035, 1073003, 1077079, 1076646, 1076198, 1074911, 1074875, 1076632, 1074879, 1074660, 1075219, 1076109, 1049615, 1072607, 1076547, 1074803, 1072782, 1077254, 1076210, 1066658, 1070186, 1076523, 1049521, 1053516, 1074300, 1072656, 1075605, 1068034, 1076690, 1076696
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c28
-rw-r--r--kernel/sched/hmp.c7
-rw-r--r--kernel/sched/tune.c2
3 files changed, 21 insertions, 16 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index df23b0365527..7fdf1efa9086 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2619,7 +2619,7 @@ struct cluster_cpu_stats {
int best_idle_cpu, least_loaded_cpu;
int best_capacity_cpu, best_cpu, best_sibling_cpu;
int min_cost, best_sibling_cpu_cost;
- int best_cpu_cstate;
+ int best_cpu_wakeup_latency;
u64 min_load, best_load, best_sibling_cpu_load;
s64 highest_spare_capacity;
};
@@ -2827,19 +2827,19 @@ next_best_cluster(struct sched_cluster *cluster, struct cpu_select_env *env,
static void __update_cluster_stats(int cpu, struct cluster_cpu_stats *stats,
struct cpu_select_env *env, int cpu_cost)
{
- int cpu_cstate;
+ int wakeup_latency;
int prev_cpu = env->prev_cpu;
- cpu_cstate = cpu_rq(cpu)->cstate;
+ wakeup_latency = cpu_rq(cpu)->wakeup_latency;
if (env->need_idle) {
stats->min_cost = cpu_cost;
if (idle_cpu(cpu)) {
- if (cpu_cstate < stats->best_cpu_cstate ||
- (cpu_cstate == stats->best_cpu_cstate &&
- cpu == prev_cpu)) {
+ if (wakeup_latency < stats->best_cpu_wakeup_latency ||
+ (wakeup_latency == stats->best_cpu_wakeup_latency &&
+ cpu == prev_cpu)) {
stats->best_idle_cpu = cpu;
- stats->best_cpu_cstate = cpu_cstate;
+ stats->best_cpu_wakeup_latency = wakeup_latency;
}
} else {
if (env->cpu_load < stats->min_load ||
@@ -2855,7 +2855,7 @@ static void __update_cluster_stats(int cpu, struct cluster_cpu_stats *stats,
if (cpu_cost < stats->min_cost) {
stats->min_cost = cpu_cost;
- stats->best_cpu_cstate = cpu_cstate;
+ stats->best_cpu_wakeup_latency = wakeup_latency;
stats->best_load = env->cpu_load;
stats->best_cpu = cpu;
env->sbc_best_flag = SBC_FLAG_CPU_COST;
@@ -2864,11 +2864,11 @@ static void __update_cluster_stats(int cpu, struct cluster_cpu_stats *stats,
/* CPU cost is the same. Start breaking the tie by C-state */
- if (cpu_cstate > stats->best_cpu_cstate)
+ if (wakeup_latency > stats->best_cpu_wakeup_latency)
return;
- if (cpu_cstate < stats->best_cpu_cstate) {
- stats->best_cpu_cstate = cpu_cstate;
+ if (wakeup_latency < stats->best_cpu_wakeup_latency) {
+ stats->best_cpu_wakeup_latency = wakeup_latency;
stats->best_load = env->cpu_load;
stats->best_cpu = cpu;
env->sbc_best_flag = SBC_FLAG_COST_CSTATE_TIE_BREAKER;
@@ -2883,8 +2883,8 @@ static void __update_cluster_stats(int cpu, struct cluster_cpu_stats *stats,
}
if (stats->best_cpu != prev_cpu &&
- ((cpu_cstate == 0 && env->cpu_load < stats->best_load) ||
- (cpu_cstate > 0 && env->cpu_load > stats->best_load))) {
+ ((wakeup_latency == 0 && env->cpu_load < stats->best_load) ||
+ (wakeup_latency > 0 && env->cpu_load > stats->best_load))) {
stats->best_load = env->cpu_load;
stats->best_cpu = cpu;
env->sbc_best_flag = SBC_FLAG_CSTATE_LOAD;
@@ -2979,7 +2979,7 @@ static inline void init_cluster_cpu_stats(struct cluster_cpu_stats *stats)
stats->min_load = stats->best_sibling_cpu_load = ULLONG_MAX;
stats->highest_spare_capacity = 0;
stats->least_loaded_cpu = -1;
- stats->best_cpu_cstate = INT_MAX;
+ stats->best_cpu_wakeup_latency = INT_MAX;
/* No need to initialize stats->best_load */
}
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index a0686ea29243..3d5de8ba70a2 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -24,6 +24,8 @@
#include <trace/events/sched.h>
+#define CSTATE_LATENCY_GRANULARITY_SHIFT (6)
+
const char *task_event_names[] = {"PUT_PREV_TASK", "PICK_NEXT_TASK",
"TASK_WAKE", "TASK_MIGRATE", "TASK_UPDATE",
"IRQ_UPDATE"};
@@ -99,7 +101,10 @@ sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
rq->cstate = cstate; /* C1, C2 etc */
rq->wakeup_energy = wakeup_energy;
- rq->wakeup_latency = wakeup_latency;
+ /* disregard small latency delta (64 us). */
+ rq->wakeup_latency = ((wakeup_latency >>
+ CSTATE_LATENCY_GRANULARITY_SHIFT) <<
+ CSTATE_LATENCY_GRANULARITY_SHIFT);
}
/*
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c
index 3c964d6d3856..4f8182302e5e 100644
--- a/kernel/sched/tune.c
+++ b/kernel/sched/tune.c
@@ -29,7 +29,7 @@ struct schedtune {
static inline struct schedtune *css_st(struct cgroup_subsys_state *css)
{
- return css ? container_of(css, struct schedtune, css) : NULL;
+ return container_of(css, struct schedtune, css);
}
static inline struct schedtune *task_schedtune(struct task_struct *tsk)