Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
Merged

Eas #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
916cee2
sched: core: revert all oneplus changes
randomhydrosol Aug 18, 2017
f300f9d
Revert "fs: readdir: Fix su hide patch for non-iterate filesystems"
randomhydrosol Aug 18, 2017
ace1aeb
Revert "kernel: Fix potential refcount leak in su check"
randomhydrosol Aug 18, 2017
e69f34b
Revert "kernel: Only expose su when daemon is running"
randomhydrosol Aug 18, 2017
bd8dab8
Revert "sched: prevent task migration while governor queries CPUs' load"
Jul 27, 2017
88bf466
Revert "sched: Add stub function for sched_get_cpus_busy()"
Jul 27, 2017
9432956
eas: staging for op2
randomhydrosol Jul 27, 2017
1a8b65a
Add EAS CONFIGs
toddkjos Dec 14, 2015
d80e8a5
Add EAS topology changes
toddkjos Dec 14, 2015
94f79bc
Add changes to non-sched files for EAS
toddkjos Dec 14, 2015
d0962f4
Backport EAS scheduler from 3.18
toddkjos Dec 16, 2015
6f0ec80
Add support for making sched-dvfs the default cpufreq governor
toddkjos Dec 16, 2015
3209e06
Notify scheduler of cpuidle state changes
toddkjos Dec 16, 2015
f3c3670
Remove incorrect test for root node in sched-tune
toddkjos Dec 17, 2015
aa52c30
Enable EAS ftrace events
toddkjos Dec 17, 2015
76b57b1
EAS fixes to get energy model to work correctly
toddkjos Dec 22, 2015
8227ddc
Make energy_aware_wake smarter about cstates and overutilization
toddkjos Dec 22, 2015
b667212
Added instramentation and tuned energy_aware_wake_cpu()
toddkjos Jan 5, 2016
730b4ac
Tune energy_aware_wake_cpu() / select_idle_sibling()
toddkjos Jan 5, 2016
dfb8ef9
Fix handling of max frequency
toddkjos Jan 8, 2016
c725d05
Revert earlier change to handling overutilized cpu
toddkjos Jan 8, 2016
288b8ef
UPSTREAM: sched/deadline: Implement cancel_dl_timer() to use in switc…
Oct 27, 2014
80eb61e
UPSTREAM: sched/deadline: Fix artificial overrun introduced by yield_…
Oct 30, 2014
be33a9f
UPSTREAM: sched/deadline: Reschedule from switched_from_dl() after a …
Oct 30, 2014
13419a3
UPSTREAM: sched/deadline: Don't check CONFIG_SMP in switched_from_dl()
Oct 30, 2014
b143202
UPSTREAM: sched/fair: Fix sched_entity::avg::decay_count initialization
Dec 15, 2014
0171839
UPSTREAM: sched/core: Remove check of p->sched_class
Dec 29, 2014
3760447
UPSTREAM: sched/core: Validate rq_clock*() serialization
Jan 5, 2015
72b7c7c
UPSTREAM: sched/deadline: Fix deadline parameter modification handling
Jan 28, 2015
8c087ab
UPSTREAM: sched/deadline: Fix stale yield state
Nov 26, 2014
40a8338
UPSTREAM: sched/dl: Prevent enqueue of a sleeping task in dl_task_tim…
tkhai Feb 16, 2015
e1aa316
UPSTREAM: sched/deadline: Support DL task migration during CPU hotplug
Mar 26, 2015
14b52e4
UPSTREAM: sched: deadline: Use hrtimer_start()
KAGA-KOKO Apr 14, 2015
fac6e38
sched: Move wait.c into kernel/sched/
Oct 31, 2013
ca151a8
CHROMIUM: sched: Support for extracting EAS energy costs from DT
Jun 29, 2015
9279fac
CHROMIUM: Documentation: DT bindings for energy model cost data requi…
Jun 29, 2015
70145aa
UPSTREAM: sched: Move the loadavg code to a more obvious location
Apr 14, 2015
64e0c7d
UPSTREAM: sched/fair: Prevent throttling in early pick_next_task_fair()
Apr 6, 2015
98f158b
UPSTREAM: sched,dl: Fix sched class hopping CBS hole
Jun 11, 2015
0ae89cf
UPSTREAM: sched: Move code around
Jun 11, 2015
f11da02
UPSTREAM: sched/fair: Clean up the __sched_period() code
fbq Jul 2, 2015
c6e8cf2
UPSTREAM: sched: Ensure a task has a non-normalized vruntime when ret…
lgebyungchulpark Aug 10, 2015
66dddbf
CHROMIUM: sched: Consider misfit tasks when load-balancing
msrasmussen Jul 28, 2015
9d51ce1
DEBUG: sched: add energy procfs interface
deggeman Nov 14, 2014
b9a59f0
CHROMIUM: sched: Disable energy-unfriendly nohz kicks
msrasmussen Feb 3, 2015
3aa9da8
WIP: sched/tune: add detailed documentation
derkling Jun 30, 2015
a9c3e5d
FROMLIST: cpufreq: introduce cpufreq_driver_is_slow
mturquette Feb 23, 2016
d45eed5
EAS: sched/fair: tunable to honor sync wakeups
toddkjos Feb 19, 2016
051fab2
EAS: sched/fair: tunable to force selecting at cpu granularity
Mar 3, 2016
9e9a86b
android: binder: Use wake up hint for synchronous transactions.
riandrews Oct 21, 2015
684a646
android: binder: Disable preemption while holding the global binder l…
riandrews Oct 21, 2015
8ce7ce2
Add security hooks to binder and implement the hooks for SELinux.
stephensmalley Nov 5, 2012
d9da179
CHROMIUM: android: binder: Fix potential scheduling-while-atomic
abrestic Oct 23, 2015
3c0b32c
UPSTREAM: drivers: android: correct the size of struct binder_uintptr…
Feb 17, 2016
5b33a29
binder: Disable debug mask
TheCrazyLex Jul 5, 2017
ef67dde
android: binder: Use wake up hint for synchronous transactions.
riandrews Sep 1, 2015
bc3c0e9
test
randomhydrosol Aug 18, 2017
546930d
defconfig: disable SYSVIPC
randomhydrosol Aug 18, 2017
6378389
percpu: add raw_cpu_ptr() for 3.18 ext4 backport
tytso Jan 22, 2015
11f89f1
msm8994: eas: disable debug message
Feb 14, 2016
5574f43
EXPERIMENTAL: sched/fair: kick nohz idle balance for misfit task
credp Mar 27, 2017
a8b3602
BACKPORT: sched: EAS & cpu hotplug interoperability
deggeman Jul 30, 2015
5078571
WIP: arm64: Enable frequency invariant scheduler load-tracking support
deggeman Sep 25, 2015
4c7627d
WIP: arm: Enable max freq invariant scheduler load-tracking and capac…
deggeman Sep 23, 2015
47da847
CHROMIUM: cpufreq: Declare acct_update_power as static inline if needed
groeck Jan 13, 2016
5964dc5
WIP: arm: Cpu invariant scheduler load-tracking and capacity support
deggeman Jul 10, 2015
2d7533e
WIP: arm: Enable frequency invariant scheduler load-tracking support
deggeman Sep 23, 2015
9e3dbab
WIP: arm64: Enable max freq invariant scheduler load-tracking and cap…
deggeman Sep 25, 2015
1e02bcd
WIP: cpufreq: Frequency invariant scheduler load-tracking support
deggeman Sep 17, 2015
110e9e8
UPSTREAM: cpumask, nodemask: implement cpumask/nodemask_pr_args()
htejun Feb 13, 2015
d0a30ee
WIP: cpufreq: Max freq invariant scheduler load-tracking and cpu capa…
deggeman Sep 22, 2015
82f3230
WIP: sched: Documentation for scheduler energy cost model
msrasmussen Jan 13, 2015
7b93be4
arm64: Cpu invariant scheduler load-tracking and capacity support
Apr 30, 2015
dbf8dc0
EAS: sched/fair: for SMP bias toward idle core with capacity
toddkjos Feb 20, 2016
41cf166
EAS: sched: fair: fix uninitialized local variable
toddkjos Mar 29, 2016
dd371e2
kthread: allow to cancel kthread work
pmladek Oct 11, 2016
fed1f07
sched/cpufreq_sched: use shorter throttle for raising OPP
toddkjos Feb 25, 2016
c43e344
sched/cpufreq: Increasing throttle_down_nsec to 50ms
May 4, 2016
e73781a
sched-freq: make throttle times tunable
toddkjos May 11, 2016
48a7066
arm: dts: remove unneeded bootargs for eas
mydongistiny Jun 12, 2017
a1987e5
dtsi: Add EAS Energy Profile
Jun 10, 2017
102b8bd
Update EAS Energy Profile to Angler
Jun 11, 2017
f4ea1ce
sched: fix build error
randomhydrosol Aug 18, 2017
4abfa02
fix unterminated endif
randomhydrosol Aug 18, 2017
8657a5d
Get rid of __cpuinit - squashed (jollaman999)
jollaman999 Aug 7, 2016
f978a56
revert oneplus changes for better eas compatibility
randomhydrosol Aug 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
360 changes: 360 additions & 0 deletions Documentation/devicetree/bindings/scheduler/sched-energy-costs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,360 @@
===========================================================
Energy cost bindings for Energy Aware Scheduling
===========================================================

===========================================================
1 - Introduction
===========================================================

This note specifies bindings required for energy-aware scheduling
(EAS)[1]. Historically, the scheduler's primary objective has been
performance. EAS aims to provide an alternative objective - energy
efficiency. EAS relies on a simple platform energy cost model to
guide scheduling decisions. The model only considers the CPU
subsystem.

This note is aligned with the definition of the layout of physical
CPUs in the system as described in the ARM topology binding
description [2]. The concept is applicable to any system so long as
the cost model data is provided for those processing elements in
that system's topology that EAS is required to service.

Processing elements refer to hardware threads, CPUs and clusters of
related CPUs in increasing order of hierarchy.

EAS requires two key cost metrics - busy costs and idle costs. Busy
costs comprise of a list of compute capacities for the processing
element in question and the corresponding power consumption at that
capacity. Idle costs comprise of a list of power consumption values
for each idle state [C-state] that the processing element supports.
For a detailed description of these metrics, their derivation and
their use see [3].

These cost metrics are required for processing elements in all
scheduling domain levels that EAS is required to service.

===========================================================
2 - energy-costs node
===========================================================

Energy costs for the processing elements in scheduling domains that
EAS is required to service are defined in the energy-costs node
which acts as a container for the actual per processing element cost
nodes. A single energy-costs node is required for a given system.

- energy-costs node

Usage: Required

Description: The energy-costs node is a container node and
it's sub-nodes describe costs for each processing element at
all scheduling domain levels that EAS is required to
service.

Node name must be "energy-costs".

The energy-costs node's parent node must be the cpus node.

The energy-costs node's child nodes can be:

- one or more cost nodes.

Any other configuration is considered invalid.

The energy-costs node can only contain a single type of child node
whose bindings are described in paragraph 4.

===========================================================
3 - energy-costs node child nodes naming convention
===========================================================

energy-costs child nodes must follow a naming convention where the
node name must be "thread-costN", "core-costN", "cluster-costN"
depending on whether the costs in the node are for a thread, core or
cluster. N (where N = {0, 1, ...}) is the node number and has no
bearing to the OS' logical thread, core or cluster index.

===========================================================
4 - cost node bindings
===========================================================

Bindings for cost nodes are defined as follows:

- cluster-cost node

Description: must be declared within an energy-costs node. A
system can contain multiple clusters and each cluster
serviced by EAS must have a corresponding cluster-costs
node.

The cluster-cost node name must be "cluster-costN" as
described in 3 above.

A cluster-cost node must be a leaf node with no children.

Properties for cluster-cost nodes are described in paragraph
5 below.

Any other configuration is considered invalid.

- core-cost node

Description: must be declared within an energy-costs node. A
system can contain multiple cores and each core serviced by
EAS must have a corresponding core-cost node.

The core-cost node name must be "core-costN" as described in
3 above.

A core-cost node must be a leaf node with no children.

Properties for core-cost nodes are described in paragraph
5 below.

Any other configuration is considered invalid.

- thread-cost node

Description: must be declared within an energy-costs node. A
system can contain cores with multiple hardware threads and
each thread serviced by EAS must have a corresponding
thread-cost node.

The core-cost node name must be "core-costN" as described in
3 above.

A core-cost node must be a leaf node with no children.

Properties for thread-cost nodes are described in paragraph
5 below.

Any other configuration is considered invalid.

===========================================================
5 - Cost node properties
==========================================================

All cost node types must have only the following properties:

- busy-cost-data

Usage: required
Value type: An array of 2-item tuples. Each item is of type
u32.
Definition: The first item in the tuple is the capacity
value as described in [3]. The second item in the tuple is
the energy cost value as described in [3].

- idle-cost-data

Usage: required
Value type: An array of 1-item tuples. The item is of type
u32.
Definition: The item in the tuple is the energy cost value
as described in [3].

===========================================================
4 - Extensions to the cpu node
===========================================================

The cpu node is extended with a property that establishes the
connection between the processing element represented by the cpu
node and the cost-nodes associated with this processing element.

The connection is expressed in line with the topological hierarchy
that this processing element belongs to starting with the level in
the hierarchy that this processing element itself belongs to through
to the highest level that EAS is required to service. The
connection cannot be sparse and must be contiguous from the
processing element's level through to the highest desired level. The
highest desired level must be the same for all processing elements.

Example: Given that a cpu node may represent a thread that is a part
of a core, this property may contain multiple elements which
associate the thread with cost nodes describing the costs for the
thread itself, the core the thread belongs to, the cluster the core
belongs to and so on. The elements must be ordered from the lowest
level nodes to the highest desired level that EAS must service. The
highest desired level must be the same for all cpu nodes. The
elements must not be sparse: there must be elements for the current
thread, the next level of hierarchy (core) and so on without any
'holes'.

Example: Given that a cpu node may represent a core that is a part
of a cluster of related cpus this property may contain multiple
elements which associate the core with cost nodes describing the
costs for the core itself, the cluster the core belongs to and so
on. The elements must be ordered from the lowest level nodes to the
highest desired level that EAS must service. The highest desired
level must be the same for all cpu nodes. The elements must not be
sparse: there must be elements for the current thread, the next
level of hierarchy (core) and so on without any 'holes'.

If the system comprises of hierarchical clusters of clusters, this
property will contain multiple associations with the relevant number
of cluster elements in hierarchical order.

Property added to the cpu node:

- sched-energy-costs

Usage: required
Value type: List of phandles
Definition: a list of phandles to specific cost nodes in the
energy-costs parent node that correspond to the processing
element represented by this cpu node in hierarchical order
of topology.

The order of phandles in the list is significant. The first
phandle is to the current processing element's own cost
node. Subsequent phandles are to higher hierarchical level
cost nodes up until the maximum level that EAS is to
service.

All cpu nodes must have the same highest level cost node.

The phandle list must not be sparsely populated with handles
to non-contiguous hierarchical levels. See commentary above
for clarity.

Any other configuration is invalid.

===========================================================
5 - Example dts
===========================================================

Example 1 (ARM 64-bit, 6-cpu system, two clusters of cpus, one
cluster of 2 Cortex-A57 cpus, one cluster of 4 Cortex-A53 cpus):

cpus {
#address-cells = <2>;
#size-cells = <0>;
.
.
.
A57_0: cpu@0 {
compatible = "arm,cortex-a57","arm,armv8";
reg = <0x0 0x0>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A57_L2>;
clocks = <&scpi_dvfs 0>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_0 &CLUSTER_COST_0>;
};

A57_1: cpu@1 {
compatible = "arm,cortex-a57","arm,armv8";
reg = <0x0 0x1>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A57_L2>;
clocks = <&scpi_dvfs 0>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_0 &CLUSTER_COST_0>;
};

A53_0: cpu@100 {
compatible = "arm,cortex-a53","arm,armv8";
reg = <0x0 0x100>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A53_L2>;
clocks = <&scpi_dvfs 1>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_1 &CLUSTER_COST_1>;
};

A53_1: cpu@101 {
compatible = "arm,cortex-a53","arm,armv8";
reg = <0x0 0x101>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A53_L2>;
clocks = <&scpi_dvfs 1>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_1 &CLUSTER_COST_1>;
};

A53_2: cpu@102 {
compatible = "arm,cortex-a53","arm,armv8";
reg = <0x0 0x102>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A53_L2>;
clocks = <&scpi_dvfs 1>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_1 &CLUSTER_COST_1>;
};

A53_3: cpu@103 {
compatible = "arm,cortex-a53","arm,armv8";
reg = <0x0 0x103>;
device_type = "cpu";
enable-method = "psci";
next-level-cache = <&A53_L2>;
clocks = <&scpi_dvfs 1>;
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
sched-energy-costs = <&CPU_COST_1 &CLUSTER_COST_1>;
};

energy-costs {
CPU_COST_0: core-cost0 {
busy-cost-data = <
417 168
579 251
744 359
883 479
1024 616
>;
idle-cost-data = <
15
0
>;
};
CPU_COST_1: core-cost1 {
busy-cost-data = <
235 33
302 46
368 61
406 76
447 93
>;
idle-cost-data = <
6
0
>;
};
CLUSTER_COST_0: cluster-cost0 {
busy-cost-data = <
417 24
579 32
744 43
883 49
1024 64
>;
idle-cost-data = <
65
24
>;
};
CLUSTER_COST_1: cluster-cost1 {
busy-cost-data = <
235 26
303 30
368 39
406 47
447 57
>;
idle-cost-data = <
56
17
>;
};
};
};

===============================================================================
[1] https://lkml.org/lkml/2015/5/12/728
[2] Documentation/devicetree/bindings/topology.txt
[3] Documentation/scheduler/sched-energy.txt
Loading