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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 803AAC25B45 for ; Mon, 23 Oct 2023 17:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DZlypJeZwBnfyIv/Fxl4xiBu+8f5Qen7Uusbx/DfYT8=; b=QfSv0oF5+dewsk UKQ7DnZ8WP9+XijxqAxFidlBE8Auumw9g6AXhWxi2xBoREsoDNlAtC07QdibMpU9arqQwNTlASBg7 01kbZOZr6FrqaQqFLG8ccboz9PPjfpDL2wxep+FLTMUiEhq75Ay6ejOX5VRQtfIxrR2kIfwWA9ysl x5VHeUHzCqhsWQxTsimOau6LVWzDg48M3oUWOpx77e6TB6pM3cnhjN8ELLonH69bW23Y4NlX7Y6Hh bDC2A2kARS/ilAuqLe1q82xKIAQtpMtaBUu4IEbtb3Uu3whqgnXmmimhgWEPBakVaz+fMXuKkVlHb S4iL9HXm8T2ox+rHnjkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1quyPq-007tZd-2v; Mon, 23 Oct 2023 17:08:34 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1quyPn-007tYy-1y for linux-arm-kernel@lists.infradead.org; Mon, 23 Oct 2023 17:08:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1A60A625E4; Mon, 23 Oct 2023 17:08:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EBAEC433C8; Mon, 23 Oct 2023 17:08:24 +0000 (UTC) Date: Mon, 23 Oct 2023 18:08:21 +0100 From: Catalin Marinas To: David Hildenbrand Cc: Hyesoo Yu , Alexandru Elisei , will@kernel.org, oliver.upton@linux.dev, maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, arnd@arndb.de, akpm@linux-foundation.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, mhiramat@kernel.org, rppt@kernel.org, hughd@google.com, pcc@google.com, steven.price@arm.com, anshuman.khandual@arm.com, vincenzo.frascino@arm.com, eugenis@google.com, kcc@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA Message-ID: References: <20230823131350.114942-1-alexandru.elisei@arm.com> <20230823131350.114942-7-alexandru.elisei@arm.com> <20231010074823.GA2536665@tiffany> <20231023071656.GA344850@tiffany> <25fad62e-b1d9-4d63-9d95-08c010756231@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <25fad62e-b1d9-4d63-9d95-08c010756231@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_100831_742630_BD294745 X-CRM114-Status: GOOD ( 26.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 23, 2023 at 01:55:12PM +0200, David Hildenbrand wrote: > On 23.10.23 12:50, Catalin Marinas wrote: > > On Mon, Oct 23, 2023 at 04:16:56PM +0900, Hyesoo Yu wrote: > > > Does tag storage itself supports tagging? Will the following version be unusable > > > if the hardware does not support it? The document of google said that > > > "If this memory is itself mapped as Tagged Normal (which should not happen!) > > > then tag updates on it either raise a fault or do nothing, but never change the > > > contents of any other page." > > > (https://github.com/google/sanitizers/blob/master/mte-dynamic-carveout/spec.md) > > > > > > The support of H/W is very welcome because it is good to make the patches simpler. > > > But if H/W doesn't support it, Can't the new solution be used? > > > > AFAIK on the current interconnects this is supported but the offsets > > will need to be configured by firmware in such a way that a tag access > > to the tag carve-out range still points to physical RAM, otherwise, as > > per Google's doc, you can get some unexpected behaviour. [...] > I followed what you are saying, but I didn't quite read the following > clearly stated in your calculations: Using this model, how much memory would > you be able to reuse, and how much not? > > I suspect you would *not* be able to reuse "1/(32*32)" [second carve-out] > but be able to reuse "1/32 - 1/(32*32)" [first carve-out] or am I completely > off? That's correct. In theory, from the hardware perspective, we could even go recursively to the third/fourth etc. carveout until the last one is a single page but I'd rather not complicate things further. > Further, (just thinking about it) I assume you've taken care of the > condition that memory cannot self-host it's own tag memory. So that cannot > happen in the model proposed here, right? I don't fully understand what you mean. The tags for the first data range (0 .. ram_size * 31/32) are stored in the first tag carveout. That's where we'll need CMA. For the tag carveout, when hosting data pages as tagged, the tags go in the second carveout which is fully reserved (still TBD but possibly the firmware won't even tell the kernel about it). -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel