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 AB44FC43334 for ; Tue, 12 Jul 2022 09:42:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FF3A94005C; Tue, 12 Jul 2022 05:42:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AF0A940033; Tue, 12 Jul 2022 05:42:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A09494005C; Tue, 12 Jul 2022 05:42:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 06845940033 for ; Tue, 12 Jul 2022 05:42:27 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id CDD38345A9 for ; Tue, 12 Jul 2022 09:42:26 +0000 (UTC) X-FDA: 79677957492.26.10B85ED Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 1D65018006B for ; Tue, 12 Jul 2022 09:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657618945; 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=LHc9MtW3MpTbcWhi1sxVPwEBJ3eEKCTv5StxjykVBMmhwJeBPAD3xbmjSJiZgOlqN37/oU 3nxmx166TAVUaWMGvuoahrMisXGJylVj+RZvoETwjPaZYXu1wuuZ/SDEzJHdr+813vkd8w HFb/F34N5SSlYDWAdXJsTrEUIiH/0s4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-166-9By6njD4O4mX0RRFDXRf9g-1; Tue, 12 Jul 2022 05:42:22 -0400 X-MC-Unique: 9By6njD4O4mX0RRFDXRf9g-1 Received: by mail-wm1-f69.google.com with SMTP id c126-20020a1c3584000000b003a02fa133ceso3916384wma.2 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=Uc0JHmxulbRnVJZqxj4zOD8gn5WQqWUwB8X0xMZkeAoNUkDTnVLsAu7vAw4XwSzTLm 4KrG0Z5UdvmFPQXobZaIk2pGKSgfV3pKFRizLXNkCwqoQg2KCS/E/rznJ05t6LwrFgeN 93wJ7+XdCxlhn5E8lFA+slIV8J8NTlHTg5cOYx27a4WWDh8OmcMXQhZu3sJlOXiqEAVG DVxFtk2ftodxuQv2fBAPv2XZUxGGpt0x4k8ZkbjSXaJaN4y11NBglsoVJ2s0lOKSlnml 4/H4+MMcl4PjxPzcegc88pJopBXZDY+Is023kVk/h6wPwud0xPFEN+h+WoJI8FcTHMZ2 IdLA== X-Gm-Message-State: AJIora9IUyoUo93aFGp0oUdaycUCy8KFT2ucvXo6m1NPSLSFiADfnLI6 ER1KdVyw74V3RycrVxZhm0rU1WtaaCRdKuzWmbT+nCWFr8VSVy5qOoebQeNLddqjVx8FLX/J6az 2OobxWl38ekg= X-Received: by 2002:a05:600c:4e46:b0:3a0:4d54:f206 with SMTP id e6-20020a05600c4e4600b003a04d54f206mr2908874wmq.151.1657618940783; Tue, 12 Jul 2022 02:42:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sgx991HbkiZPJ1PNsHKsL1oWmyidAW6KRg0e3oHpBWv+mkF3kIotAWvxgvTmDn4jRJMMJNkA== 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 In-Reply-To: User-Agent: Mutt/2.2.6 (2022-06-05) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657618946; a=rsa-sha256; cv=none; b=NsKLu/6AefdvbrP65wkBZBnNUDWqSt7kHWIVkQ3x/Sr4laZcFeenFLKieIfku6ujr8Cj3g a0Ce7DM1vKtG8CkVCKBHqKS89DLPezH8Kfj7RmYIvCfLlpYn3YX8JfdDvz+vep53ISBfml 4dCAyUAQ/TttxUnwbdHqYhFrpr0XMx0= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LHc9MtW3; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf24.hostedemail.com: domain of dgilbert@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=dgilbert@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657618946; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=chy9YCC5lBd8JptEcagLbkkuoAuuLmyVkbW6SdDedrQ=; b=gRyjZ86hiHzQov8Uw2smg4IvwVyyIfHzfbNjol5SGki2rb2wjHEdWfSlVDsUU8TiIb7386 JEIRojHzyPhKvJZQ0uvJ2HH1K0x5XUr2ZFt08MQbNZQC38YiTA1FVFb6Wf3Yz23jTwMtSe LmgSaao49+XY8UELJRg1VVDZXjbE9RA= X-Stat-Signature: 59pc46dog7rf4wmnphtbp4nazbmpm9mz Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LHc9MtW3; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf24.hostedemail.com: domain of dgilbert@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=dgilbert@redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1D65018006B X-Rspam-User: X-HE-Tag: 1657618945-865327 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * 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