Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Linus Torvalds wrote: > > On Fri, Oct 3, 2014 at 5:01 PM, Linus Torvalds > wrote: > > > > 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

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Linus Torvalds wrote: > > On Fri, Oct 3, 2014 at 4:26 PM, Oleg Nesterov wrote: > > > > 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

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Chuck Ebbert wrote: > > > [ 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_sche

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Linus Torvalds
On Fri, Oct 3, 2014 at 5:01 PM, Linus Torvalds wrote: > > 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 >if (likely(!

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Linus Torvalds
On Fri, Oct 3, 2014 at 4:26 PM, Oleg Nesterov wrote: > > 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_

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Andy Lutomirski wrote: > > 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? > Also, I'm at a loss as to wtf all this code is doing. > > There's preempt_schedule,

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Linus Torvalds
On Fri, Oct 3, 2014 at 2:56 PM, Andy Lutomirski wrote: > > 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 sho

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Chuck Ebbert wrote: > > On Fri, 3 Oct 2014 23:41:24 +0200 > Oleg Nesterov wrote: > > > On 10/03, Chuck Ebbert wrote: > > > > > > > [ 921.917752] ? ___preempt_schedule_context > > > > (arch/x86/lib/thunk_64.S:44) > > > > [ 921.917752] ? preempt_schedule_context > > > > (kernel/context

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
On 10/03, Sasha Levin wrote: > > On 09/24/2014 11:02 AM, tip-bot for Oleg Nesterov wrote: > > Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Gitweb: > > http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Author: Oleg Nesterov > > AuthorDate: Sun, 21 Sep 2014

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread H. Peter Anvin
Yes, it is. On October 3, 2014 3:53:08 PM PDT, Andy Lutomirski wrote: >On Fri, Oct 3, 2014 at 3:48 PM, Chuck Ebbert >wrote: >> On Fri, 3 Oct 2014 23:41:24 +0200 >> Oleg Nesterov wrote: >> >>> On 10/03, Chuck Ebbert wrote: >>> > >>> > > [ 921.917752] ? ___preempt_schedule_context >(arch/x86/lib

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Andy Lutomirski
On Fri, Oct 3, 2014 at 3:48 PM, Chuck Ebbert wrote: > On Fri, 3 Oct 2014 23:41:24 +0200 > Oleg Nesterov wrote: > >> On 10/03, Chuck Ebbert wrote: >> > >> > > [ 921.917752] ? ___preempt_schedule_context (arch/x86/lib/thunk_64.S:44) >> > > [ 921.917752] ? preempt_schedule_context (kernel/context_

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Chuck Ebbert
On Fri, 3 Oct 2014 23:41:24 +0200 Oleg Nesterov wrote: > On 10/03, Chuck Ebbert wrote: > > > > > [ 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_con

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Andy Lutomirski
On Fri, Oct 3, 2014 at 2:41 PM, Oleg Nesterov wrote: > On 10/03, Chuck Ebbert wrote: >> >> > [ 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 (a

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Oleg Nesterov
Hi Sasha, On 10/03, Sasha Levin wrote: > > On 09/24/2014 11:02 AM, tip-bot for Oleg Nesterov wrote: > > Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Gitweb: > > http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Author: Oleg Nesterov > > AuthorDate: Sun, 2

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-03 Thread Chuck Ebbert
On Fri, 03 Oct 2014 00:50:13 -0400 Sasha Levin wrote: > On 09/24/2014 11:02 AM, tip-bot for Oleg Nesterov wrote: > > Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Gitweb: > > http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > > Author: Oleg Nesterov > > Auth

Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers

2014-10-02 Thread Sasha Levin
On 09/24/2014 11:02 AM, tip-bot for Oleg Nesterov wrote: > Commit-ID: 0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > Gitweb: http://git.kernel.org/tip/0ad6e3c5199be12c9745da8f8b9e3c9f8066c235 > Author: Oleg Nesterov > AuthorDate: Sun, 21 Sep 2014 20:41:53 +0200 > Committer: Ingo Molnar > Co