Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbDANN0 (ORCPT ); Wed, 1 Apr 2015 09:13:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60936 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbbDANNX (ORCPT ); Wed, 1 Apr 2015 09:13:23 -0400 Message-ID: <551BEED2.2080805@redhat.com> Date: Wed, 01 Apr 2015 15:12:50 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Ingo Molnar CC: Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/9] x86/asm/entry/32: Use PUSH instructions to build pt_regs on stack References: <1427821211-25099-1-git-send-email-dvlasenk@redhat.com> <1427821211-25099-2-git-send-email-dvlasenk@redhat.com> <20150401085140.GC23916@gmail.com> In-Reply-To: <20150401085140.GC23916@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 35 On 04/01/2015 10:51 AM, Ingo Molnar wrote: > > * Denys Vlasenko wrote: > >> This mimics the recent similar 64-bit change. >> Saves ~110 bytes of code. >> >> Patch was run-tested on 32 and 64 bits, Intel and AMD CPU. >> I also looked at the diff of entry_64.o disassembly, to have >> a different view of the changes. > > The other important question would be: what performance difference (if > any) did you observe before/after the change? I did not measure it then. At the moment I don't have AMD CPUs here, cant benchmark 32-bit syscall-based codepath. On a Sandy Bridge CPU (IOW: sysenter codepath) - Before: 78.57 ns per getpid After: 76.90 ns per getpid It's better than I thought it would be. Probably because this load: movl ASM_THREAD_INFO(TI_sysenter_return, %rsp, 0), %r10d has been moved up by the patch (happens sooner). -- 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/