Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4148399imw; Tue, 12 Jul 2022 02:50:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDQWESf7bFg1OzZb/kHekxnl4CVDZNJgOYfYjuERa1TLDnYfPc6hZMZHn2cUzn1w/69GVg X-Received: by 2002:a17:906:5a51:b0:72b:5cdf:ed77 with SMTP id my17-20020a1709065a5100b0072b5cdfed77mr7418134ejc.505.1657619401487; Tue, 12 Jul 2022 02:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657619401; cv=none; d=google.com; s=arc-20160816; b=nLueW2Ubp4jhFxvGcnaYDXqVoigfIMhu/p2EHUK67p8cN2cIRPDFYgJBbchgDhXArE LJsjEj5GbLQlrg8l8AgxnzFXSrqkw68uW2DUn3xg3UGz9DHWg8IH6vZHMyIjGVpmVkUR 9box+nrEbJ6+so/fcMM7GXANKf8STN0rt3CpSpxx4U3nohimuy1RP9C/X3V9V/LNVpDw fgvNVVW1R3uyxXhX2DdF4Jb0lB39GyQ945XHVu7dwABh5qI2vgmeoBBPYttvNTUB9Bds L7p6sqRT4eo80SGCeA4V7fqSslGwVf/Vn/yX6yxODH24wsGqCfvNd7C2lgdqlPlsKIUc SAlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=chy9YCC5lBd8JptEcagLbkkuoAuuLmyVkbW6SdDedrQ=; b=TauwQbov1eZuvEvrHf6OLigEUftbsaSkPqcN6WpgtyBsse2AEhVQ+waB0bJ4mGHpul TiAna2Xc15+WkkYsUm9EHkGKEqvbnBzdDCztNqL//ljJSBjWdtllmAuv6J0ifB2gm+Vj hyiPQ+FxpTLaWVBmjd4BCO0TVNhNdLJTqgR5HU9jKpCHbLjML5WUydSRB9IHeq5znfeo dkX3IH/SxVAgN8TBwLKhkS72K53LuNWVit6dNO6WyIBre1v0BQsUXLEw7FO8im0+PPCH rKcl0Dz6386CV+0v1VxYud+x0xzXwWjsYH78ro0NriuoTuiglONLtPKpnn124kMyON89 hNtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U+etQ5mC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du9-20020a17090772c900b00711bd5bbe4bsi14820590ejc.585.2022.07.12.02.49.33; Tue, 12 Jul 2022 02:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U+etQ5mC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232677AbiGLJm0 (ORCPT + 99 others); Tue, 12 Jul 2022 05:42:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232329AbiGLJmY (ORCPT ); Tue, 12 Jul 2022 05:42:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2DD72A4390 for ; Tue, 12 Jul 2022 02:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657618943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=chy9YCC5lBd8JptEcagLbkkuoAuuLmyVkbW6SdDedrQ=; b=U+etQ5mC2AOF6wWU00P3uG4irz0Rlygjx98a3SO2orzy+g2mqq3zZHOLSL5KQfOiS2oUFf iEOeiWKvhJlf3Z1N5XJt5cgqCBFVL4dcGaBqxoSf3bpe88AmNJKoWGE3GscCGO5ip+6Hfr RJA7PTFMwAxihzqmWCEgdQVCIbBPmOs= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-581-sPRH-AEnNSW2Aowta68EKA-1; Tue, 12 Jul 2022 05:42:21 -0400 X-MC-Unique: sPRH-AEnNSW2Aowta68EKA-1 Received: by mail-wr1-f70.google.com with SMTP id k26-20020adfb35a000000b0021d6c3b9363so1238616wrd.1 for ; Tue, 12 Jul 2022 02:42:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=chy9YCC5lBd8JptEcagLbkkuoAuuLmyVkbW6SdDedrQ=; b=kjhbNh4e2b+VOvoWD7AYCV5bTjewK7qqB57X4QWxIviLFLLznncHOz73NaUib5SSC5 xD2Kt2+dOPcwFAgQh6vaZ3IiUVMogDmCZZ/YD9m371ml/sOlalqCpjfKsfUmXrnD5sJK EfQjuzVeKbxRSEoQRzNoUVEjfy3ftXPYYowJjsT5yB5hjsNqRqXHNRX9W8iI0zXWK2Kj gxYudYl5BVaMgTgXHdlENQpwqf8rJ4LlW6DBqRMNUMVZDujtc3NEMHNqwTWopJ5i7o86 cPFXuAx4XJoxVosv7I11pYKQLjssYQTseYseC66Y6Sz7RWfgmlQIakl+kFAMfU2D0uk+ SYEw== X-Gm-Message-State: AJIora/AzZAup9/o7tQq5zgUftWnNZCEiqfGUI+mp1BmWt9WzIc9TXl+ PjBgCoUP9JkymkEnzPayY/ZP7l4parQY8jt4kUAhqSwgUZ3rlvbnx+XdU8BEqxXIWvAl6zxZfzB kAAZeJzoZF8g188xyCDa8zUaH X-Received: by 2002:a05:600c:4e46:b0:3a0:4d54:f206 with SMTP id e6-20020a05600c4e4600b003a04d54f206mr2908863wmq.151.1657618940701; Tue, 12 Jul 2022 02:42:20 -0700 (PDT) X-Received: by 2002:a05:600c:4e46:b0:3a0:4d54:f206 with SMTP id e6-20020a05600c4e4600b003a04d54f206mr2908847wmq.151.1657618940539; Tue, 12 Jul 2022 02:42:20 -0700 (PDT) Received: from work-vm (cpc109025-salf6-2-0-cust480.10-2.cable.virginm.net. [82.30.61.225]) by smtp.gmail.com with ESMTPSA id e15-20020a5d500f000000b0021d905477dfsm7698509wrt.86.2022.07.12.02.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 02:42:19 -0700 (PDT) Date: Tue, 12 Jul 2022 10:42:17 +0100 From: "Dr. David Alan Gilbert" To: Mike Kravetz Cc: James Houghton , Muchun Song , Peter Xu , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Jue Wang , Manish Mishra , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 07/26] hugetlb: add hugetlb_pte to track HugeTLB page table entries Message-ID: References: <20220624173656.2033256-1-jthoughton@google.com> <20220624173656.2033256-8-jthoughton@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.6 (2022-06-05) X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mike Kravetz (mike.kravetz@oracle.com) wrote: > On 06/24/22 17:36, James Houghton wrote: > > After high-granularity mapping, page table entries for HugeTLB pages can > > be of any size/type. (For example, we can have a 1G page mapped with a > > mix of PMDs and PTEs.) This struct is to help keep track of a HugeTLB > > PTE after we have done a page table walk. > > This has been rolling around in my head. > > Will this first use case (live migration) actually make use of this > 'mixed mapping' model where hugetlb pages could be mapped at the PUD, > PMD and PTE level all within the same vma? I only understand the use > case from a high level. But, it seems that we would want to only want > to migrate PTE (or PMD) sized pages and not necessarily a mix. I suspect we would pick one size and use that size for all transfers when in postcopy; not sure if there are any side cases though. > The only reason I ask is because the code might be much simpler if all > mappings within a vma were of the same size. Of course, the > performance/latency of converting a large mapping may be prohibitively > expensive. Imagine we're migrating a few TB VM, backed by 1GB hugepages, I'm guessing it would be nice to clean up the PTE/PMDs for split 1GB pages as they're completed rather than having thousands of them for the whole VM. (I'm not sure if that is already doable) Dave > Looking to the future when supporting memory error handling/page poisoning > it seems like we would certainly want multiple size mappings. > > Just a thought. > -- > Mike Kravetz > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK