[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140127102759.GY11314@laptop.programming.kicks-ass.net>
Date: Mon, 27 Jan 2014 11:27:59 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Anvin <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] de-asmify the x86-64 system call slowpath
On Sun, Jan 26, 2014 at 02:28:15PM -0800, Linus Torvalds wrote:
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index 1e96c3628bf2..15b5953da958 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -658,30 +658,24 @@ sysret_check:
> /* Handle reschedules */
> /* edx: work, edi: workmask */
> sysret_careful:
> TRACE_IRQS_ON
> ENABLE_INTERRUPTS(CLBR_NONE)
> + SAVE_REST
> + FIXUP_TOP_OF_STACK %r11
> + movq %rsp,%rdi
> + movl %edx,%esi
> + call syscall_exit_slowpath
> + movl $_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT,%edi
> + testl %eax,%eax
> + jne sysret_using_iret
> + addq $REST_SKIP,%rsp
> + jmp sysret_check;
Obviously I don't particularly like the SAVE_REST/FIXUP_TOP_OF_STACK
being added to the reschedule path.
Can't we do as Al suggested earlier and have 2 slowpath calls, one
without PT_REGS and one with?
That said, yes its a nice cleanup, entry.S always hurts my brain.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists