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 3A98DC636D6 for ; Mon, 20 Feb 2023 23:51:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE27D6B0071; Mon, 20 Feb 2023 18:51:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A923D6B0072; Mon, 20 Feb 2023 18:51:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 959E56B0073; Mon, 20 Feb 2023 18:51:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 874EA6B0071 for ; Mon, 20 Feb 2023 18:51:25 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4D82A1405A7 for ; Mon, 20 Feb 2023 23:51:25 +0000 (UTC) X-FDA: 80489319330.25.0C395FB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf20.hostedemail.com (Postfix) with ESMTP id BD7E01C0018 for ; Mon, 20 Feb 2023 23:51:22 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ei1vkWXG; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of gshan@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=gshan@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676937083; h=from:from:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ysA4d6asbLotF/NBMMSyu1RVF9jhYd61LOdX1PFSEwY=; b=HrUBkeDPcjQh/iqNaFjtmbtWz6m7ZeQRjcBc7bGWrqTlqDwHTvGWi6kEGG7GpoYiDVxfM7 Rjy31qFMtct+ab6MedWog2LXKpq+dbFncKk73zFTOqRebhSMUAza83qY1x5+s+dbDd4zUd 7nCzYAi3ZzDy9zKI64OEaaISMk4qIgs= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ei1vkWXG; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of gshan@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=gshan@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676937083; a=rsa-sha256; cv=none; b=5S+YJ7CMGhgdShPVVLOgsOPDLPGJFr/vP2Rjyzp/tYZcVai+azKa08KInwO30yz4LVuiKG eNVnLykGdjnKBnOYQxtRBgX5ViJ8XVivojCjJoatQzt5qB/fsDqHdb/O2MYA5vgF/HDPg3 st0d6Eyw84XSzY8fmRg8J+V8fqjTlZI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676937082; h=from:from:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ysA4d6asbLotF/NBMMSyu1RVF9jhYd61LOdX1PFSEwY=; b=Ei1vkWXGMpeRslbKmlDw3XVRHYusmRIHDDmdBuKNJx8S0cGS9dkKMaE9MREjFjvlvzzpQw aLmj3qYcEUMXBx+8tnGWFqb5K5YbejRUh7ok2hg30cWfdC7ppad9ZF14i/FVb4isSX2Jvt 3foGVTvDXTpMJA1Jn+HVmQrtG4s0gEg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-247-TbeKrkCRPM-UbvKxNNjk9w-1; Mon, 20 Feb 2023 18:51:20 -0500 X-MC-Unique: TbeKrkCRPM-UbvKxNNjk9w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BB6C29ABA09; Mon, 20 Feb 2023 23:51:20 +0000 (UTC) Received: from [10.64.54.62] (vpn2-54-62.bne.redhat.com [10.64.54.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 394862026D4B; Mon, 20 Feb 2023 23:51:17 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [LSF/MM/BPF TOPIC] Virtual Machine Memory Passthrough To: Pasha Tatashin , lsf-pc@lists.linux-foundation.org Cc: linux-mm References: From: Gavin Shan Message-ID: Date: Tue, 21 Feb 2023 10:51:09 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BD7E01C0018 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: cjwypoi3ghw7k9ydxwa3axyoe86eyney X-HE-Tag: 1676937082-563312 X-HE-Meta: U2FsdGVkX18JYEo0W8ey+geo4UkHTHtay7zASYcNbc3IJo7y6D+gaVCXHXXr2cGG+X/3WV+/R/C48HL7vqGC9at3rhruCYvnk4uGgNrLD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GOz+v6sEyNfnxwIp32CxPEXS8auI5qGFhBoftTKuaAAayHcPzmb2R3KHkT2PaAfgLmz7lXTjrqNZ7qliKMo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Pasha, On 2/21/23 3:31 AM, Pasha Tatashin wrote: > > As a part of an ongoing work of replacing some containerized work load > with virtual machines within Google, I have worked on making the > memory translations faster. > > I would like to propose the following topic for this year's LSF/MM/BPF: > > Discuss a set of techniques that can improve the guest performance, > memory footprint overhead, observability, and manageability of virtual > machines by hypervirtualizing the guest memory to the extreme. The end > goal is to allow very lightweight virtual machines to be closer in > performance to the containers. > > The following items are going to be discussed in this topic: > - Reducing the cost of SLAT page table translations. > - Reducing the memory footprint overhead. > - Reducing the memory management overhead. > - Increasing the observability of guest memory. > It's all about to understand the problem and possible solution or directions. I googled for 'SLAT' and direct me to x86's EPT. ARM64 has similar thing called stage-2 page table. The usual way to reduce page table translation cost is to map the contiguous memory through PUD/PMD. I'm not sure if there are other solutions we're heading for? Guest's memory is usually backed up by virtual memory area (VMA), which is either a anonymous or hugetlb region. As I understand, the page fault handling is excessive to populate the requested memory. I'm not sure if reducing the memory management overhead is to get it faster, or something else? :) Thanks, Gavin