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 C56DCC982E4 for ; Fri, 16 Jan 2026 17:52:04 +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-Type: Content-Transfer-Encoding:Reply-To: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bA434lv0wVQgrq61RNm1tsTaNHthVMBh4aO+eKPgtQc=; b=0Xj6SKYy0hUd0A jWbfoxR5Urzw6hOPlEp93saelZrmqB4wrM4zATQJ2E3Q5fcQI7v0ZG14OASbny3Nnw8/7/ZiZfsiU R2Hm5bwO90saWMVVUQP5JjdbEbVnJfEYwjfvdEgbHUj/b6P7UNNuArbdHfge6uEai5HchHl6te/hj FGJGyQ9OvlQSWaBxQtpSEU41Ynkx2dTNpO5UJAkFcD+EiW0R1FpwHOcKdsRNTfBLhjy9g1xAMgNwD nczntuBcrBC+HaGGsxBOoDE2Pm2OnSl8Utfyb7WdNqZawBTvLB3Q7y4VNdhAEbWqLmH4nBf277Ayo DTuj/Uk0C3gTiePnHr4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vgnzF-0000000Ebcb-3vO1; Fri, 16 Jan 2026 17:51:53 +0000 Received: from fra-out-004.esa.eu-central-1.outbound.mail-perimeter.amazon.com ([3.74.81.189]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vgnzC-0000000Ebb1-3uez; Fri, 16 Jan 2026 17:51:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1768585910; x=1800121910; h=message-id:date:mime-version:reply-to:subject:to:cc: references:from:in-reply-to:content-transfer-encoding; bh=n3dU03TxGYY3gXB5y1WjelwjMhwgBHF8SdzzakH2Vf0=; b=PRSNgHohNhmMRJBylfOFrBfkpdzJ7mJ0WBRMuVYc7f4cV/m8uXbILM/h YKy5Qw67P6BUi/r5/cwVzcF5P/4Na4bRzw3uZhhGGm++Xsyq7CQ8IvDSR 5IUG9fMWP/3AyPOujFkXTjLLu/BzOkqrOgq+PEIBlcWnTs+kkyxmqdgMY L9NXMFobsVbi9yNwNCqDCYHh3Zm3V3lEDgO9ta1yAh4ZHmf89ROEP5wFE l2OoIRfaOBEUOMC9MZ7Xht6kBfZjdYQzdb656P0Mne6gskZNR61sfzqki XurOLS2hkGKVcdF1Lthxou3drojQG2VklrsIFvzOqKwwSv2mEMRmZeaMB w==; X-CSE-ConnectionGUID: 0QIKAWpmQ6KIzk2q7ONlfg== X-CSE-MsgGUID: 557UGuZhT/aa8eVdXv+XUw== X-IronPort-AV: E=Sophos;i="6.21,231,1763424000"; d="scan'208";a="8036550" Received: from ip-10-6-11-83.eu-central-1.compute.internal (HELO smtpout.naws.eu-central-1.prod.farcaster.email.amazon.dev) ([10.6.11.83]) by internal-fra-out-004.esa.eu-central-1.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2026 17:51:32 +0000 Received: from EX19MTAEUB002.ant.amazon.com [54.240.197.232:20138] by smtpin.naws.eu-central-1.prod.farcaster.email.amazon.dev [10.0.45.189:2525] with esmtp (Farcaster) id 3df24bb3-7aa4-4217-abc1-e8fb9f5e98f8; Fri, 16 Jan 2026 17:51:32 +0000 (UTC) X-Farcaster-Flow-ID: 3df24bb3-7aa4-4217-abc1-e8fb9f5e98f8 Received: from EX19D005EUB003.ant.amazon.com (10.252.51.31) by EX19MTAEUB002.ant.amazon.com (10.252.51.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Fri, 16 Jan 2026 17:51:30 +0000 Received: from [192.168.12.13] (10.106.82.9) by EX19D005EUB003.ant.amazon.com (10.252.51.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Fri, 16 Jan 2026 17:51:25 +0000 Message-ID: <98b8ea1e-3bdd-4987-8acc-58112076d451@amazon.com> Date: Fri, 16 Jan 2026 17:51:24 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 07/13] KVM: guest_memfd: Add flag to remove from direct map To: "Edgecombe, Rick P" , "kernel@xen0n.name" , "linux-riscv@lists.infradead.org" , "linux-s390@vger.kernel.org" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "kalyazin@amazon.co.uk" , "kvmarm@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "bpf@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-doc@vger.kernel.org" CC: "david@kernel.org" , "svens@linux.ibm.com" , "catalin.marinas@arm.com" , "palmer@dabbelt.com" , "jgross@suse.com" , "surenb@google.com" , "vbabka@suse.cz" , "riel@surriel.com" , "pfalcato@suse.de" , "x86@kernel.org" , "rppt@kernel.org" , "thuth@redhat.com" , "borntraeger@linux.ibm.com" , "maz@kernel.org" , "peterx@redhat.com" , "ast@kernel.org" , "Annapurve, Vishal" , "pjw@kernel.org" , "alex@ghiti.fr" , "dave.hansen@linux.intel.com" , "tglx@linutronix.de" , "hca@linux.ibm.com" , "willy@infradead.org" , "wyihan@google.com" , "ryan.roberts@arm.com" , "jolsa@kernel.org" , "yang@os.amperecomputing.com" , "jmattson@google.com" , "aneesh.kumar@kernel.org" , "luto@kernel.org" , "haoluo@google.com" , "patrick.roy@linux.dev" , "akpm@linux-foundation.org" , "coxu@redhat.com" , "mhocko@suse.com" , "mlevitsk@redhat.com" , "jgg@ziepe.ca" , "hpa@zytor.com" , "song@kernel.org" , "oupton@kernel.org" , "maobibo@loongson.cn" , "peterz@infradead.org" , "Liam.Howlett@oracle.com" , "lorenzo.stoakes@oracle.com" , "jhubbard@nvidia.com" , "martin.lau@linux.dev" , "jthoughton@google.com" , "Jonathan.Cameron@huawei.com" , "Yu, Yu-cheng" , "eddyz87@gmail.com" , "yonghong.song@linux.dev" , "chenhuacai@kernel.org" , "shuah@kernel.org" , "prsampat@amd.com" , "kevin.brodsky@arm.com" , "shijie@os.amperecomputing.com" , "itazur@amazon.co.uk" , "suzuki.poulose@arm.com" , "pbonzini@redhat.com" , "dev.jain@arm.com" , "yuzenghui@huawei.com" , "gor@linux.ibm.com" , "jackabt@amazon.co.uk" , "daniel@iogearbox.net" , "agordeev@linux.ibm.com" , "andrii@kernel.org" , "mingo@redhat.com" , "aou@eecs.berkeley.edu" , "joey.gouly@arm.com" , "derekmn@amazon.com" , "xmarcalx@amazon.co.uk" , "kpsingh@kernel.org" , "sdf@fomichev.me" , "jackmanb@google.com" , "bp@alien8.de" , "corbet@lwn.net" , "ackerleytng@google.com" , "jannh@google.com" , "john.fastabend@gmail.com" , "kas@kernel.org" , "will@kernel.org" , "seanjc@google.com" References: <20260114134510.1835-1-kalyazin@amazon.com> <20260114134510.1835-8-kalyazin@amazon.com> <294bca75-2f3e-46db-bb24-7c471a779cc1@amazon.com> <318407ba-ecb6-4691-8911-645fb8c20250@amazon.com> Content-Language: en-US From: Nikita Kalyazin Autocrypt: addr=kalyazin@amazon.com; keydata= xjMEY+ZIvRYJKwYBBAHaRw8BAQdA9FwYskD/5BFmiiTgktstviS9svHeszG2JfIkUqjxf+/N JU5pa2l0YSBLYWx5YXppbiA8a2FseWF6aW5AYW1hem9uLmNvbT7CjwQTFggANxYhBGhhGDEy BjLQwD9FsK+SyiCpmmTzBQJnrNfABQkFps9DAhsDBAsJCAcFFQgJCgsFFgIDAQAACgkQr5LK IKmaZPOpfgD/exazh4C2Z8fNEz54YLJ6tuFEgQrVQPX6nQ/PfQi2+dwBAMGTpZcj9Z9NvSe1 CmmKYnYjhzGxzjBs8itSUvWIcMsFzjgEY+ZIvRIKKwYBBAGXVQEFAQEHQCqd7/nb2tb36vZt ubg1iBLCSDctMlKHsQTp7wCnEc4RAwEIB8J+BBgWCAAmFiEEaGEYMTIGMtDAP0Wwr5LKIKma ZPMFAmes18AFCQWmz0MCGwwACgkQr5LKIKmaZPNTlQEA+q+rGFn7273rOAg+rxPty0M8lJbT i2kGo8RmPPLu650A/1kWgz1AnenQUYzTAFnZrKSsXAw5WoHaDLBz9kiO5pAK In-Reply-To: X-Originating-IP: [10.106.82.9] X-ClientProxiedBy: EX19D005EUA004.ant.amazon.com (10.252.50.241) To EX19D005EUB003.ant.amazon.com (10.252.51.31) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260116_095151_502658_586F24EA X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: kalyazin@amazon.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 16/01/2026 17:36, Edgecombe, Rick P wrote: > On Fri, 2026-01-16 at 17:28 +0000, Nikita Kalyazin wrote: >>> >>> I imagine this feature is really targeted towards machines running >>> a bunch of untrusted VMs, so cloud hypervisors really. In that case >>> the direct map will probably be carved up pretty quick. Did you >>> consider just breaking the full direct map to 4k at the start when >>> it's in use? >> >> That's an interesting point, I haven't thought about it from this >> perspective. We should run some tests internally to see if it'd >> help. This will likely change with support for huge pages coming in >> though. > > The thing is, those no_flush() helpers actually still flush if they > need to split a page. Plus if they need to clear out lazy vmalloc > aliases it could be another flush. There are probably a lot of > opportunities to reduce flushing even beyond pre-split. > > Just curious... as far as performance, have you tested this on a big > multi-socket system, where that flushing will hurt more? It's something > that has always been a fear for these directmap unmapping solutions Yes, this is a problem that we'd like to address. We have been discussing it in [1]. The effect of flushing on memory population that we see on x86 is 5-7x elongation. We are thinking of making use of the no-direct-map memory allocator that Brendan is working on [2]. [1] https://lore.kernel.org/lkml/d1b58114-9b88-4535-b28c-09d9cc1ff3be@amazon.com [2] https://lore.kernel.org/kvm/DDVS9ITBCE2Z.RSTLCU79EX8G@google.com > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv