Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-18 Thread Herbert Xu
On Fri, Sep 15, 2017 at 11:06:29PM +0200, Ingo Molnar wrote: > > Indeed, I suspect they should go through the crypto tree, these fixes are > independent, they don't depend on anything in the x86 tree. Sure I can pick them up through cryptodev. Thanks, -- Email: Herbert Xu Home Page: http://gon

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-15 Thread Ingo Molnar
* Eric Biggers wrote: > On Fri, Sep 15, 2017 at 07:34:31AM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > Hi Josh, > > > > > > On Wed, Sep 13, 2017 at 05:33:03PM -0500, Josh Poimboeuf wrote: > > > > And here's v2 of the sha512-avx2 patch. It should hopefully gain back > >

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-15 Thread Eric Biggers
On Fri, Sep 15, 2017 at 07:34:31AM +0200, Ingo Molnar wrote: > > * Eric Biggers wrote: > > > Hi Josh, > > > > On Wed, Sep 13, 2017 at 05:33:03PM -0500, Josh Poimboeuf wrote: > > > And here's v2 of the sha512-avx2 patch. It should hopefully gain back > > > most of the performance lost by v1. >

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Ingo Molnar
* Josh Poimboeuf wrote: > > So if this observation of mine is true we could go back to the old code for > > the > > hotpath, but use RDI for TBL and not reload it in the hotpath. > > Thanks for the excellent breakdown. > > When I looked at the patch again, I came to the same conclusion as yo

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Ingo Molnar
* Eric Biggers wrote: > Hi Josh, > > On Wed, Sep 13, 2017 at 05:33:03PM -0500, Josh Poimboeuf wrote: > > And here's v2 of the sha512-avx2 patch. It should hopefully gain back > > most of the performance lost by v1. > > > > From: Josh Poimboeuf > > Subject: [PATCH] x86/crypto: Fix RBP usage i

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Eric Biggers
Hi Josh, On Wed, Sep 13, 2017 at 05:33:03PM -0500, Josh Poimboeuf wrote: > And here's v2 of the sha512-avx2 patch. It should hopefully gain back > most of the performance lost by v1. > > From: Josh Poimboeuf > Subject: [PATCH] x86/crypto: Fix RBP usage in sha512-avx2-asm.S > > Using RBP as a t

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Josh Poimboeuf
On Thu, Sep 14, 2017 at 11:16:12AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > I'm still looking at the other one (sha512-avx2), but so far I haven't > > found a way to speed it back up. > > Here's a couple of very quick observations with possible optimizations: > > AFAICS the

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Ingo Molnar
* Ingo Molnar wrote: > 1) > > Note how R12 is used immediately, right in the next instruction: > > vpaddq (TBL), Y_0, XFER > > I.e. the RBP fixes lengthen the program order data dependencies - that's a > new > constraint and a few extra cycles per loop iteration if the workload is

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-14 Thread Ingo Molnar
* Josh Poimboeuf wrote: > I'm still looking at the other one (sha512-avx2), but so far I haven't > found a way to speed it back up. Here's a couple of very quick observations with possible optimizations: AFAICS the main effect of the RBP fixes is the introduction of a memory load into the cr

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-13 Thread Josh Poimboeuf
On Wed, Sep 13, 2017 at 04:24:28PM -0500, Josh Poimboeuf wrote: > On Fri, Sep 08, 2017 at 10:57:05AM -0700, Eric Biggers wrote: > > On Thu, Sep 07, 2017 at 11:26:47PM +0200, Ingo Molnar wrote: > > > > > > * Eric Biggers wrote: > > > > > > > On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar w

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-13 Thread Josh Poimboeuf
On Fri, Sep 08, 2017 at 10:57:05AM -0700, Eric Biggers wrote: > On Thu, Sep 07, 2017 at 11:26:47PM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar wrote: > > > > > > > > * Eric Biggers wrote: > > > > > > > > > Thanks for

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-08 Thread Eric Biggers
On Thu, Sep 07, 2017 at 11:26:47PM +0200, Ingo Molnar wrote: > > * Eric Biggers wrote: > > > On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar wrote: > > > > > > * Eric Biggers wrote: > > > > > > > Thanks for fixing these! I don't have time to review these in detail, > > > > but I ran >

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-07 Thread Ingo Molnar
* Eric Biggers wrote: > On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > Thanks for fixing these! I don't have time to review these in detail, > > > but I ran > > > the crypto self-tests on the affected algorithms, and they all pass. I >

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-07 Thread Eric Biggers
On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar wrote: > > * Eric Biggers wrote: > > > Thanks for fixing these! I don't have time to review these in detail, but > > I ran > > the crypto self-tests on the affected algorithms, and they all pass. I also > > benchmarked them before and afte

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-07 Thread Ingo Molnar
* Eric Biggers wrote: > Thanks for fixing these! I don't have time to review these in detail, but I > ran > the crypto self-tests on the affected algorithms, and they all pass. I also > benchmarked them before and after; the only noticable performance difference > was > that sha256-avx2 and

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-06 Thread Josh Poimboeuf
On Fri, Sep 01, 2017 at 05:09:19PM -0700, Eric Biggers wrote: > Hi Josh, > > On Tue, Aug 29, 2017 at 01:05:33PM -0500, Josh Poimboeuf wrote: > > Many of the x86 crypto functions use RBP as a temporary register. This > > breaks frame pointer convention, and breaks stack traces when unwinding > > f

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-01 Thread Eric Biggers
Hi Josh, On Tue, Aug 29, 2017 at 01:05:33PM -0500, Josh Poimboeuf wrote: > Many of the x86 crypto functions use RBP as a temporary register. This > breaks frame pointer convention, and breaks stack traces when unwinding > from an interrupt in the crypto code. > > Convert most* of them to leave R

[PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-08-29 Thread Josh Poimboeuf
Many of the x86 crypto functions use RBP as a temporary register. This breaks frame pointer convention, and breaks stack traces when unwinding from an interrupt in the crypto code. Convert most* of them to leave RBP alone. These pass the crypto boot tests for me. Any further testing would be ap