From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbcFTPpZ (ORCPT ); Mon, 20 Jun 2016 11:45:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51693 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754462AbcFTPoP (ORCPT ); Mon, 20 Jun 2016 11:44:15 -0400 Date: Mon, 20 Jun 2016 10:44:13 -0500 From: Josh Poimboeuf To: Brian Gerst Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko , Andy Lutomirski , Borislav Petkov , Thomas Gleixner Subject: Re: [PATCH v2 4/6] x86: Rewrite switch_to() code Message-ID: <20160620154413.awnzmk6wr67vw5ae@treble> References: <1466283378-17062-1-git-send-email-brgerst@gmail.com> <1466283378-17062-5-git-send-email-brgerst@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1466283378-17062-5-git-send-email-brgerst@gmail.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 20 Jun 2016 15:44:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 18, 2016 at 04:56:16PM -0400, Brian Gerst 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. > > Signed-off-by: Brian Gerst You can also remove the STACK_FRAME_NON_STANDARD annotation for __schedule() in kernel/sched/core.c since it no longer produces an objtool warning. Otherwise it looks great: Reviewed-by: Josh Poimboeuf -- Josh