From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87FA3C2D0A3 for ; Wed, 4 Nov 2020 18:51:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1290B207BB for ; Wed, 4 Nov 2020 18:51:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aq1QguOd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XasNv1Tz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1290B207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OkwmFvmOkps2RHUZ4qfRR4RDQAszyCY/JIL1raaoZPk=; b=aq1QguOdWBKvygPS7xXbQAy2y MF5VFTD8M1upYpoo40R5a/mlllpo0sO0U053Lr+qAASzy4T8Yk1Q+CA8o8oVE1TpEH4yfXwj6fl97 IDetBP5GFo3HeMNt/MQHFMglzXI1SGHoo8fKG059VM01omNODxTBgZ/5QAozOnTKxOxpv7nhd1hpz Zr1ZsAVsmqr5xFWZ6X/EpzhlgWakQq6upGSSOHAoqHrIWSYCO4ftH9yvsfsaqYfmb+kH+qK1d3jAW JQcCybfcJ0J6CITUW8+HgzuAgcCMhzzrwES9ngHNqY8GMphNf5dgHrWKxzar1nk+dtZrVGsvBxMHF bdLnPwaAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaNqi-0000BR-Kc; Wed, 04 Nov 2020 18:49:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaNqP-0008Vi-FO for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 18:49:25 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04E2320780; Wed, 4 Nov 2020 18:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604515756; bh=2A5OF6h6qHudL5Ez9ylNZyQmHAgeM1uxYZWr9nhyngM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XasNv1TzYodZT78eld5r/GIyEJmyQ1Dp9r5yXD5ijNWtxmZ3dRzX55iGLXFFA8sAY XIxhpK6I+SyqWWC9rYYEfmr3lXcKgnI7gJ8KbdoFTZYJ+zm4I2FV/Gv/AvAXqhe3oO lyvy56yCBaTExY5naozurJa8hxVbUgD5q9jIStxU= Date: Wed, 4 Nov 2020 18:49:05 +0000 From: Mark Brown To: Dave Martin Subject: Re: [PATCH 1/1] arm64: Accelerate Adler32 using arm64 SVE instructions. Message-ID: <20201104184905.GB4812@sirena.org.uk> References: <20201103121506.1533-1-liqiang64@huawei.com> <20201103121506.1533-2-liqiang64@huawei.com> <20201103180031.GO6882@arm.com> <20201104175032.GA15020@sirena.org.uk> <20201104181256.GG6882@arm.com> MIME-Version: 1.0 In-Reply-To: <20201104181256.GG6882@arm.com> X-Cookie: Take your Senator to lunch this week. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_134917_773098_74050B76 X-CRM114-Status: GOOD ( 26.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , Catalin Marinas , Ard Biesheuvel , l00374334 , Linux Crypto Mailing List , Maxime Coquelin , Will Deacon , "David S. Miller" , Linux ARM , Herbert Xu Content-Type: multipart/mixed; boundary="===============8629394996131472664==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8629394996131472664== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TakKZr9L6Hm6aLOc" Content-Disposition: inline --TakKZr9L6Hm6aLOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 04, 2020 at 06:13:06PM +0000, Dave Martin wrote: > On Wed, Nov 04, 2020 at 05:50:33PM +0000, Mark Brown wrote: > > I think at a minimum we'd want to handle the vector length explicitly > > for kernel mode SVE, vector length independent code will work most of > > the time but at the very least it feels like a landmine waiting to cause > > trouble. If nothing else there's probably going to be cases where it > > makes a difference for performance. Other than that I'm not currently ... > The main reasons for constraining the vector length are a) to hide > mismatches between CPUs in heterogeneous systems, b) to ensure that > validated software doesn't run with a vector length it wasn't validated > for, and c) testing. > For kernel code, it's reasonable to say that all code should be vector- > length agnostic unless there's a really good reason not to be. So we > may not care too much about (b). > In that case, just setting ZCR_EL1.LEN to max in kernel_sve_begin() (or > whatever) probably makes sense. I agree, that's most likely a good default. > For (c), it might be useful to have a command-line parameter or debugfs > widget to constrain the vector length for kernel code; perhaps globally > or perhaps per driver or algo. I think a global control would be good for testing, it seems simpler and easier all round. The per thing tuning seems more useful for cases where we run into something like a performance reason to use a limited set of vector lengths but I think we should only add that when we have at least one user for it, some examples of actual restrictions we want would probably be helpful for designing the interface. > Nonetheless, working up a candidate algorithm to help us see whether > there is a good use case seems like a worthwhile project, so I don't > want to discourage that too much. Definitely worth exploring. --TakKZr9L6Hm6aLOc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+i96AACgkQJNaLcl1U h9BDdwf/Wf3rFlhyHJXhtm3oJ/tp2NIupBTg/F/Exk30EuZkvBoJ+x6jogqI344/ uRvlOaXl8Cw30CDUpoHk2/F9sU/iULuR1GE/A22PV4qu5cLWDEqUwuALauA1OJ6U 6SnIy6SmCIyv3pRVKWiNEAlN/MzvZDFp3xQ5piUl6dBvK9tg1wD0I89hAJxNSWIo rTboa3g+5r/Fr0yNY8H1QflGlKuflf1YZaPEPluQsIj8ptzJTv6icBnP9joKytep EagSqjWcP4zCE/1WuL859nDcrlJvc+6yRG4sqDVT1lgKE0uEQKvkf69J3N2m3Zse Mw/6CqyFCPj5iM6ueSHcaASZGztDPA== =6u/G -----END PGP SIGNATURE----- --TakKZr9L6Hm6aLOc-- --===============8629394996131472664== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8629394996131472664==--