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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 DA087C433ED for ; Thu, 6 May 2021 08:06:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D4E5613B5 for ; Thu, 6 May 2021 08:06:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D4E5613B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 372E56B006C; Thu, 6 May 2021 04:06:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 324076B006E; Thu, 6 May 2021 04:06:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19E2E6B0070; Thu, 6 May 2021 04:06:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id EF0BA6B006C for ; Thu, 6 May 2021 04:06:02 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9B17F6D78 for ; Thu, 6 May 2021 08:06:02 +0000 (UTC) X-FDA: 78110072964.17.6F26B3E Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf11.hostedemail.com (Postfix) with ESMTP id 87B882000250 for ; Thu, 6 May 2021 08:05:44 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14683olx094677; Thu, 6 May 2021 04:05:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=3RhGqUPDNAVBVUyGya4SEMYVyr4ykJfJiWGaJQtOOoc=; b=NKnGPb4vUYVRMKKCKE274baOYqIuh8fGlINHbkgl8kQPqcQ7+P8ohU0jE2Mx44ViJV/y eYvzJRTwBbRKAgUj6x/qOOv/lVcWbSSkiTI4ZRQdXEYpFCD/HAoyS4bLFrVZCYEPuyzh y0UYO/3o8yWTij4hbAC23Ij8f7jyJ1416kS2xZsdO+ylqbl8tCbgVHn75ARVWUzkdP0g +8GLNwKYRb6pWqw4EbX/7ZELFN6vAj8Gvhf33R6jOWb/50PfVYfJ3Zqao2HoFLg9Nmx2 Crurxlc6YGlPdSkeTln3+Wk8GfDyKloffFqRgPOxGdXhjdlVulV6rdRXpJgaJiIH59uJ MA== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 38cc07s2hv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 May 2021 04:05:44 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 1467vkZG005741; Thu, 6 May 2021 08:05:43 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma03wdc.us.ibm.com with ESMTP id 38bedra7v6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 May 2021 08:05:43 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14685gBD37093794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 May 2021 08:05:42 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 638807805E; Thu, 6 May 2021 08:05:42 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF9F878066; Thu, 6 May 2021 08:05:38 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.102.1.95]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 6 May 2021 08:05:38 +0000 (GMT) X-Mailer: emacs 28.0.50 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Dan Williams , Joao Martins Cc: Linux MM , Ira Weiny , linux-nvdimm , Matthew Wilcox , Jason Gunthorpe , Jane Chu , Muchun Song , Mike Kravetz , Andrew Morton Subject: Re: [PATCH v1 04/11] mm/memremap: add ZONE_DEVICE support for compound pages In-Reply-To: References: <20210325230938.30752-1-joao.m.martins@oracle.com> <20210325230938.30752-5-joao.m.martins@oracle.com> Date: Thu, 06 May 2021 13:35:35 +0530 Message-ID: <87zgx85ltc.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: D3F_Csp_rXbtTtpaqzXHFd37LY4TOwM9 X-Proofpoint-ORIG-GUID: D3F_Csp_rXbtTtpaqzXHFd37LY4TOwM9 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-06_06:2021-05-05,2021-05-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 clxscore=1011 mlxlogscore=999 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105060055 X-Rspamd-Queue-Id: 87B882000250 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=NKnGPb4v; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf11.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com X-Rspamd-Server: rspam04 X-Stat-Signature: wcrpgjmyk38b67hr9ykkp1fbdty4sc16 Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.158.5 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620288344-642522 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: IIUC this series is about devdax namespace with aligh of 1G or 2M where we can save the vmmemap space by not allocating memory for tail struct pages? Dan Williams writes: > > enum: >> > >> > enum devmap_geometry { >> > DEVMAP_PTE, >> > DEVMAP_PMD, >> > DEVMAP_PUD, >> > } >> > >> I suppose a converter between devmap_geometry and page_size would be needed too? And maybe >> the whole dax/nvdimm align values change meanwhile (as a followup improvement)? > > I think it is ok for dax/nvdimm to continue to maintain their align > value because it should be ok to have 4MB align if the device really > wanted. However, when it goes to map that alignment with > memremap_pages() it can pick a mode. For example, it's already the > case that dax->align == 1GB is mapped with DEVMAP_PTE today, so > they're already separate concepts that can stay separate. devdax namespace with align of 1G implies we expect to map them with 1G pte entries? I didn't follow when you say we map them today with DEVMAP_PTE entries. -aneesh