From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753983AbbBKVCf (ORCPT ); Wed, 11 Feb 2015 16:02:35 -0500 Received: from terminus.zytor.com ([198.137.202.10]:35434 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbbBKVCe (ORCPT ); Wed, 11 Feb 2015 16:02:34 -0500 Message-ID: <54DBC344.7090402@zytor.com> Date: Wed, 11 Feb 2015 13:01:56 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andy Lutomirski , Denys Vlasenko CC: Linus Torvalds , Oleg Nesterov , Borislav Petkov , Frederic Weisbecker , X86 ML , Alexei Starovoitov , Will Drewry , Kees Cook , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 02/11] x86: code shrink in paranoid_exit References: <1421272101-16847-1-git-send-email-dvlasenk@redhat.com> <1421272101-16847-2-git-send-email-dvlasenk@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/2015 12:36 PM, Andy Lutomirski wrote: > > This is sort of a reply to the wrong thread, but wouldn't it be nicer > if we could pop a bunch of regs instead of using mov followed by add? > (Yes, this could be a followup, but it could be easier to spot now by > changing macros like RESTORE_XYZ.) > As far as I recall, it was an optimization for the Pentium 4 and possibly K8. At this point, most CPUs have stack engines so push/pop may be faster or at least the same speed. It would be nice to microbenchmark. -hpa