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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD30C433FE for ; Tue, 8 Dec 2020 17:40:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6EC1423B32 for ; Tue, 8 Dec 2020 17:40:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EC1423B32 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E07BF6B005D; Tue, 8 Dec 2020 12:40:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB75F6B006C; Tue, 8 Dec 2020 12:40:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCD806B0073; Tue, 8 Dec 2020 12:40:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id B2ECF6B005D for ; Tue, 8 Dec 2020 12:40:43 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 68ED93625 for ; Tue, 8 Dec 2020 17:40:43 +0000 (UTC) X-FDA: 77570829966.03.slope60_101326a273e8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 50B7728A4ED for ; Tue, 8 Dec 2020 17:40:43 +0000 (UTC) X-HE-Tag: slope60_101326a273e8 X-Filterd-Recvd-Size: 4883 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Dec 2020 17:40:42 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B8Hdshc028754; Tue, 8 Dec 2020 17:40:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=2h/jbAMZdG4bZiUM0MvKFhVrphOCNaDgfXC+uprxVV4=; b=cAhWN4g5Qcw59uPWcR+uvmJjxgnJK4keGBTFoaJRuwzvCkZPL1jBkl9pj4fP3EXD0kCT 0IW/0IgjLkcr6lt/V9D5sJEsWWyFKGiC/S8jFCaRYrccRNhZ8D1lOqt6MeqCHeSB9dy8 UxoKp9AeCtpnucdQGMKvRdbPtJCFC2Lo4fs3F2nWRFDkKXmfxc87UMG27aIskY7kOQ32 0Pd6RzqRlFTXipBfbQcVC6KDA9B7k2/FMkKWOAp9q4nChnQ2q5ytV+FN+n3Ubqcs0mVc VUoD8WXgQc0j9m7rWid5QAmG8gx8ZBHzNTq55t2wYkdKe6T0clfxUARnf+Kght7XQgOz Jg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 3581mqv1fg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 08 Dec 2020 17:40:37 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B8HaVmH036915; Tue, 8 Dec 2020 17:38:36 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 358m3y2r0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Dec 2020 17:38:36 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0B8HcZSo009086; Tue, 8 Dec 2020 17:38:35 GMT Received: from [192.168.1.67] (/94.61.1.144) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 08 Dec 2020 09:38:35 -0800 Subject: Re: [PATCH RFC 3/9] sparse-vmemmap: Reuse vmemmap areas for a given mhp_params::align To: linux-mm@kvack.org Cc: Dan Williams , Ira Weiny , linux-nvdimm@lists.01.org, Matthew Wilcox , Jason Gunthorpe , Jane Chu , Muchun Song , Mike Kravetz , Andrew Morton References: <20201208172901.17384-1-joao.m.martins@oracle.com> <20201208172901.17384-4-joao.m.martins@oracle.com> From: Joao Martins Message-ID: Date: Tue, 8 Dec 2020 17:38:31 +0000 MIME-Version: 1.0 In-Reply-To: <20201208172901.17384-4-joao.m.martins@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=3 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080108 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 mlxlogscore=999 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 impostorscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080109 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: On 12/8/20 5:28 PM, Joao Martins wrote: > Introduce a new flag, MEMHP_REUSE_VMEMMAP, which signals that that > struct pages are onlined with a given alignment, and should reuse the > tail pages vmemmap areas. On that circunstamce we reuse the PFN backing > only the tail pages subsections, while letting the head page PFN remain > different. This presumes that the backing page structs are compound > pages, such as the case for compound pagemaps (i.e. ZONE_DEVICE with > PGMAP_COMPOUND set) > > On 2M compound pagemaps, it lets us save 6 pages out of the 8 necessary > PFNs necessary to describe the subsection's 32K struct pages we are > onlining. On a 1G compound pagemap it let us save 4096 pages. > > Sections are 128M (or bigger/smaller), and such when initializing a > compound memory map where we are initializing compound struct pages, we > need to preserve the tail page to be reused across the rest of the areas > for pagesizes which bigger than a section. > > Signed-off-by: Joao Martins Sigh, ignore this one. I mistakenly had stashed an old version of this patch, and wrongly send it up. Joao