Merge android11-5.4.61+ (874de1d) into msm-5.4

* refs/heads/tmp-874de1d:
  ANDROID: GKI: enable CONFIG_CPU_FREQ_STAT and more thermal configs
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: sched: add restrict vendor hook to modify load balance behavior
  ANDROID: GKI: Update abi_gki_aarch64_oneplus
  ANDROID: scs: use vmapped shadow stacks by default
  ANDROID: ABI: update allowed list for QCOM
  UPSTREAM: sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases
  ANDROID: GKI: Update abi_gki_aarch64_exynos
  ANDROID: kbuild: disable GCOV with CFI
  ANDROID: GKI: add built-in PCIE_DW_PLAT_EP
  ANDROID: PCI: dwc: export symbols for ep driver
  ANDROID: recordmcount: avoid STT_FILE as base for mcount offset relocation
  ANDROID: iommu: Enable CONFIG_IOMMU_IO_PGTABLE_ARMV7S
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Quad lvl1 pgtable for MediaTek
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Extend PA34 for MediaTek
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: modules: fix suspicious rcu usage

 Conflicts:
	kernel/sched/fair.c
	kernel/sched/features.h

Change-Id: I5d8dc058a0aca2b90ca702f18f71f663af9774fc
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
Blagovest Kolenichev 2020-10-29 13:01:46 -07:00
commit d9a7f5879a
17 changed files with 3528 additions and 1520 deletions

View file

@ -4352,10 +4352,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
static void cfi_init(struct module *mod)
{
#ifdef CONFIG_CFI_CLANG
rcu_read_lock();
rcu_read_lock_sched();
mod->cfi_check = (cfi_check_fn)find_kallsyms_symbol_value(mod,
CFI_CHECK_FN_NAME);
rcu_read_unlock();
rcu_read_unlock_sched();
cfi_module_add(mod, module_addr_min, module_addr_max);
#endif
}

View file

@ -3799,11 +3799,22 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep)
if (ue.enqueued & UTIL_AVG_UNCHANGED)
return;
/*
* Reset EWMA on utilization increases, the moving average is used only
* to smooth utilization decreases.
*/
ue.enqueued = (task_util(p) | UTIL_AVG_UNCHANGED);
if (sched_feat(UTIL_EST_FASTUP)) {
if (ue.ewma < ue.enqueued) {
ue.ewma = ue.enqueued;
goto done;
}
}
/*
* Skip update of task's estimated utilization when its EWMA is
* already ~1% close to its last activation value.
*/
ue.enqueued = (task_util(p) | UTIL_AVG_UNCHANGED);
last_ewma_diff = ue.enqueued - ue.ewma;
if (within_margin(last_ewma_diff, (SCHED_CAPACITY_SCALE / 100)))
return;
@ -3836,6 +3847,7 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep)
ue.ewma <<= UTIL_EST_WEIGHT_SHIFT;
ue.ewma += last_ewma_diff;
ue.ewma >>= UTIL_EST_WEIGHT_SHIFT;
done:
WRITE_ONCE(p->se.avg.util_est, ue);
}
@ -9764,7 +9776,12 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
#ifdef CONFIG_SCHED_WALT
if (rcu_dereference(rd->pd) && !sd_overutilized(env->sd)) {
#else
if (rcu_dereference(rd->pd) && !READ_ONCE(rd->overutilized)) {
int out_balance = 1;
trace_android_rvh_find_busiest_group(sds.busiest, env->dst_rq,
&out_balance);
if (rcu_dereference(rd->pd) && !READ_ONCE(rd->overutilized)
&& out_balance) {
#endif
int cpu_local, cpu_busiest;
unsigned long capacity_local, capacity_busiest;

View file

@ -94,3 +94,4 @@ SCHED_FEAT(UTIL_EST, true)
* Request max frequency from schedutil whenever a RT task is running.
*/
SCHED_FEAT(SUGOV_RT_MAX_FREQ, false)
SCHED_FEAT(UTIL_EST_FASTUP, true)