Tree/Branch: next-20140820
Git describe: next-20140820
Commit: cd01ad7c87 Add linux-next specific files for 20140820
Build Time: 19 min 20 sec
Passed: 2 / 3 ( 66.67 %)
Failed: 1 / 3 ( 33.33 %)
Errors: 1
Warnings: 10
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
arm64-allmodconfig
../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : arm64-allnoconfig
9 warnings 0 mismatches : arm64-allmodconfig
3 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 1
1 ../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
Warnings Summary: 10
4 <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
1 ../sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
1 ../sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
1 ../kernel/rcu/tree_plugin.h:2668:123: warning: 'rcu_organize_nocb_kthreads' defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 1 errors, 9 warnings, 0 section mismatches
Errors:
../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
../sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../kernel/rcu/tree_plugin.h:2668:123: warning: 'rcu_organize_nocb_kthreads' defined but not used [-Wunused-function]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
Tree/Branch: master
Git describe: v3.17-rc1-22-g480cadc
Commit: 480cadc2b7 scsi: Fix qemu boot hang problem
Build Time: 21 min 11 sec
Passed: 3 / 3 (100.00 %)
Failed: 0 / 3 ( 0.00 %)
Errors: 0
Warnings: 11
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allnoconfig
10 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 11
5 <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../fs/cifs/misc.c:578:1: warning: 'cifs_oplock_break_wait' defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
1 ../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 10 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../fs/cifs/misc.c:578:1: warning: 'cifs_oplock_break_wait' defined but not used [-Wunused-function]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
From: Mark Brown <broonie(a)linaro.org>
Client drivers such as the ChomeOS EC driver sometimes use transfers with
no buffers and only a delay specified in order to allow a delay after the
assertion of /CS. Rather than require controller drivers handle this noop
case gracefully put checks in the core to ensure that we don't call into
the controller for such transfers.
Reported-by: Addy Ke <addy.ke(a)rock-chips.com>
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
Completely untested at this point.
drivers/spi/spi.c | 44 ++++++++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 18 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ca935df..95cfe3b 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -789,27 +789,35 @@ static int spi_transfer_one_message(struct spi_master *master,
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
trace_spi_transfer_start(msg, xfer);
- reinit_completion(&master->xfer_completion);
-
- ret = master->transfer_one(master, msg->spi, xfer);
- if (ret < 0) {
- dev_err(&msg->spi->dev,
- "SPI transfer failed: %d\n", ret);
- goto out;
- }
+ if (xfer->tx_buf || xfer->rx_buf) {
+ reinit_completion(&master->xfer_completion);
+
+ ret = master->transfer_one(master, msg->spi, xfer);
+ if (ret < 0) {
+ dev_err(&msg->spi->dev,
+ "SPI transfer failed: %d\n", ret);
+ goto out;
+ }
- if (ret > 0) {
- ret = 0;
- ms = xfer->len * 8 * 1000 / xfer->speed_hz;
- ms += ms + 100; /* some tolerance */
+ if (ret > 0) {
+ ret = 0;
+ ms = xfer->len * 8 * 1000 / xfer->speed_hz;
+ ms += ms + 100; /* some tolerance */
- ms = wait_for_completion_timeout(&master->xfer_completion,
- msecs_to_jiffies(ms));
- }
+ ms = wait_for_completion_timeout(&master->xfer_completion,
+ msecs_to_jiffies(ms));
+ }
- if (ms == 0) {
- dev_err(&msg->spi->dev, "SPI transfer timed out\n");
- msg->status = -ETIMEDOUT;
+ if (ms == 0) {
+ dev_err(&msg->spi->dev,
+ "SPI transfer timed out\n");
+ msg->status = -ETIMEDOUT;
+ }
+ } else {
+ if (xfer->len)
+ dev_err(&msg->spi->dev,
+ "Bufferless transfer has length %u\n",
+ xfer->len);
}
trace_spi_transfer_stop(msg, xfer);
--
2.1.0.rc1
This patchset started out as a simple patch to introduce the irqs
command from Android's FIQ debugger to kdb. However it has since grown
more powerful because allowing kdb to reuse existing kernel
infrastructure gives us extra opportunities.
Based on the comments at the top of irqdesc.h (plotting to take the
irq_desc structure private to kernel/irq) and the relative similarity
between FIQ debugger's irqs command and the contents /proc/interrupts
we start by adding a kdb feature to print seq_files. This forms the
foundation for a new command, interrupts.
I have also been able to implement a much more generic command,
seq_file, that can display a good number of files from pseudo
filesystems. This command is very powerful although that power does mean
care must be taken to deploy it safely. It is deliberately and by
default aimed at your foot!
Note that the risk associated with the seq_file command is why I
implemented the interrupts command in C (in principle it could have been
a kdb macro). Doing it in C codifies the need for show_interrupts() to
continue using spin locks as its locking strategy.
To give an idea of what can be done with this command. The following
seq_operations structures worked correctly and report no errors:
cpuinfo_op
extfrag_op
fragmentation_op
gpiolib_seq_ops
int_seq_ops (a.k.a. /proc/interrupts)
pagetypeinfo_op
unusable_op
vmalloc_op
zoneinfo_op
The following display the information correctly but triggered errors
(sleeping function called from invalid context) with lock debugging
enabled:
consoles_op
crypto_seq_ops
diskstats_op
partitions_op
slabinfo_op
vmstat_op
All tests are run on an ARM multi_v7_defconfig kernel (plus lots of
debug features) and halted using magic SysRq so that kdb has interrupt
context. Note also that some of the seq_operations structures hook into
driver supplied code that will only be called if that driver is enabled
so the test above are useful but cannot be exhaustive.
Daniel Thompson (3):
kdb: Add framework to display sequence files
proc: Provide access to /proc/interrupts from kdb
kdb: Implement seq_file command
fs/proc/interrupts.c | 10 +++++++++
include/linux/kdb.h | 3 +++
kernel/debug/kdb/kdb_io.c | 51 +++++++++++++++++++++++++++++++++++++++++++++
kernel/debug/kdb/kdb_main.c | 28 +++++++++++++++++++++++++
4 files changed, 92 insertions(+)
--
1.9.0
Tree/Branch: next-20140818
Git describe: next-20140818
Commit: f68f823649 Add linux-next specific files for 20140818
Build Time: 8 min 24 sec
Passed: 2 / 3 ( 66.67 %)
Failed: 1 / 3 ( 33.33 %)
Errors: 1
Warnings: 10
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
arm64-allmodconfig
../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : arm64-allnoconfig
9 warnings 0 mismatches : arm64-allmodconfig
3 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 1
1 ../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
Warnings Summary: 10
4 <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
1 ../sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
1 ../sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
1 ../kernel/rcu/tree_plugin.h:2668:123: warning: 'rcu_organize_nocb_kthreads' defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 1 errors, 9 warnings, 0 section mismatches
Errors:
../arch/arm64/kernel/ptrace.c:1120:3: error: too many arguments to function 'audit_syscall_entry'
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
../sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of 'asoc_simple_card_sub_parse_of' from incompatible pointer type [enabled by default]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../kernel/rcu/tree_plugin.h:2668:123: warning: 'rcu_organize_nocb_kthreads' defined but not used [-Wunused-function]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
Tree/Branch: v3.17-rc1
Git describe: v3.17-rc1
Commit: 7d1311b93e Linux 3.17-rc1
Build Time: 14 min 16 sec
Passed: 3 / 3 (100.00 %)
Failed: 0 / 3 ( 0.00 %)
Errors: 0
Warnings: 11
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allnoconfig
10 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 11
5 <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../fs/cifs/misc.c:578:1: warning: 'cifs_oplock_break_wait' defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
1 ../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 10 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
../fs/cifs/misc.c:578:1: warning: 'cifs_oplock_break_wait' defined but not used [-Wunused-function]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
The new power aware scheduling framework is being designed with a goal that
all the cpu power management is in one place. Today the power management
policies are fragmented between the cpuidle and cpufreq subsystems, which
makes power management inconsistent. To top this, we were integrating
task packing algorithms into the scheduler which could potentially worsen
the scenario.
The new power aware scheduler design will have all policies, all metrics,
all averaging concerning cpuidle and cpufrequency in one place, that being the
scheduler. This patchset lays the foundation for this approach to help
remove the existing fragmented approach towards cpu power savings.
NOTE: This patchset targets only cpuidle. cpu-frequency can be integrated into
this design on the same lines.
The design is broken down into incremental steps which will enable
easy validation of the power aware scheduler. This by no means is complete
and will require more work to get to a stage where it can beat the
current approach. Like I said this is just the foundation to help us
get started. The subsequent patches can be small incremental measured steps.
Ingo had pointed out this approach in http://lwn.net/Articles/552889/ and I
have tried my best at understanding and implementing the initial steps that
he suggested.
1.Start from the dumbest possible state: all CPUs are powered up fully,
there's no idle state selection essentially.
2.Then go for the biggest effect first and add the ability to idle in a
lower power state (with new functions and a low level driver that implements
this for the platform with no policy embedded into it.
3.Implement the task packing algorithm.
This patchset implements the above three steps and makes the fundamental design
of power aware scheduler clear. It shows how:
1.The design should be non intrusive with the existing code. It should be
enabled/disabled by a config switch. This way we can continue to work towards
making it better without having to worry about regressing the kernel and
yet have it in the kernel at the same time; a confidence booster that it is
making headway.
CONFIG_SCHED_POWER is the switch that makes the new code appear when turned on
and disappear and default to the original code when turned off.
2.The design should help us test it better. Like Ingo pointed out:
"Important: it's not a problem that the initial code won't outperform the
current kernel's performance. It should outperform the _initial_ 'dumb'
code in the first step. Then the next step should outperform the previous
step, etc.
The quality of this iterative approach will eventually surpass the
combined effect of currently available but non-integrated facilities."
This is precisely what this design does. PATCH[1/19] disables cpuidle and
cpufrequency sub systems altogether if CONFIG_SCHED_POWER is enabled.
This is the dumb code. Our subsequent patches should outperform this.
3. Introduce a low level driver which interfaces scheduler with C-state
switching. Again Ingo had pointed out this saying:
"It should be presented to the scheduler in a platform independent fashion,
but without policy embedded: a low level platform driver interface in essence."
PATCH[2/19] ensures that CPUIDLE governors no longer control
idle state selection. The idle state selection and policies are moved into
kernel/sched/power.c. True, its the same code from the menu governor, however
it has been moved into scheduler specific code and no longer functions like
a driver. Its meant to be part of the core kernel. The "low level driver" lives
under drivers/cpuidle/cpuidle.c like before. It registers platform specific
cpuidle drivers and does other low level stuff that the scheduler needn't
bother about. It has no policies embedded into it whatsoever. Importantly it
is an entry point to switching C states and nothing beyond that.
PATCH[3/19] enumerates idle states and parameters in the scheduler topology.
This is so that the scheduler knows the cost of entry/exit into
idle states that can be made use of going ahead. As an example, this patchset
shows how the platform specific cpuidle driver should help fill up the idle state
details into the topology. This fundamental information is missing today in the
scheduler.
These two patches are not expected to change the performance/power savings
in any way. They are just the first steps towards the integrated approach of
the power aware scheduler.
The patches PATCH[4/19] to PATCH[18/19] do task packing. This series is the
one that Alex Shi had posted long ago https://lkml.org/lkml/2013/3/30/78.
However this patch series will come into effect only if CONFIG_SCHED_POWER is
enabled. It is this series which is expected to bring about changes in
performance and power savings; not necessarily better than the existing code,
but certainly should be better than the dumb code.
Our subsequent efforts should surpass the performance/powersavings of the
existing code. This patch series is compile tested only.
V1 of this power efficient scheduling design was posted by Morten after
Ingo posted his suggestions on http://lwn.net/Articles/552889/.
[RFC][PATCH 0/9] sched: Power scheduler design proposal:
https://lkml.org/lkml/2013/7/15/101
But it decoupled the scheduler into the regular and power scheduler with
the latter controlling the cpus that could be used by the regular scheduler.
We do not need this kind of decoupling. With the foundation that this patch
set lays, it must be relatively easy to make the existing scheduler power
aware.
---
Alex Shi (16):
sched: add sched balance policies in kernel
sched: add sysfs interface for sched_balance_policy selection
sched: log the cpu utilization at rq
sched: add new sg/sd_lb_stats fields for incoming fork/exec/wake balancing
sched: move sg/sd_lb_stats struct ahead
sched: get rq potential maximum utilization
sched: detect wakeup burst with rq->avg_idle
sched: add power aware scheduling in fork/exec/wake
sched: using avg_idle to detect bursty wakeup
sched: packing transitory tasks in wakeup power balancing
sched: add power/performance balance allow flag
sched: pull all tasks from source grp and no balance for prefer_sibling
sched: add new members of sd_lb_stats
sched: power aware load balance
sched: lazy power balance
sched: don't do power balance on share cpu power domain
Preeti U Murthy (3):
sched/power: Remove cpu idle state selection and cpu frequency tuning
sched/power: Move idle state selection into the scheduler
sched/idle: Enumerate idle states in scheduler topology
Documentation/ABI/testing/sysfs-devices-system-cpu | 23 +
arch/powerpc/Kconfig | 1
arch/powerpc/platforms/powernv/Kconfig | 12
drivers/cpufreq/Kconfig | 2
drivers/cpuidle/Kconfig | 10
drivers/cpuidle/cpuidle-powernv.c | 10
drivers/cpuidle/cpuidle.c | 65 ++
include/linux/sched.h | 16 -
include/linux/sched/sysctl.h | 3
kernel/Kconfig.sched | 11
kernel/sched/Makefile | 1
kernel/sched/debug.c | 3
kernel/sched/fair.c | 632 +++++++++++++++++++-
kernel/sched/power.c | 480 +++++++++++++++
kernel/sched/sched.h | 16 +
kernel/sysctl.c | 9
16 files changed, 1234 insertions(+), 60 deletions(-)
create mode 100644 kernel/Kconfig.sched
create mode 100644 kernel/sched/power.c
--