Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3012670rwb; Wed, 30 Nov 2022 14:08:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JXxBEvGLMoBadZlacZaBHP+RpBscj6ASa8s+koYlok0PfB8YYdE4y8lShiCrfwskKRZjT X-Received: by 2002:a17:902:f2c5:b0:189:5367:7f78 with SMTP id h5-20020a170902f2c500b0018953677f78mr36273635plc.8.1669846119905; Wed, 30 Nov 2022 14:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669846119; cv=none; d=google.com; s=arc-20160816; b=o1q+UY7kZNUvX+0mwsGSySirdQ8DOaVkgcIuzOqt5FFZAyxGtMfja09Hn4rkmTjuWd tqd21tuFEnTryhzN/1LQrVfTWqKR/i8NfyQnFYIVx7TWQF2y/FwSfPFTkJfWkqvABOMM /swqHalQ1HSGxPAqQxyvntvRTbz6qdDpKHhReWIJUv1dZmGhIVgznao3ZtfuRsvmdrXX RkH7iqlG5RG70VF3HtssTqZV1qhXiilPYFJOGX5CtK0/VsJ+8qcZFq0y6K1xqEZ/cUT2 dkD8hFwb+eg2WneljNB10goB/oIlwlzs1DMnKAX5ydY0tNXYXOSCE6C+BFQt1nZLHz6w 3Q3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x59hIThm5V0QLAqU1m85qGxeISVduxBHI6pskPD5vjI=; b=UzMerGkr6nXZFs4NxDKyx3thf2Gp3/27LPRLgGGEI3g5cA/PPMT44ve4vIAIawyP3H 8P98p3lOeHqUYl0rzwgvfJD9EuLK6dGX4UMlJWQTGDBqcBaHTQCdjoxfqafxUuxeTjgb fzRIuTRcKy+xBc7EUsxOzJE3XXdrv3TaZTYyRwcYtaMD0Fye6tIri8TBabMYPlnotQST GUHKSP8zanM2Uoc8rf+qVJcaMpnFP8KtqLG4Gro5yJUqSuOLjSm8PH0JZZVpJGp4uwuR 3He3domxK5k2gpc+Tkb48he6jzRrlHa3Hw7B8XVB+r08pMj5SlrnDYdxJx0PbwoPa5iU Q6Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JKQru86o; 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 f23-20020a635117000000b00476ca041d89si2279452pgb.790.2022.11.30.14.08.29; Wed, 30 Nov 2022 14:08:39 -0800 (PST) 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=JKQru86o; 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 S229580AbiK3VdG (ORCPT + 83 others); Wed, 30 Nov 2022 16:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiK3VdE (ORCPT ); Wed, 30 Nov 2022 16:33:04 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CBFB900E7 for ; Wed, 30 Nov 2022 13:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669843930; 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=x59hIThm5V0QLAqU1m85qGxeISVduxBHI6pskPD5vjI=; b=JKQru86oosN9VwlWMJSN++p2bJc+fu8QRGKphGmNOMQpBOq1LyGsJ7QlSg66F6C24V0K+b kBN4wXNM0ZHWPJJUGkwSCTR24BNMlIyHAWjEmEhCPeUrTFWuQctlEftgCuyxeG7X+B8YZo fRUmg+VnN5f/aK3GZDot2lSCLm5F+wk= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-562-4xLk2rwZNeSWxk46c01NcA-1; Wed, 30 Nov 2022 16:32:08 -0500 X-MC-Unique: 4xLk2rwZNeSWxk46c01NcA-1 Received: by mail-qv1-f72.google.com with SMTP id u15-20020a0cec8f000000b004c704e015f7so73663qvo.1 for ; Wed, 30 Nov 2022 13:32:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=x59hIThm5V0QLAqU1m85qGxeISVduxBHI6pskPD5vjI=; b=54YOY95fiQ2MwkYmgWDOCkQX85LfzoJzr2fd6aP/lNDtLRTQycJxI/b7p31DNLbgHL 7t4gfRw0xR1cuKJVB2UrKJk6ebY/nepQ3qcpp9YGUEs21RcYSCzs+2pVBXu//UP72CJq qLRmcEbODXGDiWZr0dr4SqkdE3LWBUZWZp4EhnUhw0Gy6tY698TmD2I3LxHeZy4Z8mQm zys9bQDZAiCiXFaazqG/5nIrAGUkqwXUSeR3xJzI+YVPDvHdTG6BzJo5fNl6inepy2fL RQrQYMqsi5l+3wu/r9T0UsvG+tHSmMkXczUlffAYfhk4jTNy7Df8uqg+es/TQkJqsiJ9 k1FQ== X-Gm-Message-State: ANoB5pl1ZB37NoNpqw/Pf4aZd1zuNl8yPm+B82dBowLGrpvFqPU3n2xk ns6vRQqdPuARA3bobtEGYjz+0WR09fEHaoKuULOEzP/EeB8HohD07NY3bTnfwC7x2zf+XH3xIgb hmxjOJWyvD04aLvLn9swnZ5UD X-Received: by 2002:a37:5e84:0:b0:6ef:419:74d8 with SMTP id s126-20020a375e84000000b006ef041974d8mr55618160qkb.725.1669843927782; Wed, 30 Nov 2022 13:32:07 -0800 (PST) X-Received: by 2002:a37:5e84:0:b0:6ef:419:74d8 with SMTP id s126-20020a375e84000000b006ef041974d8mr55618130qkb.725.1669843927526; Wed, 30 Nov 2022 13:32:07 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-46-70-31-27-79.dsl.bell.ca. [70.31.27.79]) by smtp.gmail.com with ESMTPSA id h19-20020ac85153000000b003a6328ee7acsm1459189qtn.87.2022.11.30.13.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 13:32:07 -0800 (PST) Date: Wed, 30 Nov 2022 16:32:05 -0500 From: Peter Xu To: James Houghton Cc: Mike Kravetz , Muchun Song , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Zach O'Keefe , Manish Mishra , Naoya Horiguchi , "Dr . David Alan Gilbert" , "Matthew Wilcox (Oracle)" , Vlastimil Babka , Baolin Wang , Miaohe Lin , Yang Shi , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 25/47] hugetlb: add HGM support for copy_hugetlb_page_range Message-ID: References: <20221021163703.3218176-1-jthoughton@google.com> <20221021163703.3218176-26-jthoughton@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221021163703.3218176-26-jthoughton@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 On Fri, Oct 21, 2022 at 04:36:41PM +0000, James Houghton wrote: > This allows fork() to work with high-granularity mappings. The page > table structure is copied such that partially mapped regions will remain > partially mapped in the same way for the new process. > > A page's reference count is incremented for *each* portion of it that is > mapped in the page table. For example, if you have a PMD-mapped 1G page, > the reference count and mapcount will be incremented by 512. > > Signed-off-by: James Houghton I have a feeling that this path is not triggered. See: bcd51a3c679d ("hugetlb: lazy page table copies in fork()", 2022-07-17) It might be helpful to have it when exploring private mapping support of hgm on page poison in the future. But the thing is if we want this to be accepted we still need a way to test it. I just don't see how to test this without the private support being there.. -- Peter Xu