Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/783863/?format=api
{ "id": 783863, "url": "http://patchwork.ozlabs.org/api/patches/783863/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170704104608.22397-1-khandual@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20170704104608.22397-1-khandual@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170704104608.22397-1-khandual@linux.vnet.ibm.com/", "date": "2017-07-04T10:46:08", "name": "[RFC] powerpc/mm: Enable gigantic HugeTLB page support for powernv", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b1f03ad3b0481edcb1beccaae66afd621e362512", "submitter": { "id": 9057, "url": "http://patchwork.ozlabs.org/api/people/9057/?format=api", "name": "Anshuman Khandual", "email": "khandual@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170704104608.22397-1-khandual@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/783863/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/783863/checks/", "tags": {}, "related": [], "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 3x210v5STYz9s65\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 4 Jul 2017 20:47:27 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3x210v4bNmzDr1p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 4 Jul 2017 20:47:27 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\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 3x20zd4snRzDqj1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 4 Jul 2017 20:46:21 +1000 (AEST)", "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id\n\tv64Ahi5H125306\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 4 Jul 2017 06:46:17 -0400", "from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2bg6gd4xds-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 04 Jul 2017 06:46:17 -0400", "from localhost\n\tby e23smtp07.au.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<khandual@linux.vnet.ibm.com>; Tue, 4 Jul 2017 20:46:14 +1000", "from d23relay07.au.ibm.com (202.81.31.226)\n\tby e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tTue, 4 Jul 2017 20:46:12 +1000", "from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\n\tby d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv64AkB9K66715900\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 4 Jul 2017 20:46:11 +1000", "from d23av02.au.ibm.com (localhost [127.0.0.1])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tv64Ak2sc017424\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 4 Jul 2017 20:46:03 +1000", "from dhcp-9-202-24-168.in.ibm.com ([9.202.24.168])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tv64Ak1BH017371; Tue, 4 Jul 2017 20:46:01 +1000" ], "From": "Anshuman Khandual <khandual@linux.vnet.ibm.com>", "To": "linuxppc-dev@lists.ozlabs.org", "Subject": "[RFC] powerpc/mm: Enable gigantic HugeTLB page support for powernv", "Date": "Tue, 4 Jul 2017 16:16:08 +0530", "X-Mailer": "git-send-email 2.9.3", "X-TM-AS-MML": "disable", "x-cbid": "17070410-0044-0000-0000-00000279BDA1", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17070410-0045-0000-0000-00000709F01D", "Message-Id": "<20170704104608.22397-1-khandual@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-04_07:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=5\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-1707040186", "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>", "Cc": "aneesh.kumar@linux.vnet.ibm.com", "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>" }, "content": "All the functionality for memblock allocation during boot was\nalready present in Book3e and embeded platforms. This change\njust moves around some code under config conditions to make\nthe function happen on powernv platforms.\n\nSigned-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>\n---\nTested lightly on both powernv and pseries platforms with two\n16GB pages. Will appreciate comments and suggestions on the\napproach.\n\nOn PowerNV while asking for 16GB pages through kernel command\nline, we need to be careful not to starve the system of memory\nwhich can make it unable to boot.\n\n arch/powerpc/include/asm/hugetlb.h | 2 +-\n arch/powerpc/mm/hash_utils_64.c | 8 ++---\n arch/powerpc/mm/hugetlbpage.c | 66 ++++++++++++++++++++------------------\n 3 files changed, 39 insertions(+), 37 deletions(-)", "diff": "diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h\nindex 7f4025a..b0c1464 100644\n--- a/arch/powerpc/include/asm/hugetlb.h\n+++ b/arch/powerpc/include/asm/hugetlb.h\n@@ -224,7 +224,7 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr,\n * the .dts as on IBM platforms.\n */\n #if defined(CONFIG_HUGETLB_PAGE) && (defined(CONFIG_PPC_FSL_BOOK3E) || \\\n- defined(CONFIG_PPC_8xx))\n+ defined(CONFIG_PPC_8xx) || defined(CONFIG_PPC_POWERNV))\n extern void __init reserve_hugetlb_gpages(void);\n #else\n static inline void reserve_hugetlb_gpages(void)\ndiff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c\nindex a3f1e7d..7862fdb 100644\n--- a/arch/powerpc/mm/hash_utils_64.c\n+++ b/arch/powerpc/mm/hash_utils_64.c\n@@ -473,7 +473,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,\n \treturn 1;\n }\n \n-#ifdef CONFIG_HUGETLB_PAGE\n+#if defined(CONFIG_HUGETLB_PAGE) && !defined(CONFIG_PPC_POWERNV)\n /* Scan for 16G memory blocks that have been set aside for huge pages\n * and reserve those blocks for 16G huge pages.\n */\n@@ -513,7 +513,7 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,\n \t}\n \treturn 0;\n }\n-#endif /* CONFIG_HUGETLB_PAGE */\n+#endif /* CONFIG_HUGETLB_PAGE && !CONFIG_PPC_POWERNV*/\n \n static void mmu_psize_set_default_penc(void)\n {\n@@ -566,10 +566,10 @@ static void __init htab_scan_page_sizes(void)\n \t\t sizeof(mmu_psize_defaults_gp));\n \t}\n \n-#ifdef CONFIG_HUGETLB_PAGE\n+#if defined(CONFIG_HUGETLB_PAGE) && !defined(CONFIG_PPC_POWERNV)\n \t/* Reserve 16G huge page memory sections for huge pages */\n \tof_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);\n-#endif /* CONFIG_HUGETLB_PAGE */\n+#endif /* CONFIG_HUGETLB_PAGE && !CONFIG_PPC_POWERNV */\n }\n \n /*\ndiff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c\nindex a4f33de..be0be5d 100644\n--- a/arch/powerpc/mm/hugetlbpage.c\n+++ b/arch/powerpc/mm/hugetlbpage.c\n@@ -258,6 +258,40 @@ int alloc_bootmem_huge_page(struct hstate *hstate)\n \n \treturn 1;\n }\n+#else /* !PPC_FSL_BOOK3E */\n+\n+/* Build list of addresses of gigantic pages. This function is used in early\n+ * boot before the buddy allocator is setup.\n+ */\n+void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages)\n+{\n+\tif (!addr)\n+\t\treturn;\n+\twhile (number_of_pages > 0) {\n+\t\tgpage_freearray[nr_gpages] = addr;\n+\t\tnr_gpages++;\n+\t\tnumber_of_pages--;\n+\t\taddr += page_size;\n+\t}\n+}\n+\n+/* Moves the gigantic page addresses from the temporary list to the\n+ * huge_boot_pages list.\n+ */\n+int alloc_bootmem_huge_page(struct hstate *hstate)\n+{\n+\tstruct huge_bootmem_page *m;\n+\tif (nr_gpages == 0)\n+\t\treturn 0;\n+\tm = phys_to_virt(gpage_freearray[--nr_gpages]);\n+\tgpage_freearray[nr_gpages] = 0;\n+\tlist_add(&m->list, &huge_boot_pages);\n+\tm->hstate = hstate;\n+\treturn 1;\n+}\n+#endif\n+\n+#if defined(CONFIG_PPC_FSL_BOOK3E) || defined(CONFIG_PPC_8xx) || defined(CONFIG_PPC_POWERNV)\n /*\n * Scan the command line hugepagesz= options for gigantic pages; store those in\n * a list that we use to allocate the memory once all options are parsed.\n@@ -339,38 +373,6 @@ void __init reserve_hugetlb_gpages(void)\n \t\tadd_gpage(base, size, gpage_npages[i]);\n \t}\n }\n-\n-#else /* !PPC_FSL_BOOK3E */\n-\n-/* Build list of addresses of gigantic pages. This function is used in early\n- * boot before the buddy allocator is setup.\n- */\n-void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages)\n-{\n-\tif (!addr)\n-\t\treturn;\n-\twhile (number_of_pages > 0) {\n-\t\tgpage_freearray[nr_gpages] = addr;\n-\t\tnr_gpages++;\n-\t\tnumber_of_pages--;\n-\t\taddr += page_size;\n-\t}\n-}\n-\n-/* Moves the gigantic page addresses from the temporary list to the\n- * huge_boot_pages list.\n- */\n-int alloc_bootmem_huge_page(struct hstate *hstate)\n-{\n-\tstruct huge_bootmem_page *m;\n-\tif (nr_gpages == 0)\n-\t\treturn 0;\n-\tm = phys_to_virt(gpage_freearray[--nr_gpages]);\n-\tgpage_freearray[nr_gpages] = 0;\n-\tlist_add(&m->list, &huge_boot_pages);\n-\tm->hstate = hstate;\n-\treturn 1;\n-}\n #endif\n \n #if defined(CONFIG_PPC_FSL_BOOK3E) || defined(CONFIG_PPC_8xx)\n", "prefixes": [ "RFC" ] }