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=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E37D6C432C1 for ; Wed, 25 Sep 2019 03:51:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ADB0820665 for ; Wed, 25 Sep 2019 03:51:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADB0820665 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 626DB6B026C; Tue, 24 Sep 2019 23:51:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D6FE6B026D; Tue, 24 Sep 2019 23:51:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51FF66B026F; Tue, 24 Sep 2019 23:51:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id 2F99B6B026C for ; Tue, 24 Sep 2019 23:51:10 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id DE0368147 for ; Wed, 25 Sep 2019 03:51:09 +0000 (UTC) X-FDA: 75972067458.19.stamp21_44541708fd543 X-HE-Tag: stamp21_44541708fd543 X-Filterd-Recvd-Size: 3694 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Sep 2019 03:51:09 +0000 (UTC) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8P3kpLo084504; Tue, 24 Sep 2019 23:51:07 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v7x9hcc5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 23:51:07 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8P3jr8d018868; Wed, 25 Sep 2019 03:51:07 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma01wdc.us.ibm.com with ESMTP id 2v5bg72eyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Sep 2019 03:51:07 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8P3p6PJ12452738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 03:51:06 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2069B2805A; Wed, 25 Sep 2019 03:51:06 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 93CB028058; Wed, 25 Sep 2019 03:51:04 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.199.47.34]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 25 Sep 2019 03:51:04 +0000 (GMT) X-Mailer: emacs 26.2 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Andrew Morton Cc: dan.j.williams@intel.com, linux-nvdimm@lists.01.org, linux-mm@kvack.org Subject: Re: [PATCH v6] mm/pgmap: Use correct alignment when looking at first pfn from a region In-Reply-To: <20190919122501.df660f0d23806a3f46d11b61@linux-foundation.org> References: <20190917153129.12905-1-aneesh.kumar@linux.ibm.com> <20190919122501.df660f0d23806a3f46d11b61@linux-foundation.org> Date: Wed, 25 Sep 2019 09:21:02 +0530 Message-ID: <8736glowyh.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-25_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=782 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909250036 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: Andrew Morton writes: > On Tue, 17 Sep 2019 21:01:29 +0530 "Aneesh Kumar K.V" wrote: > >> vmem_altmap_offset() adjust the section aligned base_pfn offset. >> So we need to make sure we account for the same when computing base_pfn. >> >> ie, for altmap_valid case, our pfn_first should be: >> >> pfn_first = altmap->base_pfn + vmem_altmap_offset(altmap); > > What are the user-visible runtime effects of this change? This was found by code inspection. If the pmem region is not correctly section aligned we can skip pfns while iterating device pfn using for_each_device_pfn(pfn, pgmap) I still would want Dan to ack the change though. -aneesh