[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKv+Gu89RiDBx35rtGS2uOZ+TwPt6P8UjwpqE17xm7dtMx-nNQ@mail.gmail.com>
Date: Mon, 3 Dec 2018 15:13:37 +0100
From: Ard Biesheuvel <ard.biesheuvel@...aro.org>
To: Martin Willi <martin@...ongswan.org>
Cc: Eric Biggers <ebiggers@...nel.org>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@...r.kernel.org>,
Paul Crowley <paulcrowley@...gle.com>,
Milan Broz <gmazyland@...il.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/6] crypto: x86/chacha20 - limit the
preemption-disabled section
On Sun, 2 Dec 2018 at 11:47, Martin Willi <martin@...ongswan.org> wrote:
>
>
> > To improve responsiveness, disable preemption for each step of the
> > walk (which is at most PAGE_SIZE) rather than for the entire
> > encryption/decryption operation.
>
> It seems that it is not that uncommon for IPsec to get small inputs
> scattered over multiple blocks. Doing FPU context saving for each walk
> step then can slow down things.
>
> An alternative approach could be to re-enable preemption not based on
> the walk steps, but on the amount of bytes processed. This would
> satisfy both users, I guess.
>
> In the long run we probably need a better approach for FPU context
> saving, as this really hurts performance-wise. For IPsec we should find
> a way to avoid the (multiple) per-packet FPU save/restores in softirq
> context, but I guess this requires support from process context
> switching.
>
At Jason's Zinc talk at plumbers, this came up, and apparently someone
is working on this, i.e., to ensure that on x86, the FPU restore only
occurs lazily, when returning to userland rather than every time you
call kernel_fpu_end() [like we do on arm64 as well]
Not sure what the ETA for that work is, though, nor did I get the name
of the guy working on it.
Powered by blists - more mailing lists