Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2032580imm; Thu, 27 Sep 2018 06:27:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV61h9ZR3C0vBLQHtQVOTxupfWI4opppCs+1hkXJ09JZGXyTG9PhAgmNeQdDbUXDMBxEG+ens X-Received: by 2002:a62:3306:: with SMTP id z6-v6mr11446648pfz.85.1538054840500; Thu, 27 Sep 2018 06:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538054840; cv=none; d=google.com; s=arc-20160816; b=da7z2NUEPhEEuL+ggx7f/NjbPkegf97bxJnjwkAclfJQVB/X+eovXMvXejbqu6eDGi eGedWo9GspGJ5F+k2hLiy6r0qkodi7jZzGCaRQMt2EEkADjf4C4yRtf0fZMlx9pwBA/i 9/obmwqDlBV551YuY2SwyKXFFZycjcT9bNlKy+6KIlbH+3wEoY87JgSrBvathz5CGINo JN3BmKstn6rEb4AjnVPmKVcV/u8KOf9XATmo8bOYpFnnHcYMa4RyD2AlBuUnWVEo9ylE O9aBgs4OT3PdGmh0dK9eKotIs8+g8sbZASE/hYhAflOJM/uHm7+jI5PO3CPdzzEZriTW GfFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lsg8zFm2a1PXbnjGgSajYn0SR9WZj8UI/q/E67EYtrk=; b=zR3A7SvjCU0R+WEl9DuU/BGRnzuJxzey5Odgg3z3fISCAzQ/egEh05gQ7BUK0FhZZA CTRi1iRBR3RchqOXf35NSnpbrNYANwjisyIP+EQUKaNR5Sr2jj1jeaCWNWyw/ZhEMDgc VEwiN6aQtsD6JgRrJUFHPz4NEQ1tM8iBDVdX/6gV82KglCYtMuEUW3THxagdUvaNFPdH 4rgHyrb2Od+W+28x/WjGBEFhN8dCUDFIilVsoNhcyM4h9r/f9XljixZ7dnpfWXgpfG0a 29vjLDDlq/ytXLkay+2ErzUe20pch6pRjC+zp3NKJqgpsJ6Mm6XC6VqDt8eX/LC92g++ 0imw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=1rQsKvHV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u68-v6si2229429pfa.28.2018.09.27.06.26.53; Thu, 27 Sep 2018 06:27:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=1rQsKvHV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727561AbeI0Tov (ORCPT + 99 others); Thu, 27 Sep 2018 15:44:51 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:37177 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbeI0Tov (ORCPT ); Thu, 27 Sep 2018 15:44:51 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 622fc1b8; Thu, 27 Sep 2018 13:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=kJbJIBwFj1VSoSN+yDEDgJrLb7w=; b=1rQsKv HVyfezV6JkNzI87kCjJpuJZuF0nNPPTkbI73haqgEtGfznNvYW6cz9eU318yCGav n2UDTdAdrrGc8GDWcnEhzcOHlL1gdJ83HTup9NUgvC+lIEwevzEzFn9gaj+xbeja T0b7N6KvGxZnq3vOQItKTP0LVQiSEZslv2CUxIZHLIUnpNGp02u0PhiWK5Laln4a +Qyn8/Loi35sdfIjb3RU6N/yLmVDLFwSaWbqhZem2c0RbuyiXvpoe/QpKPxp8cE+ 4hUOVyZjCNFswMWMfm+oUeH4KcdJXzX9kOT4DFN6VHIol1tfSi9kh6jkP+0qrmqY x6h0jCMkhugCoYiw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 6cec1f13 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Thu, 27 Sep 2018 13:07:51 +0000 (UTC) Received: by mail-oi1-f172.google.com with SMTP id d63-v6so2087355oic.12; Thu, 27 Sep 2018 06:26:31 -0700 (PDT) X-Gm-Message-State: ABuFfoj8FvSuqL88Ye1ByeAoEQwHMCGPEsN1DT8FPL0BJ+IG744mOyMM 8T6ZdvI8vQp/keDVT69FPbF1sdMq/bAvnPoOgM8= X-Received: by 2002:aca:df42:: with SMTP id w63-v6mr3037351oig.295.1538054790312; Thu, 27 Sep 2018 06:26:30 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-8-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 27 Sep 2018 15:26:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 07/23] zinc: ChaCha20 ARM and ARM64 implementations To: Thomas Gleixner Cc: Ard Biesheuvel , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, I'm trying to optimize this for crypto performance while still taking into account preemption concerns. I'm having a bit of trouble figuring out a way to determine numerically what the upper bounds for this stuff looks like. I'm sure I could pick a pretty sane number that's arguably okay -- and way under the limit -- but I still am interested in determining what that limit actually is. I was hoping there'd be a debugging option called, "warn if preemption is disabled for too long", or something, but I couldn't find anything like that. I'm also not quite sure what the latency limits are, to just compute this with a formula. Essentially what I'm trying to determine is: preempt_disable(); asm volatile(".fill N, 1, 0x90;"); preempt_enable(); What is the maximum value of N for which the above is okay? What technique would you generally use in measuring this? Thanks, Jason