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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 71CCDC433FE for ; Wed, 9 Dec 2020 17:28:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 07EC023AA8 for ; Wed, 9 Dec 2020 17:28:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07EC023AA8 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 277DE8D002B; Wed, 9 Dec 2020 12:28:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 227848D002A; Wed, 9 Dec 2020 12:28:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EFAC8D002B; Wed, 9 Dec 2020 12:28:11 -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 EA4028D002A for ; Wed, 9 Dec 2020 12:28:10 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AFC971EE6 for ; Wed, 9 Dec 2020 17:28:10 +0000 (UTC) X-FDA: 77574427140.21.cork31_5312736273f1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 857C0180442C4 for ; Wed, 9 Dec 2020 17:28:10 +0000 (UTC) X-HE-Tag: cork31_5312736273f1 X-Filterd-Recvd-Size: 4959 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Dec 2020 17:28:09 +0000 (UTC) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B9HPL8V116800; Wed, 9 Dec 2020 17:28:04 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=CKOmHdzJAQLppGXuLuUYLdCo8cZUm9ZP9GGvWeHeNqg=; b=zJitd/2UNu+ooYi8jHPPVJlJnqMnaadeEzjWkRD2YtW2/oZ/cu48H9jLRDibs/Y7tkBV /2W4CsmXujyGhUdz2+LvkB1Cl0MW+iy2/XO6mrahPBYIv3dS64F+rNw+vCF1SnIFS+AE LlofyNoi+CF9Enpq58fRwifyuvgMy2ohq2OOBoaG6+3KYKO/cKVVjmd+Snu1Z2OGxgc6 3IBI94oIwigL54m57pCLTFUXJTadQtK5iGrOm28MHWW4M36HGZDSUupN9oVZM+wfM8of fSyNOGNwJzRBXUUiKmyZg2pPIPYzlaad+WctmnHNwu3uFHmBR9gmW4tmivfusTO6U9JS uQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 35825m9dht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 09 Dec 2020 17:28:04 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B9HJl2m075657; Wed, 9 Dec 2020 17:28:03 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 358m50wp5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 09 Dec 2020 17:28:03 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0B9HS17g020576; Wed, 9 Dec 2020 17:28:01 GMT Received: from [10.175.160.66] (/10.175.160.66) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Dec 2020 09:28:01 -0800 Subject: Re: [PATCH RFC 6/9] mm/gup: Grab head page refcount once for group of subpages To: Jason Gunthorpe Cc: linux-mm@kvack.org, Dan Williams , Ira Weiny , linux-nvdimm@lists.01.org, Matthew Wilcox , Jane Chu , Muchun Song , Mike Kravetz , Andrew Morton References: <20201208172901.17384-1-joao.m.martins@oracle.com> <20201208172901.17384-8-joao.m.martins@oracle.com> <20201208194905.GQ5487@ziepe.ca> <20201209151505.GV5487@ziepe.ca> <20201209162438.GW5487@ziepe.ca> From: Joao Martins Message-ID: <3f2ce09a-03b4-6c36-0ea0-7635ec15bf05@oracle.com> Date: Wed, 9 Dec 2020 17:27:57 +0000 MIME-Version: 1.0 In-Reply-To: <20201209162438.GW5487@ziepe.ca> 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 mlxscore=0 spamscore=0 suspectscore=1 bulkscore=0 malwarescore=0 phishscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012090122 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 mlxscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012090123 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000023, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/9/20 4:24 PM, Jason Gunthorpe wrote: > On Wed, Dec 09, 2020 at 04:02:05PM +0000, Joao Martins wrote: > >> Today (without the series) struct pages are not represented the way they >> are expressed in the page tables, which is what I am hoping to fix in this >> series thus initializing these as compound pages of a given order. But me >> introducing PGMAP_COMPOUND was to conservatively keep both old (non-compound) >> and new (compound pages) co-exist. > > Oooh, that I didn't know.. That is kind of horrible to have a PMD > pointing at an order 0 page only in this one special case. > > Still, I think it would be easier to teach record_subpages() that a > PMD doesn't necessarily point to a high order page, eg do something > like I suggested for the SGL where it extracts the page order and > iterates over the contiguous range of pfns. > /me nods > This way it can remain general with no particularly special path for > devmap or a special PGMAP_COMPOUND check here. The less special paths the better, indeed. Joao