x86: reimplement ___preempt_schedule*() using THUNK helpers
Subsystems (3)
v3 cover x86: reimplement ___preempt_schedule*() using THUNK helpers
Peter, Ingo, please consider for inclusion.
Changes:
v3: added the acks from Andy, otherwise unchanged
v2: fix the naming in thunk_32.S (thanks Denys!)
And it seems that the patch below (on top of 1/2) also makes sense...
Oleg.
arch/x86/kernel/Makefile | 2 -- arch/x86/kernel/preempt.S | 25 ------------------------- arch/x86/lib/Makefile | 2 +- arch/x86/lib/thunk_32.S | 20 ++++++++++++++++---- arch/x86/lib/thunk_64.S | 7 +++++++ 5 files changed, 24 insertions(+), 32 deletions(-)
arch/x86/include/asm/irqflags.h +2 -11
@@ -166,8 +166,9 @@ static inline int arch_irqs_disabled(voi#else -#ifdef CONFIG_X86_64 #define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk + +#ifdef CONFIG_X86_64 #define ARCH_LOCKDEP_SYS_EXIT_IRQ \ TRACE_IRQS_ON; \ sti; \
@@ -176,17 +177,7 @@ static inline int arch_irqs_disabled(voiRESTORE_REST ; \ cli; \TRACE_IRQS_OFF ; -#else -#define ARCH_LOCKDEP_SYS_EXIT \ - pushl %eax; \ - pushl %ecx; \ - pushl %edx; \ - call lockdep_sys_exit; \ - popl %edx; \ - popl %ecx; \ - popl %eax; -#define ARCH_LOCKDEP_SYS_EXIT_IRQ #endif
arch/x86/lib/thunk_32.S +4 -0
@@ -33,6 +33,10 @@ THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1 #endif +#ifdef CONFIG_DEBUG_LOCK_ALLOC + THUNK lockdep_sys_exit_thunk,lockdep_sys_exit +#endif + #ifdef CONFIG_PREEMPT THUNK ___preempt_schedule, preempt_schedule #ifdef CONFIG_CONTEXT_TRACKING
PATCH v3 1/2 x86: reimplement ___preempt_schedule*() using THUNK helpers
___preempt_schedule() does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already have arch/x86/lib/thunk_*.S which implements the similar asm wrappers, so it makes sense to redefine ___preempt_schedule() as "THUNK ..." and remove preempt.S altogether.
--- arch/x86/kernel/Makefile | 2 -- arch/x86/kernel/preempt.S | 25 ------------------------- arch/x86/lib/thunk_32.S | 20 ++++++++++++++++---- arch/x86/lib/thunk_64.S | 7 +++++++ 4 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 arch/x86/kernel/preempt.S
arch/x86/kernel/Makefile +0 -2
@@ -39,8 +39,6 @@ obj-y += tsc.o tsc_msr.o io_delay.o rtc.o obj-y += pci-iommu_table.o obj-y += resource.o -obj-$(CONFIG_PREEMPT) += preempt.o - obj-y += process.o obj-y += i387.o xsave.o obj-y += ptrace.o
arch/x86/kernel/preempt.S deleted +0 -25
@@ -1,25 +0,0 @@ - -#include <linux/linkage.h> -#include <asm/dwarf2.h> -#include <asm/asm.h> -#include <asm/calling.h> - -ENTRY(___preempt_schedule) - CFI_STARTPROC - SAVE_ALL - call preempt_schedule - RESTORE_ALL - ret - CFI_ENDPROC - -#ifdef CONFIG_CONTEXT_TRACKING - -ENTRY(___preempt_schedule_context) - CFI_STARTPROC - SAVE_ALL - call preempt_schedule_context - RESTORE_ALL - ret - CFI_ENDPROC - -#endif
arch/x86/lib/thunk_32.S +16 -4
@@ -7,16 +7,19 @@ #include <linux/linkage.h> #include <asm/asm.h> -#ifdef CONFIG_TRACE_IRQFLAGS /* put return address in eax (arg1) */ - .macro thunk_ra name,func + .macro THUNK name, func, put_ret_addr_in_eax=0 .globl \name \name: pushl %eax pushl %ecx pushl %edx + + .if \put_ret_addr_in_eax /* Place EIP in the arg1 */ movl 3*4(%esp), %eax + .endif + call \func popl %edx popl %ecx
@@ -25,6 +28,15 @@ _ASM_NOKPROBE(\name) .endm - thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller - thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller +#ifdef CONFIG_TRACE_IRQFLAGS + THUNK trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1 + THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1 +#endif + +#ifdef CONFIG_PREEMPT + THUNK ___preempt_schedule, preempt_schedule +#ifdef CONFIG_CONTEXT_TRACKING + THUNK ___preempt_schedule_context, preempt_schedule_context #endif +#endif +
arch/x86/lib/thunk_64.S +7 -0
@@ -38,6 +38,13 @@ THUNK lockdep_sys_exit_thunk,lockdep_sys_exit #endif +#ifdef CONFIG_PREEMPT + THUNK ___preempt_schedule, preempt_schedule +#ifdef CONFIG_CONTEXT_TRACKING + THUNK ___preempt_schedule_context, preempt_schedule_context +#endif +#endif + /* SAVE_ARGS below is used only for the .cfi directives it contains. */ CFI_STARTPROC SAVE_ARGS
Signature · 1 line
1.5.5.1
PATCH v3 2/2 x86, lib/Makefile: remove the unnecessary "+= thunk_64.o"
In reply to Oleg NesterovTrivial. We have "lib-y += thunk_$(BITS).o" at the start, no need to add thunk_64.o if !CONFIG_X86_32.
--- arch/x86/lib/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/lib/Makefile +1 -1
@@ -39,7 +39,7 @@ endif else obj-y += iomap_copy_64.o lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o - lib-y += thunk_64.o clear_page_64.o copy_page_64.o + lib-y += clear_page_64.o copy_page_64.o lib-y += memmove_64.o memset_64.o lib-y += copy_user_64.o copy_user_nocache_64.o lib-y += cmpxchg16b_emu.o
Signature · 1 line
1.5.5.1
tip-bot for Oleg Nesterov
merge bot[tip:x86/asm] x86/lib/Makefile: Remove the unnecessary "+= thunk_64.o"
x86/lib/Makefile: Remove the unnecessary "+= thunk_64.o"
Commit-ID: 212be3b2320bcf33eff648bc4e1f0edbf4d90acf Gitweb: http://git.kernel.org/tip/212be3b2320bcf33eff648bc4e1f0edbf4d90acf Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:42:32 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:39 +0200
x86/lib/Makefile: Remove the unnecessary "+= thunk_64.o"
Trivial. We have "lib-y += thunk_$(BITS).o" at the start, no need to add thunk_64.o if !CONFIG_X86_32.
--- arch/x86/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/lib/Makefile +1 -1
@@ -39,7 +39,7 @@ endif else obj-y += iomap_copy_64.o lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o - lib-y += thunk_64.o clear_page_64.o copy_page_64.o + lib-y += clear_page_64.o copy_page_64.o lib-y += memmove_64.o memset_64.o lib-y += copy_user_64.o copy_user_nocache_64.o lib-y += cmpxchg16b_emu.o
tip-bot for Oleg Nesterov
merge bot[tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Oleg Nesterovx86: Speed up ___preempt_schedule*() by using THUNK helpers
Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:38 +0200
x86: Speed up ___preempt_schedule*() by using THUNK helpers
___preempt_schedule() does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already have arch/x86/lib/thunk_*.S which implements the similar asm wrappers, so it makes sense to redefine ___preempt_schedule() as "THUNK ..." and remove preempt.S altogether.
--- arch/x86/kernel/Makefile | 2 -- arch/x86/kernel/preempt.S | 25 ------------------------- arch/x86/lib/thunk_32.S | 20 ++++++++++++++++---- arch/x86/lib/thunk_64.S | 7 +++++++ 4 files changed, 23 insertions(+), 31 deletions(-)
arch/x86/kernel/Makefile +0 -2
@@ -39,8 +39,6 @@ obj-y += tsc.o tsc_msr.o io_delay.o rtc.o obj-y += pci-iommu_table.o obj-y += resource.o -obj-$(CONFIG_PREEMPT) += preempt.o - obj-y += process.o obj-y += i387.o xsave.o obj-y += ptrace.o
arch/x86/kernel/preempt.S deleted +0 -25
@@ -1,25 +0,0 @@ - -#include <linux/linkage.h> -#include <asm/dwarf2.h> -#include <asm/asm.h> -#include <asm/calling.h> - -ENTRY(___preempt_schedule) - CFI_STARTPROC - SAVE_ALL - call preempt_schedule - RESTORE_ALL - ret - CFI_ENDPROC - -#ifdef CONFIG_CONTEXT_TRACKING - -ENTRY(___preempt_schedule_context) - CFI_STARTPROC - SAVE_ALL - call preempt_schedule_context - RESTORE_ALL - ret - CFI_ENDPROC - -#endif
arch/x86/lib/thunk_32.S +16 -4
@@ -7,16 +7,19 @@ #include <linux/linkage.h> #include <asm/asm.h> -#ifdef CONFIG_TRACE_IRQFLAGS /* put return address in eax (arg1) */ - .macro thunk_ra name,func + .macro THUNK name, func, put_ret_addr_in_eax=0 .globl \name \name: pushl %eax pushl %ecx pushl %edx + + .if \put_ret_addr_in_eax /* Place EIP in the arg1 */ movl 3*4(%esp), %eax + .endif + call \func popl %edx popl %ecx
@@ -25,6 +28,15 @@ _ASM_NOKPROBE(\name) .endm - thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller - thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller +#ifdef CONFIG_TRACE_IRQFLAGS + THUNK trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1 + THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1 +#endif + +#ifdef CONFIG_PREEMPT + THUNK ___preempt_schedule, preempt_schedule +#ifdef CONFIG_CONTEXT_TRACKING + THUNK ___preempt_schedule_context, preempt_schedule_context #endif +#endif +
arch/x86/lib/thunk_64.S +7 -0
@@ -38,6 +38,13 @@ THUNK lockdep_sys_exit_thunk,lockdep_sys_exit #endif +#ifdef CONFIG_PREEMPT + THUNK ___preempt_schedule, preempt_schedule +#ifdef CONFIG_CONTEXT_TRACKING + THUNK ___preempt_schedule_context, preempt_schedule_context +#endif +#endif + /* SAVE_ARGS below is used only for the .cfi directives it contains. */ CFI_STARTPROC SAVE_ARGS
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
Quoted 16 lines · tip-bot for Oleg Nesterov
Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:38 +0200x86: Speed up ___preempt_schedule*() by using THUNK helpers
___preempt_schedule()does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already havearch/x86/lib/thunk_*.Swhich implements the similar asm wrappers, so it makes sense to redefine___preempt_schedule()as "THUNK ..." and removepreempt.Saltogether.
Quoted 8 lines
Signed-off-by Oleg Nesterov <[email protected]>Reviewed-by Andy Lutomirski <[email protected]>Cc Denys Vlasenko <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Linus Torvalds <[email protected]>Signed-off-by Ingo Molnar <[email protected]>---
Hi Oleg,
I *think* that this patch is causing the following trace (arch/x86/lib/thunk_64.S:44 is new code introduced by this patch):
[ 921.908530] kernel BUG at kernel/sched/core.c:2702! [ 921.909159] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 921.910084] Dumping ftrace buffer: [ 921.910626] (ftrace buffer empty) [ 921.911178] Modules linked in: [ 921.915690] CPU: 18 PID: 9489 Comm: trinity-c195 Not tainted 3.17.0-rc7-next-20141002-sasha-00031-gbdb4244 #1273 [ 921.917016] task: ffff8802bd748000 ti: ffff8802bda3c000 task.ti: ffff8802bda3c000 [ 921.917752] RIP: __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 921.917752] RSP: 0018:ffff8802bda3c360 EFLAGS: 00010297 [ 921.917752] RAX: ffff8802bda3c000 RBX: ffff8808501e2a00 RCX: 0000000000000001 [ 921.917752] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000286 [ 921.917752] RBP: ffff8802bda3c3c0 R08: 000000000001aa50 R09: 0000000000000000 [ 921.917752] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000012 [ 921.917752] R13: ffff8808501e2a00 R14: 0000000000000002 R15: ffff8802bda3c428 [ 921.917752] FS: 00007f5475cc2700(0000) GS:ffff880850000000(0000) knlGS:0000000000000000 [ 921.917752] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 921.917752] CR2: 00007f5475abe60c CR3: 00000002bebab000 CR4: 00000000000006a0 [ 921.917752] DR0: 00000000006f0000 DR1: 0000000000000000 DR2: 0000000000000000 [ 921.917752] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 [ 921.917752] Stack: [ 921.917752] 000000000001aa50 ffff8802bd748000 ffff8802bda3ffd8 00000000001e2a00 [ 921.917752] 00000000001e2a00 ffff8802bd748000 ffff8802bda3c3a0 00000000001e2a00 [ 921.917752] ffff8802bd748000 000000000001a9ea 0000000000000002 ffff8802bda3c428 [ 921.917752] Call Trace: [ 921.917752] schedule_user (kernel/sched/core.c:2894 include/linux/jump_label.h:114 include/linux/context_tracking_state.h:27 include/linux/context_tracking.h:20 kernel/sched/core.c:2909) [ 921.917752] int_careful (arch/x86/kernel/entry_64.S:560) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 921.917752] ? preempt_schedule (./arch/x86/include/asm/preempt.h:80 (discriminator 1) kernel/sched/core.c:2943 (discriminator 1)) [ 921.917752] ? preempt_schedule_context (./arch/x86/include/asm/preempt.h:75 kernel/context_tracking.c:143) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? __schedule (kernel/sched/core.c:2900) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? ftrace_ops_control_func (kernel/trace/ftrace.c:4780) [ 921.917752] ? ftrace_call (arch/x86/kernel/mcount_64.S:56) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:886) [ 921.917752] ? __this_cpu_preempt_check (lib/smp_processor_id.c:63) [ 921.917752] ? schedule_user (kernel/sched/core.c:2900) [ 921.917752] ? schedule_user (kernel/sched/core.c:2900) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 921.917752] Code: 48 c7 c2 50 2d 72 97 be 72 00 00 00 48 c7 c7 eb 26 73 97 c6 05 37 b3 ac 02 01 e8 d4 06 c6 fc e9 0d fb ff ff 0f 1f 80 00 00 00 00 <0f> 0b 66 0f 1f 44 00 00 48 8b 45 c8 48 8b 00 48 83 f8 40 0f 84 All code ======== 0: 48 c7 c2 50 2d 72 97 mov $0xffffffff97722d50,%rdx 7: be 72 00 00 00 mov $0x72,%esi c: 48 c7 c7 eb 26 73 97 mov $0xffffffff977326eb,%rdi 13: c6 05 37 b3 ac 02 01 movb $0x1,0x2acb337(%rip) # 0x2acb351 1a: e8 d4 06 c6 fc callq 0xfffffffffcc606f3 1f: e9 0d fb ff ff jmpq 0xfffffffffffffb31 24: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 2b:* 0f 0b ud2 <-- trapping instruction 2d: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 33: 48 8b 45 c8 mov -0x38(%rbp),%rax 37: 48 8b 00 mov (%rax),%rax 3a: 48 83 f8 40 cmp $0x40,%rax 3e: 0f .byte 0xf 3f: 84 00 test %al,(%rax)
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2 2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 8: 48 8b 45 c8 mov -0x38(%rbp),%rax c: 48 8b 00 mov (%rax),%rax f: 48 83 f8 40 cmp $0x40,%rax 13: 0f .byte 0xf 14: 84 00 test %al,(%rax) [ 921.917752] RIP __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 921.917752] RSP <ffff8802bda3c360> [ 922.457643] BUG: unable to handle kernel paging request at fffffffc310ead68 [ 922.458855] IP: cpuacct_charge (kernel/sched/cpuacct.c:247) [ 922.467627] PGD 17e23067 PUD 0 [ 922.467627] Thread overran stack, or stack corrupted [ 922.467627] Oops: 0000 [#2] PREEMPT SMP DEBUG_PAGEALLOC [ 922.467627] Dumping ftrace buffer: [ 922.467627] (ftrace buffer empty) [ 922.467627] Modules linked in: [ 922.467627] CPU: 18 PID: 9489 Comm: trinity-c195 Tainted: G D 3.17.0-rc7-next-20141002-sasha-00031-gbdb4244 #1273 [ 922.467627] task: ffff8802bd748000 ti: ffff8802bda3c000 task.ti: ffff8802bda3c000 [ 922.467627] RIP: cpuacct_charge (kernel/sched/cpuacct.c:247) [ 922.467627] RSP: 0018:ffff880850003d28 EFLAGS: 00010046 [ 922.467627] RAX: 000000000000f128 RBX: 00000000932539cd RCX: ffffffff932539cd [ 922.467627] RDX: ffffffff97ea5500 RSI: 0000000000000000 RDI: 0000000000000086 [ 922.467627] RBP: ffff880850003d58 R08: 0000000000000000 R09: 0000000000000001 [ 922.467627] R10: 0000000000000000 R11: 0000000000009a86 R12: 00000000128d0aa7 [ 922.467627] R13: ffff8802bd748000 R14: ffffffff98afaa40 R15: 0000000000000400 [ 922.467627] FS: 00007f5475cc2700(0000) GS:ffff880850000000(0000) knlGS:0000000000000000 [ 922.467627] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 922.467627] CR2: fffffffc310ead68 CR3: 00000002bebab000 CR4: 00000000000006a0 [ 922.467627] DR0: 00000000006f0000 DR1: 0000000000000000 DR2: 0000000000000000 [ 922.467627] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 [ 922.467627] Stack: [ 922.467627] ffffffff931bdb35 ffffffff931bdb35 ffff8802bd748068 ffff88084f106f90 [ 922.467627] 00000000128d0aa7 ffff8802bd748000 ffff880850003d98 ffffffff931a7b86 [ 922.467627] 000000000001aa9a ffff8802bd748068 ffff88084f106f90 0000000000000000 [ 922.467627] Call Trace: [ 922.467627] <IRQ> [ 922.467627] ? cpuacct_charge (kernel/sched/cpuacct.c:236) [ 922.467627] ? cpuacct_charge (kernel/sched/cpuacct.c:236) [ 922.467627] update_curr (kernel/sched/stats.h:259 kernel/sched/fair.c:723) [ 922.467627] task_tick_fair (kernel/sched/fair.c:2526 (discriminator 2) kernel/sched/fair.c:7512 (discriminator 2)) [ 922.467627] scheduler_tick (kernel/sched/core.c:2564) [ 922.467627] update_process_times (kernel/time/timer.c:1391) [ 922.467627] tick_sched_handle.isra.14 (kernel/time/tick-sched.c:152) [ 922.467627] tick_sched_timer (kernel/time/tick-sched.c:1117) [ 922.467627] __run_hrtimer (kernel/time/hrtimer.c:1218 (discriminator 3)) [ 922.467627] ? tick_sched_do_timer (kernel/time/tick-sched.c:1101) [ 922.467627] hrtimer_interrupt (kernel/time/hrtimer.c:1307) [ 922.467627] local_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:921) [ 922.467627] smp_apic_timer_interrupt (./arch/x86/include/asm/apic.h:660 arch/x86/kernel/apic/apic.c:945) [ 922.467627] apic_timer_interrupt (arch/x86/kernel/entry_64.S:999) [ 922.467627] <EOI> [ 922.467627] ? oops_end (./arch/x86/include/asm/paravirt.h:809 arch/x86/kernel/dumpstack.c:240) [ 922.467627] die (arch/x86/kernel/dumpstack.c:313) [ 922.467627] do_trap (arch/x86/kernel/traps.c:132 arch/x86/kernel/traps.c:178) [ 922.467627] do_error_trap (arch/x86/kernel/traps.c:216 include/linux/jump_label.h:114 include/linux/context_tracking_state.h:27 include/linux/context_tracking.h:45 arch/x86/kernel/traps.c:220) [ 922.467627] ? __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 922.467627] ? error_sti (arch/x86/kernel/entry_64.S:1398) [ 922.467627] ? __this_cpu_preempt_check (lib/smp_processor_id.c:63) [ 922.467627] do_invalid_op (arch/x86/kernel/traps.c:232) [ 922.467627] invalid_op (arch/x86/kernel/entry_64.S:1125) [ 922.467627] ? __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 922.467627] schedule_user (kernel/sched/core.c:2894 include/linux/jump_label.h:114 include/linux/context_tracking_state.h:27 include/linux/context_tracking.h:20 kernel/sched/core.c:2909) [ 922.467627] int_careful (arch/x86/kernel/entry_64.S:560) [ 922.467627] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 922.467627] ? preempt_schedule (./arch/x86/include/asm/preempt.h:80 (discriminator 1) kernel/sched/core.c:2943 (discriminator 1)) [ 922.467627] ? preempt_schedule_context (./arch/x86/include/asm/preempt.h:75 kernel/context_tracking.c:143) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 922.467627] ? __schedule (kernel/sched/core.c:2900) [ 922.467627] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 922.467627] ? ftrace_ops_control_func (kernel/trace/ftrace.c:4780) [ 922.467627] ? ftrace_call (arch/x86/kernel/mcount_64.S:56) [ 922.467627] ? retint_careful (arch/x86/kernel/entry_64.S:886) [ 922.467627] ? __this_cpu_preempt_check (lib/smp_processor_id.c:63) [ 922.467627] ? schedule_user (kernel/sched/core.c:2900) [ 922.467627] ? schedule_user (kernel/sched/core.c:2900) [ 922.467627] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 922.467627] Code: 00 00 00 4d 8b b5 e8 18 00 00 e8 b5 55 02 00 85 c0 74 09 80 3d e4 1c e7 05 00 74 68 49 8b 56 60 48 63 cb 90 48 8b 82 e0 00 00 00 <48> 03 04 cd 00 df e4 97 4c 01 20 48 8b 52 48 48 85 d2 75 e5 e8 All code ======== 0: 00 00 add %al,(%rax) 2: 00 4d 8b add %cl,-0x75(%rbp) 5: b5 e8 mov $0xe8,%ch 7: 18 00 sbb %al,(%rax) 9: 00 e8 add %ch,%al b: b5 55 mov $0x55,%ch d: 02 00 add (%rax),%al f: 85 c0 test %eax,%eax 11: 74 09 je 0x1c 13: 80 3d e4 1c e7 05 00 cmpb $0x0,0x5e71ce4(%rip) # 0x5e71cfe 1a: 74 68 je 0x84 1c: 49 8b 56 60 mov 0x60(%r14),%rdx 20: 48 63 cb movslq %ebx,%rcx 23: 90 nop 24: 48 8b 82 e0 00 00 00 mov 0xe0(%rdx),%rax 2b:* 48 03 04 cd 00 df e4 add -0x681b2100(,%rcx,8),%rax <-- trapping instruction 32: 97 33: 4c 01 20 add %r12,(%rax) 36: 48 8b 52 48 mov 0x48(%rdx),%rdx 3a: 48 85 d2 test %rdx,%rdx 3d: 75 e5 jne 0x24 3f: e8 .byte 0xe8 ...
Code starting with the faulting instruction
===========================================
0: 48 03 04 cd 00 df e4 add -0x681b2100(,%rcx,8),%rax
7: 97
8: 4c 01 20 add %r12,(%rax) b: 48 8b 52 48 mov 0x48(%rdx),%rdx f: 48 85 d2 test %rdx,%rdx 12: 75 e5 jne 0xfffffffffffffff9 14: e8 .byte 0xe8 ... [ 922.467627] RIP cpuacct_charge (kernel/sched/cpuacct.c:247) [ 922.467627] RSP <ffff880850003d28> [ 922.467627] CR2: fffffffc310ead68
Thanks,
Sasha
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
Quoted 63 lines · On Fri, 03 Oct 2014 00:50:13 -0400 Sasha Levin <[email protected]> wrote:
Quoted 16 lines · tip-bot for Oleg Nesterov
Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:38 +0200x86: Speed up ___preempt_schedule*() by using THUNK helpers
___preempt_schedule()does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already havearch/x86/lib/thunk_*.Swhich implements the similar asm wrappers, so it makes sense to redefine___preempt_schedule()as "THUNK ..." and removepreempt.Saltogether.Quoted 8 lines
Signed-off-by Oleg Nesterov <[email protected]>Reviewed-by Andy Lutomirski <[email protected]>Cc Denys Vlasenko <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Linus Torvalds <[email protected]>Signed-off-by Ingo Molnar <[email protected]>---
Hi Oleg,
I *think* that this patch is causing the following trace (
arch/x86/lib/thunk_64.S:44is new code introduced by this patch):[ 921.908530] kernel BUG at kernel/sched/core.c:2702! [ 921.909159] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 921.910084] Dumping ftrace buffer: [ 921.910626] (ftrace buffer empty) [ 921.911178] Modules linked in: [ 921.915690] CPU: 18 PID: 9489 Comm: trinity-c195 Not tainted 3.17.0-rc7-next-20141002-sasha-00031-gbdb4244 #1273 [ 921.917016] task: ffff8802bd748000 ti: ffff8802bda3c000 task.ti: ffff8802bda3c000 [ 921.917752] RIP: __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 921.917752] RSP: 0018:ffff8802bda3c360 EFLAGS: 00010297 [ 921.917752] RAX: ffff8802bda3c000 RBX: ffff8808501e2a00 RCX: 0000000000000001 [ 921.917752] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000286 [ 921.917752] RBP: ffff8802bda3c3c0 R08: 000000000001aa50 R09: 0000000000000000 [ 921.917752] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000012 [ 921.917752] R13: ffff8808501e2a00 R14: 0000000000000002 R15: ffff8802bda3c428 [ 921.917752] FS: 00007f5475cc2700(0000) GS:ffff880850000000(0000) knlGS:0000000000000000 [ 921.917752] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 921.917752] CR2: 00007f5475abe60c CR3: 00000002bebab000 CR4: 00000000000006a0 [ 921.917752] DR0: 00000000006f0000 DR1: 0000000000000000 DR2: 0000000000000000 [ 921.917752] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 [ 921.917752] Stack: [ 921.917752] 000000000001aa50 ffff8802bd748000 ffff8802bda3ffd8 00000000001e2a00 [ 921.917752] 00000000001e2a00 ffff8802bd748000 ffff8802bda3c3a0 00000000001e2a00 [ 921.917752] ffff8802bd748000 000000000001a9ea 0000000000000002 ffff8802bda3c428 [ 921.917752] Call Trace: [ 921.917752] schedule_user (kernel/sched/core.c:2894 include/linux/jump_label.h:114 include/linux/context_tracking_state.h:27 include/linux/context_tracking.h:20 kernel/sched/core.c:2909) [ 921.917752] int_careful (arch/x86/kernel/entry_64.S:560) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 921.917752] ? preempt_schedule (./arch/x86/include/asm/preempt.h:80 (discriminator 1) kernel/sched/core.c:2943 (discriminator 1)) [ 921.917752] ? preempt_schedule_context (./arch/x86/include/asm/preempt.h:75 kernel/context_tracking.c:143) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)
Quoted 8 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)
<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Without CONFIG_FRAME_POINTERS that night not be a problem...
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Sasha LevinHi Sasha,
Quoted 27 lines · Sasha Levin
Quoted 16 lines · tip-bot for Oleg Nesterov
Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:38 +0200x86: Speed up ___preempt_schedule*() by using THUNK helpers
___preempt_schedule()does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already havearch/x86/lib/thunk_*.Swhich implements the similar asm wrappers, so it makes sense to redefine___preempt_schedule()as "THUNK ..." and removepreempt.Saltogether.Quoted 8 lines
Signed-off-by Oleg Nesterov <[email protected]>Reviewed-by Andy Lutomirski <[email protected]>Cc Denys Vlasenko <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Linus Torvalds <[email protected]>Signed-off-by Ingo Molnar <[email protected]>---
Quoted 4 lines
Hi Oleg,
I *think* that this patch is causing the following trace (
arch/x86/lib/thunk_64.S:44is new code introduced by this patch):
Not sure, but I'm afraid your guess can be correct...
Quoted 1 line
[ 921.908530] kernel BUG at kernel/sched/core.c:2702!
OK, this is schedule_debug() -> BUG_ON(unlikely(task_stack_end_corrupted(prev))) in linux-next.
But at first glance this doesn't match the disassembled code... Could you send me (privately) your kernel/sched/core.c just in case? And .config please. And, if possible, kernel/sched/core.s
Oleg.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Oleg NesterovQuoted 18 lines · Oleg Nesterov
Quoted 17 lines · Chuck Ebbert
Quoted 11 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Quoted 7 lines
Quoted 1 line
Without
CONFIG_FRAME_POINTERSthat night not be a problem...Could you please spell?
I don't even understand "RBP isn't being saved", SAVE_CONTEXT/RESTORE_CONTEXT do push/pop %rbp?
Is this thing missing a flags or cc clobber:
# define __preempt_schedule() asm ("call ___preempt_schedule")Also, I'm at a loss as to wtf all this code is doing.
There's preempt_schedule, which appears to be a normal C function.
There's ___preempt_schedule, which is written in assembly and calls preempt_schedule.
Then there's __preempt_schedule, which is an inline assembler function that calls ___preempt_schedule.
Is this all just to make the call sequence for preempt_schedule shorter?
--Andy
Quoted 4 lines
Thanks,
Oleg.
Signature · 2 lines
Andy Lutomirski AMA Capital Management, LLC
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Oleg NesterovQuoted 18 lines · On Fri, 3 Oct 2014 23:41:24 +0200 Oleg Nesterov <[email protected]> wrote:
Quoted 17 lines · Chuck Ebbert
Quoted 11 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Quoted 7 lines
Quoted 1 line
Without
CONFIG_FRAME_POINTERSthat night not be a problem...Could you please spell?
I don't even understand "RBP isn't being saved", SAVE_CONTEXT/RESTORE_CONTEXT do push/pop %rbp?
SAVE_ARGS/RESTORE_ARGS, which is what THUNK uses, doesn't push/pop %rbp
Before, SAVE_ALL/RESTORE_ALL were being used around the call to preempt_schedule(). So from the symptoms I thought this was the problem.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
Quoted 25 lines · Chuck Ebbert
Quoted 22 lines · On Fri, 3 Oct 2014 23:41:24 +0200 Oleg Nesterov <[email protected]> wrote:
Quoted 12 lines · Chuck Ebbert
Quoted 11 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)Quoted 6 lines
<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Without
CONFIG_FRAME_POINTERSthat night not be a problem...Could you please spell?
Quoted 8 lines
Quoted 3 lines
I don't even understand "RBP isn't being saved", SAVE_CONTEXT/RESTORE_CONTEXT do push/pop %rbp?
SAVE_ARGS/RESTORE_ARGS, which is what THUNK uses, doesn't push/pop %rbp
Before, SAVE_ALL/RESTORE_ALL were being used around the call to
preempt_schedule(). So from the symptoms I thought this was the problem.
rbp is callee-saved no matter what, unless my memory of the ABI is *waaaaay* off.
--Andy
H. Peter Anvin
reviewerRe: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
Yes, it is.
Quoted 53 lines · Andy Lutomirski
Quoted 6 lines · Chuck Ebbert
Quoted 3 lines · On Fri, 3 Oct 2014 23:41:24 +0200 Oleg Nesterov <[email protected]> wrote:
Quoted 2 lines · Chuck Ebbert
Quoted 2 lines
[ 921.917752] ? ___preempt_schedule_context(
arch/x86/lib/thunk_64.S:44)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? preempt_schedule_context(
kernel/context_tracking.c:145)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? ___preempt_schedule_context(
arch/x86/lib/thunk_64.S:44)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? preempt_schedule_context(
kernel/context_tracking.c:145)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? ___preempt_schedule_context(
arch/x86/lib/thunk_64.S:44)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? preempt_schedule_context(
kernel/context_tracking.c:145)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? ___preempt_schedule_context(
arch/x86/lib/thunk_64.S:44)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? preempt_schedule_context(
kernel/context_tracking.c:145)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? ___preempt_schedule_context(
arch/x86/lib/thunk_64.S:44)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ 921.917752] ? preempt_schedule_context(
kernel/context_tracking.c:145)Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Without
CONFIG_FRAME_POINTERSthat night not be a problem...Could you please spell?
I don't even understand "RBP isn't being saved",
SAVE_CONTEXT/RESTORE_CONTEXT
Quoted 4 lines
Quoted 2 lines
do push/pop %rbp?
SAVE_ARGS/RESTORE_ARGS, which is what THUNK uses, doesn't push/pop
%rbp
Quoted 3 lines
Before, SAVE_ALL/RESTORE_ALL were being used around the call to
preempt_schedule(). So from the symptoms I thought this was theproblem.
rbp is callee-saved no matter what, unless my memory of the ABI is *waaaaay* off.
--Andy
Signature · 1 line
Sent from my mobile phone. Please pardon brevity and lack of formatting.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Sasha LevinQuoted 27 lines · Sasha Levin
Quoted 16 lines · tip-bot for Oleg Nesterov
Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Sep 2014 15:15:38 +0200x86: Speed up ___preempt_schedule*() by using THUNK helpers
___preempt_schedule()does SAVE_ALL/RESTORE_ALL but this is suboptimal, we do not need to save/restore the callee-saved register. And we already havearch/x86/lib/thunk_*.Swhich implements the similar asm wrappers, so it makes sense to redefine___preempt_schedule()as "THUNK ..." and removepreempt.Saltogether.Quoted 8 lines
Signed-off-by Oleg Nesterov <[email protected]>Reviewed-by Andy Lutomirski <[email protected]>Cc Denys Vlasenko <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Linus Torvalds <[email protected]>Signed-off-by Ingo Molnar <[email protected]>---
Quoted 4 lines
Hi Oleg,
I *think* that this patch is causing the following trace (
arch/x86/lib/thunk_64.S:44is new code introduced by this patch):
So far I still do not think (at least I do not understand how) this patch could introduce the problem. I can be wrong of course...
Let's look at this trace again,
Quoted 1 line
[ 921.908530] kernel BUG at kernel/sched/core.c:2702!
OK, let's assume this is BUG_ON(unlikely(task_stack_end_corrupted(prev))) in schedule_debug().
Quoted 27 lines
[ 921.909159] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 921.910084] Dumping ftrace buffer: [ 921.910626] (ftrace buffer empty) [ 921.911178] Modules linked in: [ 921.915690] CPU: 18 PID: 9489 Comm: trinity-c195 Not tainted 3.17.0-rc7-next-20141002-sasha-00031-gbdb4244 #1273 [ 921.917016] task: ffff8802bd748000 ti: ffff8802bda3c000 task.ti: ffff8802bda3c000 [ 921.917752] RIP: __schedule (kernel/sched/core.c:2702 kernel/sched/core.c:2808) [ 921.917752] RSP: 0018:ffff8802bda3c360 EFLAGS: 00010297 [ 921.917752] RAX: ffff8802bda3c000 RBX: ffff8808501e2a00 RCX: 0000000000000001 [ 921.917752] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000286 [ 921.917752] RBP: ffff8802bda3c3c0 R08: 000000000001aa50 R09: 0000000000000000 [ 921.917752] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000012 [ 921.917752] R13: ffff8808501e2a00 R14: 0000000000000002 R15: ffff8802bda3c428 [ 921.917752] FS: 00007f5475cc2700(0000) GS:ffff880850000000(0000) knlGS:0000000000000000 [ 921.917752] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 921.917752] CR2: 00007f5475abe60c CR3: 00000002bebab000 CR4: 00000000000006a0 [ 921.917752] DR0: 00000000006f0000 DR1: 0000000000000000 DR2: 0000000000000000 [ 921.917752] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 [ 921.917752] Stack: [ 921.917752] 000000000001aa50 ffff8802bd748000 ffff8802bda3ffd8 00000000001e2a00 [ 921.917752] 00000000001e2a00 ffff8802bd748000 ffff8802bda3c3a0 00000000001e2a00 [ 921.917752] ffff8802bd748000 000000000001a9ea 0000000000000002 ffff8802bda3c428 [ 921.917752] Call Trace: [ 921.917752] schedule_user (kernel/sched/core.c:2894 include/linux/jump_label.h:114 include/linux/context_tracking_state.h:27 include/linux/context_tracking.h:20 kernel/sched/core.c:2909) [ 921.917752] int_careful (arch/x86/kernel/entry_64.S:560) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:889) [ 921.917752] ? preempt_schedule (./arch/x86/include/asm/preempt.h:80 (discriminator 1) kernel/sched/core.c:2943 (discriminator 1))
...
Quoted 8 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)
...
A lOT of repeats of above, so we can run out of stack and in this case task_stack_end_corrupted() is clear.
Quoted 9 lines
[ 921.917752] ? __schedule (kernel/sched/core.c:2900) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? ftrace_ops_control_func (kernel/trace/ftrace.c:4780) [ 921.917752] ? ftrace_call (arch/x86/kernel/mcount_64.S:56) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:886) [ 921.917752] ? __this_cpu_preempt_check (lib/smp_processor_id.c:63) [ 921.917752] ? schedule_user (kernel/sched/core.c:2900) [ 921.917752] ? schedule_user (kernel/sched/core.c:2900) [ 921.917752] ? retint_careful (arch/x86/kernel/entry_64.S:889)
And I _think_ that preempt_schedule_context() should be fixed anyway, although I am not sure there is no something else. It does:
preempt_disable_notrace(); prev_ctx = exception_enter(); preempt_enable_no_resched_notrace(); preempt_schedule(); preempt_disable_notrace(); exception_exit(prev_ctx); preempt_enable_notrace();
but exception_exit() is heavy, it is quite possible that TIF_NEED_RESCHED and thus set_preempt_need_resched() can be set again when we call preempt_enable_notrace(). And in this case preempt_schedule_context() will be called recursively.
Frederic, how about the patch below?
In _theory_ this can explain this OOPS unless I am totally confused.
Oleg.
kernel/context_tracking.c +11 -9
@@ -134,15 +134,17 @@ asmlinkage __visible void __sched notrac* and the tracer calls preempt_enable_notrace() causing * an infinite recursion. */ -preempt_disable_notrace (); - prev_ctx =exception_enter (); -preempt_enable_no_resched_notrace (); - -preempt_schedule (); - -preempt_disable_notrace (); -exception_exit (prev_ctx); - preempt_enable_notrace(); +do { +preempt_disable_notrace (); + prev_ctx =exception_enter (); +preempt_enable_no_resched_notrace (); + +preempt_schedule (); + +preempt_disable_notrace (); +exception_exit (prev_ctx); +preempt_enable_no_resched_notrace (); + } while (need_resched()); }EXPORT_SYMBOL_GPL (preempt_schedule_context);#endif /* CONFIG_PREEMPT */
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Chuck EbbertQuoted 26 lines · Chuck Ebbert
Quoted 22 lines · On Fri, 3 Oct 2014 23:41:24 +0200 Oleg Nesterov <[email protected]> wrote:
Quoted 12 lines · Chuck Ebbert
Quoted 11 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)Quoted 6 lines
<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Without
CONFIG_FRAME_POINTERSthat night not be a problem...Could you please spell?
Quoted 8 lines
Quoted 3 lines
I don't even understand "RBP isn't being saved", SAVE_CONTEXT/RESTORE_CONTEXT do push/pop %rbp?
SAVE_ARGS/RESTORE_ARGS, which is what THUNK uses, doesn't push/pop %rbp
Before, SAVE_ALL/RESTORE_ALL were being used around the call to
preempt_schedule(). So from the symptoms I thought this was the problem.
Ah, thanks, now I understand what you meant. I thought you meant switch_to().
Yes, I thought about this difference too, but so far I fail to understand how this can make a difference, according to calling.h it is callee-saved.
Oleg.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Andy LutomirskiQuoted 4 lines · Andy Lutomirski
Is this thing missing a flags or cc clobber:
# define __preempt_schedule() asm ("call ___preempt_schedule")
Yes, it should probably have a cc clobber. Although I think thet gcc actually assumes all asms clobber flags on x86, so it shouldn't matter.
Quoted 1 line
Is this all just to make the call sequence for
preempt_scheduleshorter?
Not so much the call sequence, but the code around the call - not havign to spill live registers etc. But yes.
Linus
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Andy LutomirskiQuoted 4 lines · Andy Lutomirski
Is this thing missing a flags or cc clobber:
# define __preempt_schedule() asm ("call ___preempt_schedule")
Well, calling.h says "rflags is clobbered", so probably yes?
Quoted 11 lines
Also, I'm at a loss as to wtf all this code is doing.
There's
preempt_schedule, which appears to be a normal C function.There's
___preempt_schedule, which is written in assembly and callspreempt_schedule.Then there's
__preempt_schedule, which is an inline assembler function that calls___preempt_schedule.Is this all just to make the call sequence for
preempt_scheduleshorter?
Yes, please look at 1a338ac32ca630f67df25b4a16436cccc314e997
sched, x86: Optimize the preempt_schedule() call
Remove the bloat of the C calling convention out of the preempt_enable() sites by creating an ASM wrapper which allows us to do an asm("call ___preempt_schedule") instead.
Oleg.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Oleg NesterovQuoted 15 lines · Oleg Nesterov
And I _think_ that
preempt_schedule_context()should be fixed anyway, although I am not sure there is no something else. It does:preempt_disable_notrace(); prev_ctx = exception_enter(); preempt_enable_no_resched_notrace(); preempt_schedule(); preempt_disable_notrace(); exception_exit(prev_ctx); preempt_enable_notrace();
Quoted 4 lines
but
exception_exit()is heavy, it is quite possible thatTIF_NEED_RESCHEDand thusset_preempt_need_resched()can be set again when we callpreempt_enable_notrace(). And in this casepreempt_schedule_context()will be called recursively.
Why the hell is it using "preempt_enable_notrace()" in the first place? Shouldn't it use "preempt_enable_no_resched_notrace()", since we do *not* want it to schedule, since the whole *point* is that any scheduling should be called within "exception" context.
Quoted 1 line
Frederic, how about the patch below?
Why do it multiple times? The whole concept is fundamentally racy anyway, in it doesn't guarantee that any *new* "need_resched()" would be reacted to (since they could happen *after* the test), so there's no point in trying to fix the "race", since it always remains at the last iteration anyway. So adding the loop looks like just voodoo programming, not actually fixing anything.
The real fix would appear to be to use "preempt_enable_no_resched_notrace()", which your patch did, but without the loop.
Yes?
Linus
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
Quoted 4 lines · Linus Torvalds
The real fix would appear to be to use "
preempt_enable_no_resched_notrace()", which your patch did, but without the loop.
Actually, the real fix would be to not be stupid, and just make the code do something like
Quoted 10 lines
if (likely(!preemptible()))
return;
__preempt_count_add(PREEMPT_ACTIVE);
prev_ctx = exception_enter();
__schedule();
exception_exit(prev_ctx);
__preempt_count_sub(PREEMPT_ACTIVE);and *not* enable preemption around the scheduling at all. The whole enable and then re-disable seems entirely broken, and comes from the code using "preempt_schedule()" which doesn't work while preemption is disabled. So don't do that then.
No?
Linus
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Chuck EbbertQuoted 12 lines · Chuck Ebbert
Quoted 11 lines
[ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145) [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) [ 921.917752] ? preempt_schedule_context (kernel/context_tracking.c:145)
Quoted 6 lines
<snip lots of repeats of this>
I *think* this is because RBP isn't being saved across task switch anymore?
Without
CONFIG_FRAME_POINTERSthat night not be a problem...
Could you please spell?
I don't even understand "RBP isn't being saved", SAVE_CONTEXT/RESTORE_CONTEXT do push/pop %rbp?
Thanks,
Oleg.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Linus TorvaldsQuoted 17 lines · Linus Torvalds
Quoted 15 lines · Oleg Nesterov
And I _think_ that
preempt_schedule_context()should be fixed anyway, although I am not sure there is no something else. It does:preempt_disable_notrace(); prev_ctx = exception_enter(); preempt_enable_no_resched_notrace(); preempt_schedule(); preempt_disable_notrace(); exception_exit(prev_ctx); preempt_enable_notrace();
Quoted 7 lines
Quoted 4 lines
but
exception_exit()is heavy, it is quite possible thatTIF_NEED_RESCHEDand thusset_preempt_need_resched()can be set again when we callpreempt_enable_notrace(). And in this casepreempt_schedule_context()will be called recursively.Why the hell is it using "
preempt_enable_notrace()" in the first place? Shouldn't it use "preempt_enable_no_resched_notrace()",
Yes, this this is the main problem.
Quoted 5 lines
Quoted 1 line
Frederic, how about the patch below?
Why do it multiple times? The whole concept is fundamentally racy anyway, in it doesn't guarantee that any *new* "
need_resched()" would be reacted to (since they could happen *after* the test),
But in this case we rely on scheduler_ipi() and return-from-irq path?
Quoted 3 lines
The real fix would appear to be to use "
preempt_enable_no_resched_notrace()", which your patch did, but without the loop.
Not sure... preempt_schedule() does the same and afaics for good reason.
But perhaps you are right. I am already sleeping, will try to recheck tomorrow. And in fact I got lost in preempt.h files... I can't even understand why __preempt_schedule_context() is only called by preempt_enable_notrace().
Oleg.
Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers
In reply to Linus TorvaldsQuoted 19 lines · Linus Torvalds
Quoted 4 lines · Linus Torvalds
The real fix would appear to be to use "
preempt_enable_no_resched_notrace()", which your patch did, but without the loop.Actually, the real fix would be to not be stupid, and just make the code do something like
Quoted 8 lines
if (likely(!preemptible())) return; __preempt_count_add(PREEMPT_ACTIVE); prev_ctx = exception_enter(); __schedule();
Quoted 7 lines
Quoted 2 lines
exception_exit(prev_ctx); __preempt_count_sub(PREEMPT_ACTIVE);and *not* enable preemption around the scheduling at all. The whole enable and then re-disable seems entirely broken, and comes from the code using "
preempt_schedule()" which doesn't work while preemption is disabled. So don't do that then.
Again, it is too late for me... Most probably I am wrong, but somehow it seems to me that the real fix should try to kill preempt_schedule_context() altogether and teach preempt_schedule() to play well with CONTEXT_TRACKING.
Oleg.
cover stop the unbound recursion in preempt_schedule_context()
Quoted 19 lines · Oleg Nesterov
Quoted 17 lines · Linus Torvalds
Quoted 4 lines · Linus Torvalds
The real fix would appear to be to use "
preempt_enable_no_resched_notrace()", which your patch did, but without the loop.Actually, the real fix would be to not be stupid, and just make the code do something like
Quoted 6 lines
if (likely(!preemptible())) return; __preempt_count_add(PREEMPT_ACTIVE); prev_ctx = exception_enter();
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
__schedule(); exception_exit(prev_ctx); __preempt_count_sub(PREEMPT_ACTIVE);and *not* enable preemption around the scheduling at all.
Yes, I think you are right. And I hate to admit that I didn't think about this simplification. The only complication is that we should move this function from context_tracking.c to sched/core.c.
However, I still think we need the need_resched() loop, we can't do this only once.
And in fact the simplest fix could just turn it into
local_irq_disable(); preempt_schedule_irq(); local_irq_enable();
Quoted 3 lines
Again, it is too late for me... Most probably I am wrong, but somehow it seems to me that the real fix should try to kill
preempt_schedule_context()altogether and teachpreempt_schedule()to play well withCONTEXT_TRACKING.
Yes, the very fact that
preempt_enable() != trace_preempt_on() + preempt_enable_notrace()
looks simply wrong imo. And preempt_enable_notrace() has users outside of the tracing code which can run in IN_USER state. For example, why should __perf_sw_event() worry about context_tracking.state?
OTOH, if the caller of preempt_enable_notrace() actually needs to take care of potential IN_USER state, then it probably has other problems. And indeed, ftrace_ops_control_func() has to check rcu_is_watching() anyway.
IOW, imho 29bb9e5a75 "tracing/context-tracking: Add preempt_schedule_context() for tracing" was not a right solution. Perhaps the tracing functions can be changed to switch to IN_KERNEL mode, or at least perhaps we can add the special preempt_disable_ftrace() helper. But this needs another discussion.
Either way, I do think that preempt_schedule_context() in its current form must die.
Oleg.
PATCH 1/1 stop the unbound recursion in preempt_schedule_context()
preempt_schedule_context() does preempt_enable_notrace() at the end and this can call the same function again; exception_exit() is heavy and it is quite possible that need-resched is true again.
1. Change this code to dec preempt_count() and check need_resched() by hand.
2. As Linus suggested, we can use the PREEMPT_ACTIVE bit and avoid the enable/disable dance around __schedule(). But in this case we need to move into sched/core.c.
3. Cosmetic, but x86 forgets to declare this function. This doesn't really matter because it is only called by asm helpers, still it make sense to add the declaration into asm/preempt.h to match preempt_schedule().
--- arch/x86/include/asm/preempt.h | 1 + kernel/context_tracking.c | 40 --------------------------------------- kernel/sched/core.c | 41 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 40 deletions(-)
arch/x86/include/asm/preempt.h +1 -0
@@ -105,6 +105,7 @@ static __always_inline bool should_resched(void)# ifdef CONFIG_CONTEXT_TRACKING extern asmlinkage void ___preempt_schedule_context(void);# define __preempt_schedule_context () asm ("call ___preempt_schedule_context") + extern asmlinkage void preempt_schedule_context(void);# endif #endif
kernel/context_tracking.c +0 -40
@@ -107,46 +107,6 @@ void context_tracking_user_enter(void) }NOKPROBE_SYMBOL (context_tracking_user_enter); -#ifdef CONFIG_PREEMPT -/** -* preempt_schedule_context - preempt_schedule called by tracing -* -* The tracing infrastructure uses preempt_enable_notrace to prevent -* recursion and tracing preempt enabling caused by the tracing -* infrastructure itself. But as tracing can happen in areas coming -* from userspace or just about to enter userspace, a preempt enable -* can occur before user_exit() is called. This will cause the scheduler -* to be called when the system is still in usermode. -* -* To prevent this, the preempt_enable_notrace will use this function -* instead of preempt_schedule() to exit user context if needed before -* calling the scheduler. -*/ -asmlinkage __visible void __sched notrace preempt_schedule_context(void) -{ -enum ctx_state prev_ctx; - -if (likely (!preemptible ())) -return ; - -/* -* Need to disable preemption in case user_exit() is traced -* and the tracer calls preempt_enable_notrace() causing -* an infinite recursion. -*/ -preempt_disable_notrace (); - prev_ctx =exception_enter (); -preempt_enable_no_resched_notrace (); - -preempt_schedule (); - -preempt_disable_notrace (); -exception_exit (prev_ctx); -preempt_enable_notrace (); -} -EXPORT_SYMBOL_GPL (preempt_schedule_context); -#endif /* CONFIG_PREEMPT */ -/** * context_tracking_user_exit - Inform the context tracking that the CPU is * exiting userspace mode and entering the kernel.
kernel/sched/core.c +41 -0
47 lines not on this page · raw message
Signature · 1 line
1.5.5.1
Re: [PATCH 0/1] stop the unbound recursion in preempt_schedule_context()
In reply to Oleg NesterovAnd, Frederic, this is off-topic but I am just curious...
I can't understand why exception_enter() calls context_tracking_user_exit() unconditionally (unlike exception_exit), and why enter/exit need to check context_tracking.state with irqs disabled.
IOW, any reason why the patch below is wrong?
Of course, context_tracking is per-cpu, so
if (context_tracking_in_user()) {
local_irq_save(flags);
...can be preempted and change the state on another CPU. But this should be fine because the task must see the same .state on all CPU's or the whole preempt context-tracking logic is broken?
Oleg.
include/linux/context_tracking.h +7 -8
@@ -29,15 +29,14 @@ static inline void user_exit(void)static inline enum ctx_state exception_enter (void ) { -enum ctx_state prev_ctx; - -if (!context_tracking_is_enabled ()) -return 0 ; - - prev_ctx =this_cpu_read (context_tracking.state); -context_tracking_user_exit (); +if (context_tracking_is_enabled ()) { +if (context_tracking_in_user ()) { +context_tracking_user_exit (); +return IN_USER ; + } + } -return prev_ctx; +return IN_KERNEL ; }static inline void exception_exit (enum ctx_state prev_ctx)
kernel/context_tracking.c +6 -6
@@ -74,8 +74,8 @@ void context_tracking_user_enter(void)/* Kernel threads aren't supposed to go to userspace */ WARN_ON_ONCE (!current->mm); -local_irq_save (flags); -if (__this_cpu_read (context_tracking.state) !=IN_USER ) { +if (!context_tracking_in_user ()) { +local_irq_save (flags);if (__this_cpu_read (context_tracking.active)) {trace_user_enter (0 );/*
@@ -102,8 +102,8 @@ void context_tracking_user_enter(void)* is false because we know that CPU is not tickless. */ __this_cpu_write (context_tracking.state,IN_USER ); +local_irq_restore (flags); } -local_irq_restore (flags); }NOKPROBE_SYMBOL (context_tracking_user_enter);
@@ -128,8 +128,8 @@ void context_tracking_user_exit(void)if (in_interrupt ())return ; -local_irq_save (flags); -if (__this_cpu_read (context_tracking.state) ==IN_USER ) { +if (context_tracking_in_user ()) { +local_irq_save (flags);if (__this_cpu_read (context_tracking.active)) {/* * We are going to run code that may use RCU. Inform
@@ -140,8 +140,8 @@ void context_tracking_user_exit(void)trace_user_exit (0 ); }__this_cpu_write (context_tracking.state,IN_KERNEL ); +local_irq_restore (flags); } -local_irq_restore (flags); }NOKPROBE_SYMBOL (context_tracking_user_exit);
tip-bot for Oleg Nesterov
merge bot[tip:sched/core] sched: stop the unbound recursion in preempt_schedule_context()
In reply to Oleg Nesterovsched: stop the unbound recursion in preempt_schedule_context()
Commit-ID: 009f60e2763568cdcd75bd1cf360c7c7165e2e60 Gitweb: http://git.kernel.org/tip/009f60e2763568cdcd75bd1cf360c7c7165e2e60 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 5 Oct 2014 22:23:22 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 28 Oct 2014 10:46:05 +0100
sched: stop the unbound recursion in preempt_schedule_context()
preempt_schedule_context() does preempt_enable_notrace() at the end and this can call the same function again; exception_exit() is heavy and it is quite possible that need-resched is true again.
1. Change this code to dec preempt_count() and check need_resched() by hand.
2. As Linus suggested, we can use the PREEMPT_ACTIVE bit and avoid the enable/disable dance around __schedule(). But in this case we need to move into sched/core.c.
3. Cosmetic, but x86 forgets to declare this function. This doesn't really matter because it is only called by asm helpers, still it make sense to add the declaration into asm/preempt.h to match preempt_schedule().
--- arch/x86/include/asm/preempt.h | 1 + kernel/context_tracking.c | 40 ---------------------------------------- kernel/sched/core.c | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 40 deletions(-)
arch/x86/include/asm/preempt.h +1 -0
@@ -105,6 +105,7 @@ static __always_inline bool should_resched(void)# ifdef CONFIG_CONTEXT_TRACKING extern asmlinkage void ___preempt_schedule_context(void);# define __preempt_schedule_context () asm ("call ___preempt_schedule_context") + extern asmlinkage void preempt_schedule_context(void);# endif #endif
kernel/context_tracking.c +0 -40
@@ -107,46 +107,6 @@ void context_tracking_user_enter(void) }NOKPROBE_SYMBOL (context_tracking_user_enter); -#ifdef CONFIG_PREEMPT -/** -* preempt_schedule_context - preempt_schedule called by tracing -* -* The tracing infrastructure uses preempt_enable_notrace to prevent -* recursion and tracing preempt enabling caused by the tracing -* infrastructure itself. But as tracing can happen in areas coming -* from userspace or just about to enter userspace, a preempt enable -* can occur before user_exit() is called. This will cause the scheduler -* to be called when the system is still in usermode. -* -* To prevent this, the preempt_enable_notrace will use this function -* instead of preempt_schedule() to exit user context if needed before -* calling the scheduler. -*/ -asmlinkage __visible void __sched notrace preempt_schedule_context(void) -{ -enum ctx_state prev_ctx; - -if (likely (!preemptible ())) -return ; - -/* -* Need to disable preemption in case user_exit() is traced -* and the tracer calls preempt_enable_notrace() causing -* an infinite recursion. -*/ -preempt_disable_notrace (); - prev_ctx =exception_enter (); -preempt_enable_no_resched_notrace (); - -preempt_schedule (); - -preempt_disable_notrace (); -exception_exit (prev_ctx); -preempt_enable_notrace (); -} -EXPORT_SYMBOL_GPL (preempt_schedule_context); -#endif /* CONFIG_PREEMPT */ -/** * context_tracking_user_exit - Inform the context tracking that the CPU is * exiting userspace mode and entering the kernel.
kernel/sched/core.c +41 -0
47 lines not on this page · raw message