Skip to content

Commit

Permalink
Merge branch 'release-4.1.0'
Browse files Browse the repository at this point in the history
* release-4.1.0:
  sched: Turn on MIN_CAPACITY_CAPPING feature
  sched/fair: use min capacity when evaluating active cpus
  sched/fair: use min capacity when evaluating idle backup cpus
  sched/fair: use min capacity when evaluating placement energy costs
  sched/fair: introduce minimum capacity capping sched feature
  sched: add arch_scale_min_freq_capacity to track minimum capacity caps
  sched/fair: introduce an arch scaling function for max frequency capping
  FROMLIST: sched: Make iowait_boost optional in schedutil
  FROMLIST: cpufreq: Make iowait boost a policy option
  sched: deadline: Add missing WALT code
  sched/fair: Add bias schedtune boosted tasks sched feature
  cpu-boost: Create separate tunable for Dynamic Schedtune Boost duration
  defconfig: Enable CRYPTO_LZ4 and CRYPTO_LZ4HC
  Documentation: scheduler: Add Dynamic SchedTune Boost documentation
  init: Make DYNAMIC_STUNE_BOOST depend on CGROUP_SCHEDTUNE
  sched/boost: Update functions for newer Dynamic Schedtune Boost changes
  cpu-boost: Update functions for newer Dynamic Schedtune Boost changes
  sched/tune: Switch Dynamic Schedtune Boost to a slot-based tracking system
  sched/stune: Rename stune_boost() to do_stune_sched_boost()
  sched/tune: Rename dynamic_boost parameter to sched_boost
  sched/tune: Track active boosts on a per-Schedtune basis
  sched/tune: Reset Dynamic Schedtune Boost only if no more boosts running
  cpu-boost: Reset Dynamic SchedTune Boost only if it is currently active
  sched/boost: Perform SchedTune boosting when sched_boost is triggered
  sched/boost: Re-introduce sched_boost proc from HMP
  sched/tune: Introduce stune_boost() function
  sched/tune: Refactor do_stune_boost()
  sched/tune: Create dynamic_boost SchedTune parameter
  sched/tune: Rename dynamic_boost_write() to dynamic_boost()
  defconfig: Enable DYNAMIC_STUNE_BOOST
  cpu-boost: Implement Dynamic SchedTune Boost v3
  sched/tune: Add initial support for Dynamic SchedTune Boost
  qpnp-haptic: expose vibrate function
  defconfig: Enable SOUND_CONTROL and KCAL support
  msm: mdss: KCAL: disable igc update
  mdss mdp: kcal for mdss_mdp_v1_7
  ASoC: wcd9335: add earpiece and mic gain, prevent headphone reset
  ASoC: wcd9335: Sound control
  schedutil: Don't assume we are likely using PELT
  printk: Fix mismatch error
  msm: adsprpc: allocate all remote memory in kernel
  msm: camera: Fix for OOB security CR
  msm: camera: Fix invalid type conversion
  msm: ais: Fix for OOB security CR
  drm/msm/sde: sanitize debugfs inputs when reading mdp memory
  diag: Mark Buffer as NULL after freeing
  ARM: dts: msm: Add initial dts support for SDM455 RCM devices
  msm: camera: isp: Reset request queue at stop
  msm: camera: isp: Fix drop frame due to reg update miss
  msm: camera: isp: Handle frame drop due to delay
  msm: ipa3: fix holb sequence for SSR
  msm: mdss: serialize dynamic fps and dynamic bit clock updates
  soc: swr-wcd: Apply div2 setting on slave side before bank switch
  ARM: dts: msm: Remove Out-of-Bound access
  usb: gadget: Fix double free of device descriptor pointers
  dwc3-msm: Do not resume usb3 phy if max speed is HS only
  soc: qcom: scm: Add a noretry variant for scm_call2
  icnss: Remove WARN_ON during self recovery trigger
  msm: mdss: dsi: fix slab-out-of-bounds issue
  coresight: fix handling of ETM management register access via sysfs
  • Loading branch information
joshchoo committed Mar 6, 2019
2 parents 8d73e95 + 93a8a6a commit c2c4ccc
Show file tree
Hide file tree
Showing 56 changed files with 2,526 additions and 235 deletions.
173 changes: 173 additions & 0 deletions Documentation/scheduler/dynamic-sched-tune-boost.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
Dynamic SchedTune Boost

===============
1. INTRODUCTION
===============

Dynamic SchedTune Boost (herein referred to as DSB) extends the SchedTune
framework and provides APIs to activate and reset SchedTune boosting.

DSB effectively handles multiple concurrent boost requests for each SchedTune
group. For a particular SchedTune group, its overall boost value will be the
maximum boost value of all its ongoing concurrent boost requests.

A slot-based system is used to keep track of all boost requests that have been
made. The number of boost slots available for each SchedTune group is defined
by 'DYNAMIC_BOOST_SLOTS_COUNT'. Please see the example further below for details
on how multiple boost requests are handled by the slot-based system.

It is important that every boost request must be reset when no longer needed,
otherwise the SchedTune group will remain in a permanently boosted state.
It is up to the developer to implement this properly.


======
2. API
======

int do_stune_boost(char *st_name, int boost, int *slot);

Boost 'st_name' SchedTune cgroup to the given 'boost' value. A slot is
assigned for this new boost request. Returns 0 on success.

int do_stune_sched_boost(char *st_name, int *slot);

Boost 'st_name' SchedTune cgroup to the boost value specified in
/dev/stune/{st_name}/schedtune.sched_boost. A slot is assigned for this new
boost request. Returns 0 on success.

int reset_stune_boost(char *st_name, int slot);

Resets the boost request for the specified 'slot' of the 'st_name' SchedTune
group. The default boost value of the 'st_name' SchedTune group will be
restored if there are no more ongoing boost requests. Otherwise, the boost
value will be set to the maximum boost value of the remaining active boost
requests. Returns 0 on success.


==========
3. EXAMPLE
==========

The following example shows how DSB handles three concurrent boost requests for
the 'top-app' SchedTune group.


/*
* [INITIAL STATE]
*
* +---------+
* active_boost_slots | Empty |
* +---------+
* +---------+ +---------+ +---------+ +---------+
* available_boost_slots | Slot 0 | | Slot 1 | | Slot 2 | | Slot 3 |
* +---------+ +---------+ +---------+ +---------+
*
* Current boost value: 0
*/

/*
* Create a slot for each boost request
*/
int slotFirst, slotSecond, slotThird;


do_stune_boost("top-app", 10, &slotFirst);
/*
* [1ST BOOST REQUEST]
*
* +---------+
* | Slot 0 |
* active_boost_slots +---------+
* |boost: 10|
* +---------+
* +---------+ +---------+ +---------+
* available_boost_slots | Slot 1 | | Slot 2 | | Slot 3 |
* +---------+ +---------+ +---------+
*
* Current boost value: 10
*/


do_stune_boost("top-app", 5, &slotSecond);
/*
* [2ND BOOST REQUEST]
*
* +---------+ +---------+
* | Slot 0 | | Slot 1 |
* active_boost_slots +---------+ +---------+
* |boost: 10| |boost: 5 |
* +---------+ +---------+
* +---------+ +---------+
* available_boost_slots | Slot 2 | | Slot 3 |
* +---------+ +---------+
*
* Current boost value: 10
*/


do_stune_boost("top-app", 20, &slotThird);
/*
* [3RD BOOST REQUEST]
*
* +---------+ +---------+ +---------+
* | Slot 0 | | Slot 1 | | Slot 2 |
* active_boost_slots +---------+ +---------+ +---------+
* |boost: 10| |boost: 5 | |boost: 20|
* +---------+ +---------+ +---------+
* +---------+
* available_boost_slots | Slot 3 |
* +---------+
*
* Current boost value: 20
*/


reset_stune_boost("top-app", slotSecond);
/*
* [RESET 2ND BOOST REQUEST]
*
* +---------+ +---------+
* | Slot 0 | | Slot 2 |
* active_boost_slots +---------+ +---------+
* |boost: 10| |boost: 20|
* +---------+ +---------+
* +---------+ +---------+
* available_boost_slots | Slot 3 | | Slot 1 |
* +---------+ +---------+
*
* Current boost value: 20
*/


reset_stune_boost("top-app", slotThird);
/*
* [RESET 3RD BOOST REQUEST]
*
* +---------+
* | Slot 0 |
* active_boost_slots +---------+
* |boost: 10|
* +---------+
* +---------+ +---------+ +---------+
* available_boost_slots | Slot 3 | | Slot 1 | | Slot 2 |
* +---------+ +---------+ +---------+
*
* Current boost value: 10
*/


reset_stune_boost("top-app", slotFirst);
/*
* [RESET 1ST BOOST REQUEST]
*
* +---------+
* active_boost_slots | Empty |
* +---------+
* +---------+ +---------+ +---------+ +---------+
* available_boost_slots | Slot 3 | | Slot 1 | | Slot 2 | | Slot 0 |
* +---------+ +---------+ +---------+ +---------+
*
* Current boost value: 0
*/

4 changes: 3 additions & 1 deletion arch/arm/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ dtb-$(CONFIG_ARCH_SDM630) += sdm630-rumi.dtb \
sdm630-pm660a-headset-jacktype-no-rcm.dtb \
sdm455-mtp.dtb \
sdm455-qrd.dtb \
sdm455-cdp.dtb
sdm455-cdp.dtb \
sdm455-rcm.dtb \
sdm455-internal-codec-rcm.dtb

ifeq ($(CONFIG_ARM64),y)
always := $(dtb-y)
Expand Down
24 changes: 24 additions & 0 deletions arch/arm/boot/dts/qcom/sdm455-internal-codec-rcm.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/


/dts-v1/;

#include "sdm455.dtsi"
#include "sdm455-rcm.dtsi"
#include "sdm660-internal-codec.dtsi"

/ {
model = "Qualcomm Technologies, Inc. SDM455 Int. Audio Codec RCM";
compatible = "qcom,sdm630-cdp", "qcom,sdm630", "qcom,cdp";
qcom,board-id = <21 1>;
};
34 changes: 34 additions & 0 deletions arch/arm/boot/dts/qcom/sdm455-rcm.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/


/dts-v1/;

#include "sdm455.dtsi"
#include "sdm455-rcm.dtsi"
#include "sdm660-external-codec.dtsi"

/ {
model = "Qualcomm Technologies, Inc. SDM 630 PM660 + PM660L RCM";
compatible = "qcom,sdm630-cdp", "qcom,sdm630", "qcom,cdp";
qcom,board-id = <21 0>;
};

&tavil_snd {
qcom,msm-mbhc-hphl-swh = <0>;
qcom,msm-mbhc-gnd-swh = <0>;
};

&tasha_snd {
qcom,msm-mbhc-hphl-swh = <0>;
qcom,msm-mbhc-gnd-swh = <0>;
};
13 changes: 13 additions & 0 deletions arch/arm/boot/dts/qcom/sdm455-rcm.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#include "sdm630-cdp.dtsi"
6 changes: 5 additions & 1 deletion arch/arm64/configs/oneplus5_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ CONFIG_NAMESPACES=y
# CONFIG_PID_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_TUNE=y
CONFIG_DYNAMIC_STUNE_BOOST=y
CONFIG_DEFAULT_USE_ENERGY_AWARE=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_KALLSYMS_ALL=y
# CONFIG_MEMBARRIER is not set
CONFIG_EMBEDDED=y
Expand Down Expand Up @@ -438,6 +438,7 @@ CONFIG_FB_MSM_MDSS_WRITEBACK=y
CONFIG_FB_MSM_MDSS_HDMI_PANEL=y
CONFIG_FB_MSM_MDSS_DP_PANEL=y
CONFIG_FB_MSM_MDSS_XLOG_DEBUG=y
CONFIG_FB_MSM_MDSS_KCAL_CTRL=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
Expand All @@ -447,6 +448,7 @@ CONFIG_SND_USB_AUDIO=y
CONFIG_SND_USB_AUDIO_QMI=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_MSM8998=y
CONFIG_SOUND_CONTROL=y
CONFIG_UHID=y
CONFIG_HID_APPLE=y
CONFIG_HID_ELECOM=y
Expand Down Expand Up @@ -673,6 +675,8 @@ CONFIG_CRYPTO_XCBC=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_LZ4=y
CONFIG_CRYPTO_LZ4HC=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_DEV_QCRYPTO=y
CONFIG_CRYPTO_DEV_QCOM_MSM_QCE=y
Expand Down
Loading

0 comments on commit c2c4ccc

Please sign in to comment.