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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58653C25B78 for ; Tue, 4 Jun 2024 20:18:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B87B46B0083; Tue, 4 Jun 2024 16:18:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B376A6B0085; Tue, 4 Jun 2024 16:18:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FDED6B008A; Tue, 4 Jun 2024 16:18:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 826346B0083 for ; Tue, 4 Jun 2024 16:18:03 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 3C85C1A0D3D for ; Tue, 4 Jun 2024 20:18:03 +0000 (UTC) X-FDA: 82194317646.08.155B5C0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 897AE140010 for ; Tue, 4 Jun 2024 20:18:01 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YoZ0l1zC; spf=pass (imf26.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717532281; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hzO5VxyNboH0UxSA8oeS3DN/P0lxl1+qVDrF4lH35fg=; b=l7xrEAOwDhyIL7xevxxKOMGhbJG3bIyaHA85nxafVZT719VhzvK4IvzeFQWpOwpYtgO2nR 8PWwEXhjpU00vzG+og9Oq1LGbxido7N6ZACjfzrCF7Zstk/ObV9+S+DvW4vTznqNnDs81x DpbU4GCHmkOFdFbqjxJpEq2am2F6NK4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717532281; a=rsa-sha256; cv=none; b=ds40/o6Y9HBOoZ+bfdplwbs+ul58dcfsuo2Gym3TB5DACWDmZ/0a6jQ0xCSdv1u/nSJBZZ ktKLLn2aiuu+fWtiZadxkwsIezYmVIadKhv255YdHYJ6O1xb4ySDJS0J815459WEtsJqbv s7eg13vy+wja50cIwt40V+j4nARhid4= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YoZ0l1zC; spf=pass (imf26.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6C013614E2; Tue, 4 Jun 2024 20:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50DD4C2BBFC; Tue, 4 Jun 2024 20:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717532280; bh=hzO5VxyNboH0UxSA8oeS3DN/P0lxl1+qVDrF4lH35fg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YoZ0l1zC3xE7XjFm6AyGqJGICJLDpBXsff7pMRSlEudgDhIe2FAqUIlZOHMrcDAr3 JFMzUTUWby1raWnTIk9qkVwqwtiz6/Z6smnBNReiuYlHT8eUSl0Z+Aqd5Gb2Mvh34S wAKOpf6ZGKyFw6YsjI3fHnZC+rpMWQawCWhKqPCdn6EmlNin9YkQkOohgJvSm0Jfdq EA1DmGUVMobN6eu67mYDQTP4RfwK6SHx4st2n6F8wStZwJn0RmP6KpiZmkZX3cYHhC s3AwyJtNeSyuaNXCJfi8TiyYPNzftuerF7VkPZyKLtWbcx/eMh95QAsbx5XROxuYBO Zsx5ZvhbZVrFA== Date: Tue, 4 Jun 2024 21:17:54 +0100 From: Conor Dooley To: Alexandre Ghiti Cc: yunhui cui , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Morton , Ved Shanbhogue , Matt Evans , Dylan Jhong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org Subject: Re: [External] [PATCH RFC/RFT v2 3/4] riscv: Stop emitting preventive sfence.vma for new vmalloc mappings Message-ID: <20240604-finalist-screen-c9f35b5cfc56@spud> References: <20240131155929.169961-1-alexghiti@rivosinc.com> <20240131155929.169961-4-alexghiti@rivosinc.com> <20240604-dazzling-envy-1dcf111eb2c5@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rwD0Txngxq5MBoPY" Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 897AE140010 X-Rspam-User: X-Stat-Signature: mjbdz7tohd3oeggxq9c7mitbsmrzompu X-HE-Tag: 1717532281-330607 X-HE-Meta: U2FsdGVkX18kbjDeefypKgpwJX5ieFImqYuOS1vTfLITnF5PotyecXXrydyQezTUoNl+Up90aUiDAmU9IEBSOuEeolGUXYoIUpc47qZXzEZUm9VH42sTwr6oE3Isgf6LnTfh+LQs6QAdgviVvkhl6jfjIdfKddLNY2NVwI1PA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BcqDrO61npMDQ243q/eebd6ytaccswIvk+LokuFWCSji9jZXZNg/d8dplPH3bEMyqpef1TBSm/+FhA/C+F+cF30LBA/6gWM43WBp8/so5eDjSdnpzjdMUU52GNxeS8SQlUdA3UA6NkOAMOToLWveitobAc0m2UaJupl2YQEQL3NdRSCMwXJqQh1X/gFDluoIRedyOuxKWhz+wkHhdbgZQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --rwD0Txngxq5MBoPY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 04, 2024 at 01:44:15PM +0200, Alexandre Ghiti wrote: > On Tue, Jun 4, 2024 at 10:52=E2=80=AFAM Conor Dooley w= rote: > > > > On Tue, Jun 04, 2024 at 09:17:26AM +0200, Alexandre Ghiti wrote: > > > On Tue, Jun 4, 2024 at 9:15=E2=80=AFAM Alexandre Ghiti wrote: > > > > On Tue, Jun 4, 2024 at 8:21=E2=80=AFAM yunhui cui wrote: > > > > > > > > > > As for the current status of the patch, there are two points that= can > > > > > be optimized: > > > > > 1. Some chip hardware implementations may not cache TLB invalid > > > > > entries, so it doesn't matter whether svvptc is available or not.= Can > > > > > we consider adding a CONFIG_RISCV_SVVPTC to control it? > > > > > > That would produce a non-portable kernel. But I'm not opposed to that > > > at all, let me check how we handle other extensions. Maybe @Conor > > > Dooley has some feedback here? > > > > To be honest, not really sure what to give feedback on. Could you > > elaborate on exactly what the option is going to do? Given the > > portability concern, I guess you were proposing that the option would > > remove the preventative fences, rather than your current patch that > > removes them via an alternative? >=20 > No no, I won't do that, we need a generic kernel for distros so that's > not even a question. What Yunhui was asking about (to me) is: can we > introduce a Kconfig option to always remove the preventive fences, > bypassing the use of alternatives altogether? >=20 > To me, it won't make a difference in terms of performance. But if we > already offer such a possibility for other extensions, well I'll do > it. Otherwise, the question is: should we start doing that? We don't do that for other extensions yet, because currently all the extensions we have options for are additive. There's like 3 alternative patchsites, and they are all just one nop? I don't see the point of having a Kconfig knob for that. --rwD0Txngxq5MBoPY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZl92cgAKCRB4tDGHoIJi 0jejAP4q4iC1BCvHT6xTV9Sna0UEFmTHPbvuyI/Dr8hN0BftCQEA2HLRmlNNqiPJ abULfaYTpyjXRctzj8H5FL5kCUjY6gs= =929z -----END PGP SIGNATURE----- --rwD0Txngxq5MBoPY--