[{"id":1709137,"web_url":"http://patchwork.ozlabs.org/comment/1709137/","msgid":"<aa292524-c075-26ea-78ea-ce9e539e9ce9@linux.vnet.ibm.com>","date":"2017-07-05T04:33:04","subject":"Re: [PATCH] powerpc/mm: Check gigantic page range correctly inside\n\tmemblock","submitter":{"id":664,"url":"http://patchwork.ozlabs.org/api/people/664/","name":"Aneesh Kumar K.V","email":"aneesh.kumar@linux.vnet.ibm.com"},"content":"On Monday 03 July 2017 01:01 PM, Anshuman Khandual wrote:\n> The gigantic page range received from platform actually extends\n> upto (block_size * expeted_pages) starting at any given address\n> instead of just a single 16GB page.\n> \n> Fixes: 4792adbac9eb (\"powerpc: Don't use a 16G page if beyond mem= limits\")\n> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>\n> ---\n> Though in actual experiments never seen multiple gigantic pages (16GB)\n> starting at the same address. But again its very much possible looking\n> at the device tree property interfaces and depending upon what PowerVM\n> provides.\n> \n>   arch/powerpc/mm/hash_utils_64.c | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c\n> index f2095ce..a3f1e7d 100644\n> --- a/arch/powerpc/mm/hash_utils_64.c\n> +++ b/arch/powerpc/mm/hash_utils_64.c\n> @@ -507,7 +507,7 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,\n>   \tprintk(KERN_INFO \"Huge page(16GB) memory: \"\n>   \t\t\t\"addr = 0x%lX size = 0x%lX pages = %d\\n\",\n>   \t\t\tphys_addr, block_size, expected_pages);\n> -\tif (phys_addr + (16 * GB) <= memblock_end_of_DRAM()) {\n> +\tif (phys_addr + block_size * expected_pages <= memblock_end_of_DRAM()) {\n>   \t\tmemblock_reserve(phys_addr, block_size * expected_pages);\n>   \t\tadd_gpage(phys_addr, block_size, expected_pages);\n>   \t}\n> \n\nThis was already posted by another person.\n\nhttps://lkml.kernel.org/r/20170112090906.17864-1-rui.teng@linux.vnet.ibm.com\n\n\n-aneesh","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3x2Sgn0LGJz9sNn\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  5 Jul 2017 14:34:13 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3x2Sgm6h3GzDr3b\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  5 Jul 2017 14:34:12 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3x2Sfc26YwzDq5b\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  5 Jul 2017 14:33:12 +1000 (AEST)","from pps.filterd (m0098394.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id\n\tv654T04K121224\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 5 Jul 2017 00:33:10 -0400","from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2bg6j7cg14-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 05 Jul 2017 00:33:09 -0400","from localhost\n\tby e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from\n\t<aneesh.kumar@linux.vnet.ibm.com>; Tue, 4 Jul 2017 22:33:09 -0600","from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18)\n\tby e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tTue, 4 Jul 2017 22:33:07 -0600","from b03ledav002.gho.boulder.ibm.com\n\t(b03ledav002.gho.boulder.ibm.com [9.17.130.233])\n\tby b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v654X7BZ64094402; Tue, 4 Jul 2017 21:33:07 -0700","from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 398B913603A;\n\tTue,  4 Jul 2017 22:33:07 -0600 (MDT)","from [9.102.0.123] (unknown [9.102.0.123])\n\tby b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id\n\tE7A3A13603C; Tue,  4 Jul 2017 22:33:05 -0600 (MDT)"],"Subject":"Re: [PATCH] powerpc/mm: Check gigantic page range correctly inside\n\tmemblock","To":"Anshuman Khandual <khandual@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org","References":"<20170703073130.27258-1-khandual@linux.vnet.ibm.com>","From":"\"Aneesh Kumar K.V\" <aneesh.kumar@linux.vnet.ibm.com>","Date":"Wed, 5 Jul 2017 10:03:04 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.1.1","MIME-Version":"1.0","In-Reply-To":"<20170703073130.27258-1-khandual@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-TM-AS-GCONF":"00","x-cbid":"17070504-8235-0000-0000-00000BDC1C00","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007321; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000214; SDB=6.00883021; UDB=6.00440469;\n\tIPR=6.00663213; \n\tBA=6.00005453; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016087;\n\tXFM=3.00000015; UTC=2017-07-05 04:33:08","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17070504-8236-0000-0000-00003C9872E7","Message-Id":"<aa292524-c075-26ea-78ea-ce9e539e9ce9@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-05_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000\n\tdefinitions=main-1707050073","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]