From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA84C210F56 for ; Tue, 10 Dec 2024 11:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733830317; cv=none; b=p5S+OObWOH5LFQFgS60whVCYah6xwPv+eRvPMLgEFhEGglDRXkllLDVl7izS1JmPF03+vP0VO9Qn/M/zg7WM7J3vxnebplFcio1TXIKiOrCI4OzA8HbxsK5l8+9TpH4hHzF0Ceu5gRZ5Gn/5rJ8swEnom1EHiUVILazVRJMw2UE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733830317; c=relaxed/simple; bh=7G3MEYmPbcu7pxhtNlLxoLXwKKYtShwas8EpCDcYV/g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pueeuSPDvikRTO8ZyM5Di1BJPGA1a6qv4x4VrLdnlKAkCyCVbNvmQRjFjlCN/7JUtsLPDFcHsZxwmU8IMa4nXJkoZWOZQ06Xj+CjTvIGeDay3qmcdLj+DG/OrfD+Rx+fup6MwUR6hbMrLWmL5XqaWewCbxti/uU6ZzY9FBA/6nE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Aae7Xe9X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Aae7Xe9X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05128C4CED6; Tue, 10 Dec 2024 11:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733830317; bh=7G3MEYmPbcu7pxhtNlLxoLXwKKYtShwas8EpCDcYV/g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Aae7Xe9X7J6CSJfWULApGStu0RbGgu0ObEfV0nHFXT/sxsaS1H4mYl2TbieO+ri3z gO0kmUKoTDFIWdxQ/CINpFRy3QyOcT/hM7wvsvdLyA/DwTSmNGy/aBlF5RuMsUJwFS TCcr9EbFrVR/rPVR10CLy3uli093tIIMr5yljzlzLVF2cF3dnN2167MoF+AR9JSxl4 ugQgDCgBiwDPdobwh1vy2WLysV+4KPNl8Guf4IYT3PQYQ3PuNwFinkn08f+eROczXs kqVWfwx8HJkMDhv8HIG7nIJ/XnqFmCes5rrEfoza7b3G9m/2FdsPptnSllUhv9oK6U WS7x9M/6sdJDA== Date: Tue, 10 Dec 2024 11:31:52 +0000 From: Will Deacon To: Yang Shi Cc: catalin.marinas@arm.com, cl@gentwo.org, scott@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/3] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Message-ID: <20241210113151.GC14735@willie-the-truck> References: <20241118181711.962576-1-yang@os.amperecomputing.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241118181711.962576-1-yang@os.amperecomputing.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Mon, Nov 18, 2024 at 10:16:07AM -0800, Yang Shi wrote: > > When rodata=full kernel linear mapping is mapped by PTE due to arm's > break-before-make rule. > > This resulted in a couple of problems: > - performance degradation > - more TLB pressure > - memory waste for kernel page table > > There are some workarounds to mitigate the problems, for example, using > rodata=on, but this compromises the security measurement. > > With FEAT_BBM level 2 support, splitting large block page table to > smaller ones doesn't need to make the page table entry invalid anymore. > This allows kernel split large block mapping on the fly. I think you can still get TLB conflict aborts in this case, so this doesn't work. Hopefully the architecture can strengthen this in the future to give you what you need. Will