From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756284AbcLUSHZ (ORCPT ); Wed, 21 Dec 2016 13:07:25 -0500 Received: from ns.sciencehorizons.net ([71.41.210.147]:18916 "HELO ns.sciencehorizons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752913AbcLUSHX (ORCPT ); Wed, 21 Dec 2016 13:07:23 -0500 Date: 21 Dec 2016 13:07:22 -0500 Message-ID: <20161221180722.564.qmail@ns.sciencehorizons.net> From: "George Spelvin" To: linux@sciencehorizons.net, torvalds@linux-foundation.org Subject: Re: HalfSipHash Acceptable Usage Cc: ak@linux.intel.com, davem@davemloft.net, David.Laight@aculab.com, djb@cr.yp.to, ebiggers3@gmail.com, eric.dumazet@gmail.com, hannes@stressinduktion.org, Jason@zx2c4.com, jeanphilippe.aumasson@gmail.com, kernel-hardening@lists.openwall.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, netdev@vger.kernel.org, tom@herbertland.com, tytso@mit.edu, vegard.nossum@gmail.com In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus wrote: >> How much does kernel_fpu_begin()/kernel_fpu_end() cost? > > It's now better than it used to be, but it's absolutely disastrous > still. We're talking easily many hundreds of cycles. Under some loads, > thousands. I think I've been thoroughly dissuaded, but just to clarify one thing that resembles a misunderstanding: > In contrast, in reality, especially with things like "do it once or > twice per incoming packet", you'll easily hit the absolute worst > cases, where not only does it take a few hundred cycles to save the FP > state, you'll then return to user space in between packets, which > triggers the slow-path return code and reloads the FP state, which is > another few hundred cycles plus. Everything being discussed is per-TCP-connection overhead, *not* per packet. (Twice for outgoing connections, because one is to generate the ephemeral port number.) I know you know this, but I don't want anyone spectating to be confused about it.