BUG_ON() in audit_syscall_entry() is hit under the following conditions:
1) syscall auditing is enabled (that is, by running auditd).
2) user process issues syscall(-1)
In fact, syscall(-1) just fails (not raising SIGILL, that is an expected
behavior if not audited), and the succeeding syscall will hit this BUG_ON.
------------[ cut here ]------------
kernel BUG at (...)/kernel/auditsc.c:1534!
Internal error: Oops - BUG: 0 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 61 Comm: syscall_arm Not tainted 3.17.0-rc4 #60
task: ea0c4380 ti: ea48e000 task.ti: ea48e000
PC is at __audit_syscall_entry+0xe4/0x110
LR is at 0xea0c4380
pc : [<c02b2ae8>] lr : [<ea0c4380>] psr: 20000013
sp : ea48ff68 ip : 00000001 fp : 0000869c
r10: 00000200 r9 : ea48e000 r8 : c020f4e4
r7 : 000000c5 r6 : ea48e000 r5 : ea48ffb0 r4 : ea490800
r3 : bef1e718 r2 : 00000001 r1 : 000000c5 r0 : 40000028
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8a4ac059 DAC: 00000015
Process syscall_arm (pid: 61, stack limit = 0xea48e250)
Stack: (0xea48ff68 to 0xea490000)
ff60: 540e7a69 3ab5e840 00000200 000000c5 ea48ffb0 ea48e000
ff80: 000000c5 c02114bc bef1e718 00000001 b6efdb58 ffffffff 08400000 000000c5
ffa0: c020f4e4 c020f49c b6efdb58 ffffffff 00000001 bef1e718 bef1e718 00000001
ffc0: b6efdb58 ffffffff 08400000 000000c5 00000000 b6f22850 00000008 0000869c
ffe0: 000000c5 bef1e704 b6ea315f b6e318e6 20000030 00000001 00000000 00000000
[<c02b2ae8>] (__audit_syscall_entry) from [<c02114bc>] (syscall_trace_enter+0xf0/0x120)
[<c02114bc>] (syscall_trace_enter) from [<c020f49c>] (__sys_trace+0xc/0x38)
Code: e584500c e5842004 e28dd00c e8bd80f0 (e7f001f2)
---[ end trace 0c4441660aba5692 ]---
Under the current implementation, audit_syscall_entry() is called even
against syscall(-1), but audit_syscall_exit() is not. Because 'in_syscall'
flag in a current thread's audit context is kept on, next called
audit_syscall_entry() will see BUG_ON(in_syscall).
This patch fixes this bug by
1) preventing syscall enter/exit tracing, ftrace tracepoint and audit,
from being executed if an invalid (including -1) or pseudo syscall
number (starting from __NR_ARM_BASE + 1).
Please note that tracehook_report_syscall(PTRACE_SYSCALL_EXIT) is
still executed as it should be paired with
tracehook_report_syscall(PTRACE_SYSCALL_ENTER).
2) handling user-issued syscall(-1) with arm_syscall() for compatibility
if tracing is on.
Since UL(-1) > __NR_ARM_BASE - __NR_SYSCALL_BASE, arm_syscall() is
called at local_restart in entry-common.S if tracing is off.
Signed-off-by: AKASHI Takahiro <takahiro.akashi(a)linaro.org>
---
arch/arm/include/asm/traps.h | 1 +
arch/arm/kernel/entry-common.S | 3 ++-
arch/arm/kernel/ptrace.c | 49 +++++++++++++++++++++++++---------------
3 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h
index f555bb3..de01145 100644
--- a/arch/arm/include/asm/traps.h
+++ b/arch/arm/include/asm/traps.h
@@ -49,6 +49,7 @@ static inline int in_exception_text(unsigned long ptr)
extern void __init early_trap_init(void *);
extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame);
extern void ptrace_break(struct task_struct *tsk, struct pt_regs *regs);
+extern int arm_syscall(int no, struct pt_regs *regs);
extern void *vectors_page;
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index e52fe5a..4c62324 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -476,10 +476,11 @@ __sys_trace:
cmp scno, #-1 @ skip the syscall?
bne 2b
add sp, sp, #S_OFF @ restore stack
- b ret_slow_syscall
+ b __sys_trace_return_skipped
__sys_trace_return:
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
+__sys_trace_return_skipped:
mov r0, sp
bl syscall_trace_exit
b ret_slow_syscall
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 0c27ed6..d458367 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -930,7 +930,9 @@ static void tracehook_report_syscall(struct pt_regs *regs,
asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
{
- current_thread_info()->syscall = scno;
+ int orig_scno;
+
+ current_thread_info()->syscall = orig_scno = scno;
/* Do the secure computing check first; failures should be fast. */
if (secure_computing(scno) == -1)
@@ -941,31 +943,42 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
scno = current_thread_info()->syscall;
- if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
- trace_sys_enter(regs, scno);
+ if (scno >= 0 && scno < NR_syscalls) {
+ if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
+ trace_sys_enter(regs, scno);
- audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1,
- regs->ARM_r2, regs->ARM_r3);
+ audit_syscall_entry(AUDIT_ARCH_ARM, scno,
+ regs->ARM_r0, regs->ARM_r1,
+ regs->ARM_r2, regs->ARM_r3);
+ } else if (scno == -1 && orig_scno == -1) {
+ /*
+ * For compatibility, we handles user-issued syscall(-1)
+ * here with arm_syscall().
+ */
+ arm_syscall(scno, regs);
+ }
return scno;
}
asmlinkage void syscall_trace_exit(struct pt_regs *regs)
{
- /*
- * Audit the syscall before anything else, as a debugger may
- * come in and change the current registers.
- */
- audit_syscall_exit(regs);
+ if (current_thread_info()->syscall < NR_syscalls) {
+ /*
+ * Audit the syscall before anything else, as a debugger may
+ * come in and change the current registers.
+ */
+ audit_syscall_exit(regs);
- /*
- * Note that we haven't updated the ->syscall field for the
- * current thread. This isn't a problem because it will have
- * been set on syscall entry and there hasn't been an opportunity
- * for a PTRACE_SET_SYSCALL since then.
- */
- if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
- trace_sys_exit(regs, regs_return_value(regs));
+ /*
+ * Note that we haven't updated the ->syscall field for the
+ * current thread. This isn't a problem because it will have
+ * been set on syscall entry and there hasn't been
+ * an opportunity for a PTRACE_SET_SYSCALL since then.
+ */
+ if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
+ trace_sys_exit(regs, regs_return_value(regs));
+ }
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
--
1.7.9.5
Tree/Branch: v3.12.29
Git describe: v3.12.29
Commit: b45ddfa256 Linux 3.12.29
Build Time: 47 min 59 sec
Passed: 6 / 8 ( 75.00 %)
Failed: 2 / 8 ( 25.00 %)
Errors: 8
Warnings: 84
Section Mismatches: 1
Failed defconfigs:
arm-allmodconfig
arm64-allmodconfig
Errors:
arm-allmodconfig
/home/broonie/build/linux-stable/drivers/hwmon/twl4030-madc-hwmon.c:123:1: error: expected identifier or '(' at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:158:2: error: expected declaration or statement at end of input
arm64-allmodconfig
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:393:3: error: implicit declaration of function 'pci_free_consistent' [-Werror=implicit-function-declaration]
/home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:410:2: error: implicit declaration of function 'pci_alloc_consistent' [-Werror=implicit-function-declaration]
/home/broonie/build/linux-stable/drivers/parport/parport_pc.c:67:25: fatal error: asm/parport.h: No such file or directory
/home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:78: error: duplicate case value
/home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:18: error: previously used here
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
2 warnings 0 mismatches : x86_64-allnoconfig
44 warnings 1 mismatches : arm-allmodconfig
2 warnings 0 mismatches : arm64-defconfig
41 warnings 0 mismatches : arm64-allmodconfig
1 warnings 0 mismatches : x86_64-defconfig
-------------------------------------------------------------------------------
Errors summary: 8
6 /home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
1 /home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:78: error: duplicate case value
1 /home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:18: error: previously used here
1 /home/broonie/build/linux-stable/drivers/parport/parport_pc.c:67:25: fatal error: asm/parport.h: No such file or directory
1 /home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:410:2: error: implicit declaration of function 'pci_alloc_consistent' [-Werror=implicit-function-declaration]
1 /home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:393:3: error: implicit declaration of function 'pci_free_consistent' [-Werror=implicit-function-declaration]
1 /home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:158:2: error: expected declaration or statement at end of input
1 /home/broonie/build/linux-stable/drivers/hwmon/twl4030-madc-hwmon.c:123:1: error: expected identifier or '(' at end of input
Warnings Summary: 84
2 /home/broonie/build/linux-stable/net/core/secure_seq.c:30:4: warning: value computed is not used [-Wunused-value]
2 /home/broonie/build/linux-stable/drivers/net/ethernet/smsc/smc91x.c:1899:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2 /home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:99:6: warning: unused variable 'ret' [-Wunused-variable]
2 /home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:96:12: warning: 'pmbus_identify' defined but not used [-Wunused-function]
2 /home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:33:13: warning: 'pmbus_find_sensor_groups' defined but not used [-Wunused-function]
2 /home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: warning: no return statement in function returning non-void [-Wreturn-type]
1 /home/broonie/build/linux-stable/sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/sound/soc/fsl/imx-audmux.c:161:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 /home/broonie/build/linux-stable/net/sunrpc/xprtrdma/verbs.c:1774:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/net/netfilter/xt_connlimit.c:234:4: warning: value computed is not used [-Wunused-value]
1 /home/broonie/build/linux-stable/net/netfilter/nf_conntrack_core.c:674:3: warning: value computed is not used [-Wunused-value]
1 /home/broonie/build/linux-stable/drivers/video/xen-fbfront.c:589:8: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
1 /home/broonie/build/linux-stable/drivers/video/omap2/displays-new/panel-sony-acx565akm.c:608:25: warning: unused variable 'ddata' [-Wunused-variable]
1 /home/broonie/build/linux-stable/drivers/video/aty/radeon_pm.c:1718:13: warning: 'radeon_reinitialize_M10' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/usb/storage/realtek_cr.c:699:13: warning: 'fw5895_init' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/usb/storage/realtek_cr.c:629:12: warning: 'config_autodelink_before_power_down' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/tty/serial/efm32-uart.c:834:123: warning: 'efm32_uart_exit' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/staging/wlan-ng/prism2fw.c:795:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/vt6655/iwctl.c:758:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/vt6655/device_main.c:3257:1: warning: the frame size of 1864 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/sm7xxfb/sm7xxfb.c:117:122: warning: 'sm7xx_vga_setup' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/staging/rts5139/rts51x.c:204:13: warning: 'rts51x_try_to_enter_ss' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/staging/dgnc/dgnc_tty.c:613:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/dgap/dgap_tty.c:664:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/dgap/dgap_fep5.c:173:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/dgap/dgap_fep5.c:112:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/dgap/dgap_driver.c:982:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1440:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 /home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1426:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 /home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1387:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 /home/broonie/build/linux-stable/drivers/spi/spi-pl022.c:1423:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 /home/broonie/build/linux-stable/drivers/spi/spi-gpio.c:252:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/spi/spi-atmel.c:1460:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/spi/spi-atmel.c:1335:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
1 /home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:8517:5: warning: case value '257' not in enumerated type 'ahc_chip' [-Wswitch]
1 /home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:8510:5: warning: case value '513' not in enumerated type 'ahc_chip' [-Wswitch]
1 /home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:7901:5: warning: case value '257' not in enumerated type 'ahc_chip' [-Wswitch]
1 /home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:7898:5: warning: case value '513' not in enumerated type 'ahc_chip' [-Wswitch]
1 /home/broonie/build/linux-stable/drivers/regulator/tps62360-regulator.c:363:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 /home/broonie/build/linux-stable/drivers/power/pm2301_charger.c:725:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
1 /home/broonie/build/linux-stable/drivers/power/ab8500_charger.c:1559:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
1 /home/broonie/build/linux-stable/drivers/power/ab8500_charger.c:1390:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
1 /home/broonie/build/linux-stable/drivers/pinctrl/pinctrl-bcm2835.c:1060:2: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]
1 /home/broonie/build/linux-stable/drivers/pinctrl/pinctrl-bcm2835.c:1043:3: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]
1 /home/broonie/build/linux-stable/drivers/net/xen-netfront.c:1858:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 /home/broonie/build/linux-stable/drivers/net/xen-netback/interface.c:241:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 /home/broonie/build/linux-stable/drivers/net/wireless/ti/wlcore/spi.c:317:1: warning: the frame size of 9728 bytes is larger than 2048 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/net/wireless/cw1200/sta.c:142:4: warning: value computed is not used [-Wunused-value]
1 /home/broonie/build/linux-stable/drivers/net/wireless/cw1200/scan.c:330:4: warning: value computed is not used [-Wunused-value]
1 /home/broonie/build/linux-stable/drivers/net/ethernet/dec/tulip/winbond-840.c:911:2: warning: #warning Processor architecture undefined [-Wcpp]
1 /home/broonie/build/linux-stable/drivers/net/ethernet/amd/nmclan_cs.c:625:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at /home/broonie/build/linux-stable/include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
1 /home/broonie/build/linux-stable/drivers/mtd/nand/gpmi-nand/gpmi-nand.c:120:13: warning: 'set_geometry_by_ecc_info' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/mtd/chips/cfi_cmdset_0020.c:654:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/misc/lkdtm.c:293:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/mfd/tps65217.c:173:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/mfd/arizona-core.c:509:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:410:21: warning: assignment makes pointer from integer without a cast [enabled by default]
1 /home/broonie/build/linux-stable/drivers/media/radio/radio-shark2.c:240:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/media/radio/radio-shark.c:274:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
1 /home/broonie/build/linux-stable/drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
1 /home/broonie/build/linux-stable/drivers/input/misc/xen-kbdfront.c:258:8: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
1 /home/broonie/build/linux-stable/drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
1 /home/broonie/build/linux-stable/drivers/infiniband/hw/cxgb4/mem.c:79:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/iio/adc/exynos_adc.c:112:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:81:12: warning: 'omap_hwspinlock_probe' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:145:12: warning: 'omap_hwspinlock_remove' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/hwmon/twl4030-madc-hwmon.c:99:12: warning: 'twl4030_madc_hwmon_probe' defined but not used [-Wunused-function]
1 /home/broonie/build/linux-stable/drivers/gpu/drm/radeon/ni_dpm.c:3448:31: warning: unused variable 'eg_pi' [-Wunused-variable]
1 /home/broonie/build/linux-stable/drivers/gpu/drm/radeon/cypress_dpm.c:302:31: warning: unused variable 'eg_pi' [-Wunused-variable]
1 /home/broonie/build/linux-stable/drivers/gpio/gpio-mcp23s08.c:643:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/dma/pl330.c:2317:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 /home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1693:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' [-Wformat=]
1 /home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1693:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat=]
1 /home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1041:4: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t' [-Wformat=]
1 /home/broonie/build/linux-stable/drivers/char/hw_random/via-rng.c:224:26: warning: 'via_rng_cpu_id' defined but not used [-Wunused-variable]
1 /home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2921:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2898:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2827:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 /home/broonie/build/linux-stable/drivers/base/topology.c:86:106: warning: unused variable 'cpu' [-Wunused-variable]
1 /home/broonie/build/linux-stable/drivers/base/topology.c:83:118: warning: unused variable 'cpu' [-Wunused-variable]
1 /home/broonie/build/linux-stable/arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Section Mismatch Summary: 1
1 WARNING: drivers/cpuidle/built-in.o(.data+0x938): Section mismatch in reference from the variable dbx500_cpuidle_plat_driver to the function .init.text:dbx500_cpuidle_probe()
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allnoconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
/home/broonie/build/linux-stable/drivers/base/topology.c:83:118: warning: unused variable 'cpu' [-Wunused-variable]
/home/broonie/build/linux-stable/drivers/base/topology.c:86:106: warning: unused variable 'cpu' [-Wunused-variable]
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 5 errors, 44 warnings, 1 section mismatches
Errors:
/home/broonie/build/linux-stable/drivers/hwmon/twl4030-madc-hwmon.c:123:1: error: expected identifier or '(' at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:158:2: error: expected declaration or statement at end of input
Warnings:
/home/broonie/build/linux-stable/arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2898:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2921:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/block/mtip32xx/mtip32xx.c:2827:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/hwmon/twl4030-madc-hwmon.c:99:12: warning: 'twl4030_madc_hwmon_probe' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:99:6: warning: unused variable 'ret' [-Wunused-variable]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: warning: no return statement in function returning non-void [-Wreturn-type]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:33:13: warning: 'pmbus_find_sensor_groups' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:96:12: warning: 'pmbus_identify' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:81:12: warning: 'omap_hwspinlock_probe' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/hwspinlock/omap_hwspinlock.c:145:12: warning: 'omap_hwspinlock_remove' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/gpu/drm/radeon/cypress_dpm.c:302:31: warning: unused variable 'eg_pi' [-Wunused-variable]
/home/broonie/build/linux-stable/drivers/gpu/drm/radeon/ni_dpm.c:3448:31: warning: unused variable 'eg_pi' [-Wunused-variable]
/home/broonie/build/linux-stable/net/sunrpc/xprtrdma/verbs.c:1774:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/infiniband/hw/cxgb4/mem.c:79:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
/home/broonie/build/linux-stable/drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
/home/broonie/build/linux-stable/drivers/misc/lkdtm.c:293:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/mtd/chips/cfi_cmdset_0020.c:654:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/mtd/nand/gpmi-nand/gpmi-nand.c:120:13: warning: 'set_geometry_by_ecc_info' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/pinctrl/pinctrl-bcm2835.c:1060:2: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]
/home/broonie/build/linux-stable/drivers/pinctrl/pinctrl-bcm2835.c:1043:3: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]
/home/broonie/build/linux-stable/drivers/net/ethernet/amd/nmclan_cs.c:625:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at /home/broonie/build/linux-stable/include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
/home/broonie/build/linux-stable/drivers/power/ab8500_charger.c:1390:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/home/broonie/build/linux-stable/drivers/power/ab8500_charger.c:1559:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/home/broonie/build/linux-stable/drivers/power/pm2301_charger.c:725:4: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
/home/broonie/build/linux-stable/drivers/net/ethernet/dec/tulip/winbond-840.c:911:2: warning: #warning Processor architecture undefined [-Wcpp]
/home/broonie/build/linux-stable/drivers/staging/dgap/dgap_driver.c:982:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/dgap/dgap_fep5.c:173:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/dgap/dgap_fep5.c:112:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/dgap/dgap_tty.c:664:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/dgnc/dgnc_tty.c:613:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/tty/serial/efm32-uart.c:834:123: warning: 'efm32_uart_exit' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:7901:5: warning: case value '257' not in enumerated type 'ahc_chip' [-Wswitch]
/home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:7898:5: warning: case value '513' not in enumerated type 'ahc_chip' [-Wswitch]
/home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:8517:5: warning: case value '257' not in enumerated type 'ahc_chip' [-Wswitch]
/home/broonie/build/linux-stable/drivers/scsi/aic7xxx_old.c:8510:5: warning: case value '513' not in enumerated type 'ahc_chip' [-Wswitch]
/home/broonie/build/linux-stable/drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
/home/broonie/build/linux-stable/drivers/staging/sm7xxfb/sm7xxfb.c:117:122: warning: 'sm7xx_vga_setup' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/staging/vt6655/device_main.c:3257:1: warning: the frame size of 1864 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/vt6655/iwctl.c:758:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/staging/wlan-ng/prism2fw.c:795:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/video/aty/radeon_pm.c:1718:13: warning: 'radeon_reinitialize_M10' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/video/omap2/displays-new/panel-sony-acx565akm.c:608:25: warning: unused variable 'ddata' [-Wunused-variable]
Section Mismatches:
WARNING: drivers/cpuidle/built-in.o(.data+0x938): Section mismatch in reference from the variable dbx500_cpuidle_plat_driver to the function .init.text:dbx500_cpuidle_probe()
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
/home/broonie/build/linux-stable/net/core/secure_seq.c:30:4: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/net/ethernet/smsc/smc91x.c:1899:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 8 errors, 41 warnings, 0 section mismatches
Errors:
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: error: expected declaration or statement at end of input
/home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:393:3: error: implicit declaration of function 'pci_free_consistent' [-Werror=implicit-function-declaration]
/home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:410:2: error: implicit declaration of function 'pci_alloc_consistent' [-Werror=implicit-function-declaration]
/home/broonie/build/linux-stable/drivers/parport/parport_pc.c:67:25: fatal error: asm/parport.h: No such file or directory
/home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:78: error: duplicate case value
/home/broonie/build/linux-stable/drivers/staging/lustre/lustre/llite/lloop.c:527:18: error: previously used here
Warnings:
/home/broonie/build/linux-stable/sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/sound/soc/fsl/imx-audmux.c:161:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1041:4: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t' [-Wformat=]
/home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1693:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat=]
/home/broonie/build/linux-stable/drivers/dma/amba-pl08x.c:1693:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' [-Wformat=]
/home/broonie/build/linux-stable/drivers/dma/pl330.c:2317:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/gpio/gpio-mcp23s08.c:643:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/net/core/secure_seq.c:30:4: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:99:6: warning: unused variable 'ret' [-Wunused-variable]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:115:4: warning: no return statement in function returning non-void [-Wreturn-type]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:33:13: warning: 'pmbus_find_sensor_groups' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/hwmon/pmbus/pmbus.c:96:12: warning: 'pmbus_identify' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/iio/adc/exynos_adc.c:112:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
/home/broonie/build/linux-stable/net/netfilter/nf_conntrack_core.c:674:3: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/input/misc/xen-kbdfront.c:258:8: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
/home/broonie/build/linux-stable/net/netfilter/xt_connlimit.c:234:4: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/media/radio/radio-shark.c:274:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/media/radio/radio-shark2.c:240:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/media/usb/b2c2/flexcop-usb.c:410:21: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/broonie/build/linux-stable/drivers/mfd/arizona-core.c:509:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/mfd/tps65217.c:173:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/net/ethernet/smsc/smc91x.c:1899:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
/home/broonie/build/linux-stable/drivers/net/xen-netback/interface.c:241:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
/home/broonie/build/linux-stable/drivers/regulator/tps62360-regulator.c:363:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/net/xen-netfront.c:1858:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
/home/broonie/build/linux-stable/drivers/spi/spi-atmel.c:1335:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/spi/spi-atmel.c:1460:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/spi/spi-gpio.c:252:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/broonie/build/linux-stable/drivers/spi/spi-pl022.c:1423:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
/home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1387:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1426:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/broonie/build/linux-stable/drivers/staging/bcm/CmHost.c:1440:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/broonie/build/linux-stable/drivers/net/wireless/cw1200/sta.c:142:4: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/net/wireless/cw1200/scan.c:330:4: warning: value computed is not used [-Wunused-value]
/home/broonie/build/linux-stable/drivers/video/xen-fbfront.c:589:8: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
/home/broonie/build/linux-stable/drivers/net/wireless/ti/wlcore/spi.c:317:1: warning: the frame size of 9728 bytes is larger than 2048 bytes [-Wframe-larger-than=]
/home/broonie/build/linux-stable/drivers/usb/storage/realtek_cr.c:629:12: warning: 'config_autodelink_before_power_down' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/usb/storage/realtek_cr.c:699:13: warning: 'fw5895_init' defined but not used [-Wunused-function]
/home/broonie/build/linux-stable/drivers/staging/rts5139/rts51x.c:204:13: warning: 'rts51x_try_to_enter_ss' defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
x86_64-defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
/home/broonie/build/linux-stable/drivers/char/hw_random/via-rng.c:224:26: warning: 'via_rng_cpu_id' defined but not used [-Wunused-variable]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-allnoconfig
arm-multi_v7_defconfig
Since commit caeb178c60f4 ("sched/fair: Make update_sd_pick_busiest() ...")
sd_pick_busiest returns a group that can be neither imbalanced nor overloaded
but is only more loaded than others. This change has been introduced to ensure
a better load balance in system that are not overloaded but as a side effect,
it can also generate useless active migration between groups.
Let take the example of 3 tasks on a quad cores system. We will always have an
idle core so the load balance will find a busiest group (core) whenever an ILB
is triggered and it will force an active migration (once above
nr_balance_failed threshold) so the idle core becomes busy but another core
will become idle. With the next ILB, the freshly idle core will try to pull the
task of a busy CPU.
The number of spurious active migration is not so huge in quad core system
because the ILB is not triggered so much. But it becomes significant as soon as
you have more than one sched_domain level like on a dual cluster of quad cores
where the ILB is triggered every tick when you have more than 1 busy_cpu
We need to ensure that the migration generate a real improveùent and will not
only move the avg_load imbalance on another CPU.
Before caeb178c60f4f93f1b45c0bc056b5cf6d217b67f, the filtering of such use
case was ensured by the following test in f_b_g
if ((local->idle_cpus < busiest->idle_cpus) &&
busiest->sum_nr_running <= busiest->group_weight)
This patch modified the condition to take into account situation where busiest
group is not overloaded: If the diff between the number of idle cpus in 2
groups is less than or equal to 1 and the busiest group is not overloaded,
moving a task will not improve the load balance but just move it.
A test with sysbench on a dual clusters of quad cores gives the following
results:
command: sysbench --test=cpu --num-threads=5 --max-time=5 run
The HZ is 200 which means that 1000 ticks has fired during the test.
-With Mainline, perf gives the following figures
Samples: 727 of event 'sched:sched_migrate_task'
Event count (approx.): 727
Overhead Command Shared Object Symbol
........ ............... ............. ..............
12.52% migration/1 [unknown] [.] 00000000
12.52% migration/5 [unknown] [.] 00000000
12.52% migration/7 [unknown] [.] 00000000
12.10% migration/6 [unknown] [.] 00000000
11.83% migration/0 [unknown] [.] 00000000
11.83% migration/3 [unknown] [.] 00000000
11.14% migration/4 [unknown] [.] 00000000
10.87% migration/2 [unknown] [.] 00000000
2.75% sysbench [unknown] [.] 00000000
0.83% swapper [unknown] [.] 00000000
0.55% ktps65090charge [unknown] [.] 00000000
0.41% mmcqd/1 [unknown] [.] 00000000
0.14% perf [unknown] [.] 00000000
-With this patch, perf gives the following figures
Samples: 20 of event 'sched:sched_migrate_task'
Event count (approx.): 20
Overhead Command Shared Object Symbol
........ ............... ............. ..............
80.00% sysbench [unknown] [.] 00000000
10.00% swapper [unknown] [.] 00000000
5.00% ktps65090charge [unknown] [.] 00000000
5.00% migration/1 [unknown] [.] 00000000
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
kernel/sched/fair.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2a1e6ac..adad532 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6425,13 +6425,14 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
if (env->idle == CPU_IDLE) {
/*
- * This cpu is idle. If the busiest group load doesn't
- * have more tasks than the number of available cpu's and
- * there is no imbalance between this and busiest group
- * wrt to idle cpu's, it is balanced.
+ * This cpu is idle. If the busiest group is not overloaded
+ * and there is no imbalance between this and busiest group
+ * wrt to idle cpus, it is balanced. The imbalance becomes
+ * significant if the diff is greater than 1 otherwise we
+ * might end up to just move the imbalance on another group
*/
- if ((local->idle_cpus < busiest->idle_cpus) &&
- busiest->sum_nr_running <= busiest->group_weight)
+ if ((local->idle_cpus <= (busiest->idle_cpus + 1)) &&
+ !(busiest->group_type == group_overloaded))
goto out_balanced;
} else {
/*
--
1.9.1
Tree/Branch: next-20141001
Git describe: next-20141001
Commit: 89533384e0 Add linux-next specific files for 20141001
Build Time: 58 min 0 sec
Passed: 6 / 8 ( 75.00 %)
Failed: 2 / 8 ( 25.00 %)
Errors: 1
Warnings: 30
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
arm-allmodconfig
Errors:
arm-allmodconfig
../drivers/vfio/pci/vfio_pci_intrs.c:562:3: error: implicit declaration of function 'irq_get_msi_desc' [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
2 warnings 0 mismatches : arm64-allnoconfig
12 warnings 0 mismatches : arm64-allmodconfig
6 warnings 0 mismatches : arm-multi_v7_defconfig
21 warnings 0 mismatches : arm-allmodconfig
3 warnings 0 mismatches : arm-allnoconfig
1 warnings 0 mismatches : x86_64-allnoconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 1
1 ../drivers/vfio/pci/vfio_pci_intrs.c:562:3: error: implicit declaration of function 'irq_get_msi_desc' [-Werror=implicit-function-declaration]
Warnings Summary: 30
6 ../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
6 ../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
4 <stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
3 warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)
2 ../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address'
2 ../drivers/pinctrl/nomadik/pinctrl-abx500.c:1177:11: warning: unused variable 'err' [-Wunused-variable]
1 arch/arm/configs/multi_v7_defconfig:443:warning: override: reassigning to symbol CPU_FREQ
1 ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../include/uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow]
1 ../include/linux/kernel.h:706:17: warning: comparison of distinct pointer types lacks a cast
1 ../fs/btrfs/extent_io.c:2166:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/vfio/pci/vfio_pci_intrs.c:562:3: warning: passing argument 1 of 'get_cached_msi_msg' makes pointer from integer without a cast
1 ../drivers/usb/renesas_usbhs/common.c:469:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/usb/gadget/udc/udc-xilinx.c:2135:191: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/staging/vt6655/device_main.c:2993:1: warning: the frame size of 1304 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/media/omap24xx/omap24xxcam-dma.c:478:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
1 ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=]
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]
1 ../arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c:193:7: warning: 'pci_dword' is used uninitialized in this function [-Wuninitialized]
1 ../arch/arm/mach-cns3xxx/pcie.c:313:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 0 errors, 12 warnings, 0 section mismatches
Warnings:
warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)
warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)
warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)
../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]
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../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]
../drivers/usb/gadget/udc/udc-xilinx.c:2135:191: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/usb/renesas_usbhs/common.c:469:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : PASS, 0 errors, 6 warnings, 0 section mismatches
Warnings:
arch/arm/configs/multi_v7_defconfig:443:warning: override: reassigning to symbol CPU_FREQ
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/pinctrl/nomadik/pinctrl-abx500.c:1177:11: warning: unused variable 'err' [-Wunused-variable]
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 1 errors, 21 warnings, 0 section mismatches
Errors:
../drivers/vfio/pci/vfio_pci_intrs.c:562:3: error: implicit declaration of function 'irq_get_msi_desc' [-Werror=implicit-function-declaration]
Warnings:
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
../arch/arm/mach-cns3xxx/pcie.c:313:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../fs/btrfs/extent_io.c:2166:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../include/linux/kernel.h:706:17: warning: comparison of distinct pointer types lacks a cast
../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address'
../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address'
../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/pinctrl/nomadik/pinctrl-abx500.c:1177:11: warning: unused variable 'err' [-Wunused-variable]
../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
../include/uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow]
../drivers/vfio/pci/vfio_pci_intrs.c:562:3: warning: passing argument 1 of 'get_cached_msi_msg' makes pointer from integer without a cast
../drivers/staging/media/omap24xx/omap24xxcam-dma.c:478:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../drivers/staging/vt6655/device_main.c:2993:1: warning: the frame size of 1304 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-allnoconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
-------------------------------------------------------------------------------
x86_64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c:193:7: warning: 'pci_dword' is used uninitialized in this function [-Wuninitialized]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-defconfig
Tree/Branch: master
Git describe: v3.17-rc7-6-gaad7fb9
Commit: aad7fb916a Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Build Time: 65 min 27 sec
Passed: 8 / 8 (100.00 %)
Failed: 0 / 8 ( 0.00 %)
Errors: 0
Warnings: 31
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
4 warnings 0 mismatches : x86_64-allnoconfig
18 warnings 0 mismatches : arm-allmodconfig
1 warnings 0 mismatches : arm-multi_v7_defconfig
7 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : x86_64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 31
2 ../arch/x86/vdso/vdso2c.h:118:6: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
1 ../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
1 ../drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/vt6655/device_main.c:3091:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/dgnc/dgnc_tty.c:572:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
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/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/platform/x86/eeepc-laptop.c:279:10: warning: 'value' may be used uninitialized in this function [-Wuninitialized]
1 ../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
1 ../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
1 ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
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]
1 ../arch/x86/kernel/cpu/perf_event_intel_uncore.c:1731:7: warning: 'pci_dword' is used uninitialized in this function [-Wuninitialized]
1 ../arch/x86/kernel/cpu/common.c:968:13: warning: 'syscall32_cpu_init' defined but not used [-Wunused-function]
1 ../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allnoconfig : PASS, 0 errors, 4 warnings, 0 section mismatches
Warnings:
../arch/x86/vdso/vdso2c.h:118:6: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../arch/x86/vdso/vdso2c.h:118:6: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
../arch/x86/kernel/cpu/common.c:968:13: warning: 'syscall32_cpu_init' defined but not used [-Wunused-function]
../arch/x86/kernel/cpu/perf_event_intel_uncore.c:1731:7: warning: 'pci_dword' is used uninitialized in this function [-Wuninitialized]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 18 warnings, 0 section mismatches
Warnings:
../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
../drivers/staging/dgnc/dgnc_tty.c:572:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/vt6655/device_main.c:3091:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 7 warnings, 0 section mismatches
Warnings:
../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]
-------------------------------------------------------------------------------
x86_64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
../drivers/platform/x86/eeepc-laptop.c:279:10: warning: 'value' may be used uninitialized in this function [-Wuninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-allnoconfig
arm64-defconfig