Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 9:42 PM, Brian Gerst wrote: > On Wed, Dec 9, 2015 at 6:50 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: >>> On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: Simplified version: ENTRY(stub_ptregs_64) cmpl

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
On Wed, Dec 9, 2015 at 6:50 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: >>> Simplified version: >>> ENTRY(stub_ptregs_64) >>> cmpl $fast_path_return, (%rsp) >> >> Does that instruction actually

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: >> Simplified version: >> ENTRY(stub_ptregs_64) >> cmpl $fast_path_return, (%rsp) > > Does that instruction actually work the way you want it to? (Does it > link?) I think you might

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: > On Wed, Dec 9, 2015 at 1:53 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: >>> Instead of using a duplicate syscall table for the fast path, create stubs >>> for >>> the syscalls that need pt_regs that save

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
On Wed, Dec 9, 2015 at 1:53 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: >> Instead of using a duplicate syscall table for the fast path, create stubs >> for >> the syscalls that need pt_regs that save the extra registers if a flag for >> the >> slow path is

[PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
Instead of using a duplicate syscall table for the fast path, create stubs for the syscalls that need pt_regs that dispatch based on the call site. I think that this is very likely to introduce a mis-predicted branch in all such syscalls. I think that's fine -- all of them are already very slow.

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: > Instead of using a duplicate syscall table for the fast path, create stubs for > the syscalls that need pt_regs that save the extra registers if a flag for the > slow path is not set. > > Signed-off-by: Brian Gerst > To: Andy Lutomirski > Cc:

[PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
Instead of using a duplicate syscall table for the fast path, create stubs for the syscalls that need pt_regs that save the extra registers if a flag for the slow path is not set. Signed-off-by: Brian Gerst To: Andy Lutomirski Cc: Andy Lutomirski Cc: the arch/x86 maintainers Cc: Linux Kernel

[PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
Instead of using a duplicate syscall table for the fast path, create stubs for the syscalls that need pt_regs that save the extra registers if a flag for the slow path is not set. Signed-off-by: Brian Gerst To: Andy Lutomirski Cc: Andy Lutomirski

[PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
Instead of using a duplicate syscall table for the fast path, create stubs for the syscalls that need pt_regs that dispatch based on the call site. I think that this is very likely to introduce a mis-predicted branch in all such syscalls. I think that's fine -- all of them are already very slow.

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: > Instead of using a duplicate syscall table for the fast path, create stubs for > the syscalls that need pt_regs that save the extra registers if a flag for the > slow path is not set. > > Signed-off-by: Brian Gerst

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: > On Wed, Dec 9, 2015 at 1:53 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: >>> Instead of using a duplicate syscall table for the fast path, create

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
On Wed, Dec 9, 2015 at 1:53 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 5:02 AM, Brian Gerst wrote: >> Instead of using a duplicate syscall table for the fast path, create stubs >> for >> the syscalls that need pt_regs that save the extra

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: >> Simplified version: >> ENTRY(stub_ptregs_64) >> cmpl $fast_path_return, (%rsp) > > Does that instruction actually work the way you want it

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 9:42 PM, Brian Gerst wrote: > On Wed, Dec 9, 2015 at 6:50 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: >>> On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

2015-12-09 Thread Brian Gerst
On Wed, Dec 9, 2015 at 6:50 PM, Andy Lutomirski wrote: > On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst wrote: >>> Simplified version: >>> ENTRY(stub_ptregs_64) >>> cmpl