Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759876AbaJCXOr (ORCPT ); Fri, 3 Oct 2014 19:14:47 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42087 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759858AbaJCXOo (ORCPT ); Fri, 3 Oct 2014 19:14:44 -0400 User-Agent: K-9 Mail for Android In-Reply-To: References: <20140921184153.GA23727@redhat.com> <542E2B05.5080607@oracle.com> <20141003083954.10a13a24@as> <20141003214124.GA31614@redhat.com> <20141003174814.6829cf26@as> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers From: "H. Peter Anvin" Date: Fri, 03 Oct 2014 16:13:38 -0700 To: Andy Lutomirski , Chuck Ebbert CC: Oleg Nesterov , Sasha Levin , Ingo Molnar , "linux-kernel@vger.kernel.org" , Linus Torvalds , Peter Zijlstra , Denys Vlasenko , Thomas Gleixner Message-ID: <4F1460E2-2B1B-4587-8ACF-6709C63D1FC6@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/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_schedule_context >(kernel/context_tracking.c:145) >>> > > [ 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_schedule_context >(kernel/context_tracking.c:145) >>> > > [ 921.917752] ? ___preempt_schedule_context >(arch/x86/lib/thunk_64.S:44) >>> > > [ 921.917752] ? preempt_schedule_context >(kernel/context_tracking.c:145) >>> > >>> > >>> > >>> > I *think* this is because RBP isn't being saved across task switch >>> > anymore? >>> > >>> > Without CONFIG_FRAME_POINTERS that night not be a problem... >>> >>> Could you please spell? >>> >>> I don't even understand "RBP isn't being saved", >SAVE_CONTEXT/RESTORE_CONTEXT >>> do push/pop %rbp? >>> >> >> SAVE_ARGS/RESTORE_ARGS, which is what THUNK uses, doesn't push/pop >%rbp >> >> Before, SAVE_ALL/RESTORE_ALL were being used around the call to >> preempt_schedule(). So from the symptoms I thought this was the >problem. > >rbp is callee-saved no matter what, unless my memory of the ABI is >*waaaaay* off. > >--Andy -- Sent from my mobile phone. Please pardon brevity and lack of formatting. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/