Re: [PATCH 3/4] x86: Rewrite switch_to() code

From: Andy Lutomirski
Date: Tue Jun 14 2016 - 21:31:44 EST


On Sat, May 21, 2016 at 9:04 AM, Brian Gerst <brgerst@xxxxxxxxx> wrote:
> Move the low-level context switch code to an out-of-line asm stub instead of
> using complex inline asm. This allows constructing a new stack frame for the
> child process to make it seamlessly flow to ret_from_fork without an extra
> test and branch in __switch_to(). It also improves code generation for
> __schedule() by using the C calling convention instead of clobbering all
> registers.

Just a heads up: I'm writing some code that conflicts with this patch.
The conflict will be easy to resolve, and, if this patch beats mine to
-tip, I'll rebase.

--Andy