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 5D484C4321E for ; Wed, 30 Nov 2022 21:32:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75B916B0071; Wed, 30 Nov 2022 16:32:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 70B2D6B0073; Wed, 30 Nov 2022 16:32:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D2B86B0074; Wed, 30 Nov 2022 16:32:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 51BC76B0071 for ; Wed, 30 Nov 2022 16:32:11 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BE38F1A11EC for ; Wed, 30 Nov 2022 21:32:10 +0000 (UTC) X-FDA: 80191406820.24.ABB70EA Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id F1B3A100007 for ; Wed, 30 Nov 2022 21:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669843929; 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=N1/4r1xxjOGPfz4KqA2wTijL/Pwv4r/Zai2FRofusiX09E015TTNceWycfoQlGjRu8Zvle vaV/uw2kA52efXZDc9sREdKrUQy9UvIz7UVQtjK0IbtnBnXwQ+Vgld7J9zJb5wN/vwf+EP +eBPma3yWz24P/srv4QH1WrTzrU2VCo= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-460-Xz7J4pT8NRSWKm5iD3ApaA-1; Wed, 30 Nov 2022 16:32:08 -0500 X-MC-Unique: Xz7J4pT8NRSWKm5iD3ApaA-1 Received: by mail-qt1-f199.google.com with SMTP id f4-20020a05622a114400b003a57f828277so32089122qty.22 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=nsR2OqmFlpPZVaIQUPvU5EiO4z3JFJTc9gpDO1fdpH5FT5rpPYcIQc9bHiXK2K5kNu L6BiOPirPb5leRIVxUeZe6n67u3ZWjeincP1faC4JbegWyy+VPkd+XKMKkD9FZYHY6CF a82abquhSiZ1CgYeC+TH/9f3xPm69+/EAlCWGU6D3sr3TgXTM802cOb1VJkf82mMWavO kut1emHtVrBEnEgVqrKRUcuEofZauaMZ+rSVR4bW/dwM+/alY7YPdR49uMPf1gTuVdKU iLCk9qT7z18ufsNmtenSSsh+fP7aRjzzNMdYtZAk9tEZXCXMsjbhM0KT0UQpjCcdfnMA d1tw== X-Gm-Message-State: ANoB5pmZiW5fWGOxgC7/mpicv0N6fwz0KqssaJYaj3eKDBmMAP4CSeX+ /VdKp+Xyj9Arx+bub9MdrCiFebvliZ4NgWbtySgr9uxfBTfEvCDg793R3Vh/LVJ/XahthEccgpl U7vkrjy0NVqE= X-Received: by 2002:a37:5e84:0:b0:6ef:419:74d8 with SMTP id s126-20020a375e84000000b006ef041974d8mr55618153qkb.725.1669843927781; Wed, 30 Nov 2022 13:32:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf658zMR05fVIwmRQxhkPO+eZyx0BLxFwNGIqOQNpw9c7ja9gRDgVEySEL6AavvDf3AxrhcHzQ== 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 In-Reply-To: <20221021163703.3218176-26-jthoughton@google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669843930; a=rsa-sha256; cv=none; b=v1ZM5eGsZyVhLBBLmp0gOl36nBd9LYFSIfnVYEAGwmW5tGcQWwuzajCWrJw2TJ6Sr9VpD0 8pcq/5ycIqDhwWh9EAC3/XqzyFyAKtVYHqSly+ztgV6YTT5ycaSkA7ftDe6wDO6+DLB1Jd 2CZ/Bl9b2q18hown8SnVUUZmH3mbTj4= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="N1/4r1xx"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669843930; 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=x59hIThm5V0QLAqU1m85qGxeISVduxBHI6pskPD5vjI=; b=4xJ6cmrVHUE4CfSPathkWJXlrKho5p9OjiN3ncgt19DOL9xJIxd8BiIxeYYnLllRPmHwkY 5q4fBHZ5X9a/LTSi5ZsJlLxP9odkrlpgAen46we23W0Edq26fBrDCAPzlM0+s6Xe18YQfG pHDrXceZbDqQe0UWJFuTa8ZSkZJc0yY= X-Rspamd-Queue-Id: F1B3A100007 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="N1/4r1xx"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com X-Rspamd-Server: rspam12 X-Rspam-User: X-Stat-Signature: cxr1xq6ckpnhjoirkpqe49d6j1dekcs8 X-HE-Tag: 1669843929-693860 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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