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 A946EC4345F for ; Thu, 11 Apr 2024 15:38:10 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=49RVY1THauNmCeqgmnR9jzunpMG2IvXnwmBgSdCCphQ=; b=WnunpNv9RVxii+ /WR/7to/hTiNICXsKdaGMM1IrBujqvnUFqBa+I5+P4zNOPwYb/IinCzdWbaH45IMgzRL8xLc4f4ml 0+rdwSGDcaFaeOgiawEat8auTrKMAeaNANzOWC9eWekc7nVoFcE1kdVsDDkchZkIk6sO54j57FLqd xISE2m/r1n/YAjHI9pDq+Mlq/SV71za52ntGga3h8xE6Z+27RzYh7m9r0g3czKd+IECvx/XAGIWui WJySdLrd9jJgkROD30TXrKIrsfOrwe31LwUQJu43ERXmXY4GtD8bknbjXIdJeA/25ucVP+0AGz6oj 88ZMZOS4XtgUzMohgxwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruwUz-0000000CmdX-3oe4; Thu, 11 Apr 2024 15:38:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruwUx-0000000Cmbb-01c5 for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2024 15:38:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7EB48113E; Thu, 11 Apr 2024 08:38:27 -0700 (PDT) Received: from [10.1.38.151] (XHFQ2J9959.cambridge.arm.com [10.1.38.151]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BBD303F6C4; Thu, 11 Apr 2024 08:37:56 -0700 (PDT) Message-ID: Date: Thu, 11 Apr 2024 16:37:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/4] arm64: mm: Don't remap pgtables for allocate vs populate Content-Language: en-GB To: Mark Rutland Cc: Catalin Marinas , Will Deacon , Ard Biesheuvel , David Hildenbrand , Donald Dutile , Eric Chanudet , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Itaru Kitayama References: <20240404143308.2224141-1-ryan.roberts@arm.com> <20240404143308.2224141-4-ryan.roberts@arm.com> <37d4c278-3780-49ce-bd7e-e8f2ff4501fd@arm.com> From: Ryan Roberts In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240411_083759_125137_0A5B7E57 X-CRM114-Status: GOOD ( 13.64 ) 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 11/04/2024 16:25, Mark Rutland wrote: > On Thu, Apr 11, 2024 at 03:57:04PM +0100, Ryan Roberts wrote: >> On 11/04/2024 15:48, Mark Rutland wrote: >>> On Thu, Apr 11, 2024 at 02:37:49PM +0100, Ryan Roberts wrote: >>>> On 11/04/2024 14:02, Mark Rutland wrote: >>>>> but the logic remains fairly simple, and I suspect the overhead for late >>>>> allocations might not matter since the bulk of late changes are non-allocating. >>>> >>>> Its just the fixmap overhead that remains... >>> >>> True; my thinking there is that almost all of the later changes are for smaller >>> ranges than the linear map (~10s of MB vs GBs in your test data), so I'd expect >>> the overhead of those to be dominated by the cost of mappin the linear map. >>> >>> The only big exception is arch_add_memory(), but memory hotplug is incredibly >>> rare, and we're not making it massively slower than it already was... >> >> What about something like coco guest mem (or whatever its called). Isn't that >> scrubbed out of the linear map? So if a coco VM is started with GBs of memory, >> could that be a real case we want to optimize? > > I think that's already handled -- the functions we have to carve portions out > of the linear map use apply_to_page_range(), which doesn't use the fixmap. See > set_memory_*() and set_direct_map_*() in arch/arm64/mm/pageattr.c. Ahh gottya. Yet another table walker :) > > Note that apply_to_page_range() does what its name implies and *only* handles > mappings at page granularity. Hence not using that for > mark_linear_text_alias_ro() and mark_rodata_ro() which need to be able to > handle blocks. > > Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel