From patchwork Mon Nov 14 07:07:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 9426665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 62CF360484 for ; Mon, 14 Nov 2016 07:11:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557C4288FA for ; Mon, 14 Nov 2016 07:11:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47FBD2890F; Mon, 14 Nov 2016 07:11:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA23E288FA for ; Mon, 14 Nov 2016 07:11:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c6BOi-0001Q6-F9; Mon, 14 Nov 2016 07:09:44 +0000 Received: from mail-db5eur01on0062.outbound.protection.outlook.com ([104.47.2.62] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c6BOE-0000mL-Sp for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2016 07:09:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=85Gth+mEB+zlwD+zmtCZbSpcA07KlQYWaHrKxLIji9U=; b=YTiiQNqA3T5yInNbsxg0Plr3Vnw/AFtWJQaUzjxkk1o6aWr7Cpap/1zqWva3XNtx841uPiCvkfoFcEvEpFekqeqGvnlaDzIDuIsWu/Eqvdjy2xTDZIpE73Dw+YDuIAiVmwLnsHT0k0L/OqOVzZay5QqAqjmWA5wy2gUIuH1xHf8= Received: from DB5PR08CA0040.eurprd08.prod.outlook.com (10.163.102.178) by VI1PR0801MB1792.eurprd08.prod.outlook.com (10.168.67.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Mon, 14 Nov 2016 07:08:49 +0000 Received: from DB3FFO11FD041.protection.gbl (2a01:111:f400:7e04::107) by DB5PR08CA0040.outlook.office365.com (2a01:111:e400:52c3::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Mon, 14 Nov 2016 07:08:49 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by DB3FFO11FD041.mail.protection.outlook.com (10.47.217.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.721.5 via Frontend Transport; Mon, 14 Nov 2016 07:08:49 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:1069; Count:13 Received: from sha-win-210.shanghai.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Mon, 14 Nov 2016 07:08:33 +0000 From: Huang Shijie To: , Subject: [PATCH v2 1/6] mm: hugetlb: rename some allocation functions Date: Mon, 14 Nov 2016 15:07:34 +0800 Message-ID: <1479107259-2011-2-git-send-email-shijie.huang@arm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1479107259-2011-1-git-send-email-shijie.huang@arm.com> References: <1479107259-2011-1-git-send-email-shijie.huang@arm.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(336003)(189002)(199003)(106466001)(47776003)(4326007)(2906002)(626004)(2950100002)(5003940100001)(5660300001)(305945005)(26826002)(76176999)(48376002)(50986999)(86362001)(87936001)(92566002)(77096005)(8676002)(6636002)(356003)(7846002)(50466002)(5001770100001)(586003)(189998001)(104016004)(246002)(36756003)(50226002)(8936002)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1792; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD041; 1:W5AOv9Pa2UXNFfWmYQ72dv042SLADKiywFrBSv5I1CTpXuouDG5ojz0ywNLvs5+G3pclVIm58QavZXyENTqCJTdZfea9mmM3pSbjqOXbVlpSqU6Cdj1DvEbd4W5x2Fe7cNwQ5ljF3ywogYI1BwXgXuoyTLChM9SWU1hpMbmpLUJ+bhL0eTbATZrB4yxz2fZv+ZwngqdeLXdbNf/W1EOZbp4IjMnm59yCmzC4ju1R5k/A9WbvnsNFs/R8OSLJ51sqJIr2T5s4TurOrm6LvaUoIUmwdYhpZAK5k+LHXNCXchdXr1s6x8ZIUzSN82OnYsl1t1LQDOGHRyAnsrQVEADodlUPuAM9O3zWMv1fnu/5JL2iLIeW0CuurKqnWL+arZRdnX/D3t2lFwG2t427ov4V+qgZ69YjQukYGs13sZxWoAZB65Ji3eSxNUDgJqJvzl/TRU/MbZYIH7NmBnS/yoYpGrz9D99qGO+lDkaMA/vGfPzCdTvnkJvxM76suMQv96vDRf9NUhnMwAVDiJM3JZex7OwOygyiZDrrRFgaLkBWJiyZLWNtBP9/EA68i11HPQ9NhuKYXaZ/ZO8jMaOT6BOP77SJy0Twppox4cm3BstgDoagYkcOZUk0RX8SS0wJgOQzSpuKZ08AJnyO5+dNq9IlzufemP6H4QTMMIWtg8bNxhk= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1792; 2:jjmGZOvzwQ3MUF1Mb+RpYF8F8IuM1On15VV15X0sRpYRH3Aonc5mxYDL3fsJ3MCjCzPQzYzySlxYmenJAJbo3HnivtVzqKcHm2NrS+2x5Sx7195ODxQjpAArMURy+OanPzVNZ+c8iSoP5cqRE4/NAE4xqoXxg8qNsCkr4KjSLc8=; 3:tTUPmnDUal4IWmddgF5vSN9evm7X60uBaWlsh/OB/uqyY4WsbmvXXiBNt/xymLXhNe7e5Tt0WldMir1yP+f1apr9Wnv7ubx4+Kgyjx0QfgL82PhdSNLX+WsPQfy34G3yh4ADLaID5mLCnypahSsEMs+Px8zkRcAZc2b4wZrt2ilG+2sDgiVx9b7G2yZ/IhEAl+7Y3283Bfm6y4nMOZLNIIaAfYQdGMScf1eaO5A4n+kAr476vXDxV0KMf/EwFy/M9B4weEPrcAPicNSFd8msrGvgw/185lMwjRjy+YMyxjY=; 25:ZAzNEDQkaUPfEnUxEWGX4tHAXE3JolRRPA/gF+Fedqc0dOtsznotXX1mhoL8Igtd7SjkKenBEXmYusiT0IJB3gbaWk8+RfqxhpW6w1H5FIYqqNtj4E7FXy4kITA17xRPXrY9WOckM5EoHvsrUOCZtO2IsTYFryZzM8JqyVpTLaP9TNVpHXJadGkqeHqtDBnh2UQP5kZymNnpS9yse7niQ13OYL5o4xA1/c3dFurcRLOwTqQbibc3FjgNY5c2cu/4G+is1JH72v5cCMFwD5bhloftuRlPHtQ5lQ1DYrrMFkGH9bQNNPXpYq769KwMbIhs9rUr4rq1RgNcrO6rMDU8fkBfA3M3XTbqyv03MahCA8CitjgEW3Mk5p5rS4qAZ9TDwmWC9T5qt/Kl23/Rir2rqtipt/dBN1FZ+vPISExZDXk= X-MS-Office365-Filtering-Correlation-Id: 5a6c1ff1-4b46-4e97-ab84-08d40c5d1543 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:VI1PR0801MB1792; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1792; 31:+r2NLX+6q//xYZe8XhFrvPlEh74ZoDNJt1qzo8kWaiKFCtIkSNWg7BDC/ovc1RJPBgMBl3DgX41aH6+VwgjdacUe0oiWjBOybT00qmB3kjCjoKOciKuZCtcETDg+BCwy7d/po72yXzI/UkglDC1162galrWA9HP6NpAOHUr9v9ctcHoEDRT+5MFP2ho5rMX2wjeonGqXrepPwxumUA9XHgdmL99Js/cGV4CrckgxhmGCmpPWoWlFBU5BnAV/DbP+BXE+UvbjV2MCmXvkwNK7Yw==; 20:EexorZoFugXtHzNPM9otCIkQRUba+f8/+1bG0hco4rAWW4nmRnOKZKaYVjsCBfQYOzrtGiHDXBEluu7tqdXBu/OaGvnNYmfeI2QSgVPmap49DqL9tXb4ISOqzARZx07gLM933HoXn8l/wxV2FVG0kBRvlmndW30UQbBXuyIGnMvfWKJmmpaiwKj65onv1xhZ+dqt7UsllSlYe5yb8PF35gDIzIVH+ZLrKjTfp+rchWNe8mcCTmqXsxafMrdaUTRU NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6060322)(601004)(2401047)(5005006)(13024025)(13023025)(13020025)(8121501046)(13013025)(3002001)(10201501046)(6055026)(6061317); SRVR:VI1PR0801MB1792; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1792; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1792; 4:EEOGdZrPwmsxpdw3Zh+CswGEqxolSH/Hqad85dzmwWs4tUUg2iuGcq7FU0EuSkUuW2K2HQp4YKvYs7SosJxEyTD+1r1S/uztlkwfyREMD8HOt/gk2HJMdsM2vMTDgdDMCOHDB0d7wNunjb9QMgMozqndDuUiSc8Mg1fMxJQ55yxI4c7mX2Wf9i2PuXUHakWfwc3wxPKcF+UCMFiaD7aAmwYmvIi3VQzILZDU03FPvK3HBgbSCSdnXeGH1tGMr6+WPIfePQacQB0YDJRDpvXrOrv5zcZtgeF6YWptwmmG/s/AhBp/Chh5IoqpX6Ow+5mOrJUGveSkrmzpTZebTpV6uUWS2IWsUzCJe1DGCG0HHJ50fmvHL/GbFugw9QtfCvs5N5wTU6nbxNtr0QMJOk4nfeBwbT5P5GGM0DBakuZNOzHkQVCweEJ+IH7QlsV22prJf2ywHu1FcNeIIovgvvVOp4YgSxKYk8JWWkxSaHR4kfGi1bjDlgQXm3YIOjUUFt4j8TC6Jt9A2rh4Qn/h05y7MHLabaiGZvTfuDHzNwRJ1WJoxoMmuXH3OyN1hTXmHOKr X-Forefront-PRVS: 0126A32F74 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1792; 23:9+IAk1wBvu9z1VhtwJEMViorWxFTfjAuijVJLnH?= =?us-ascii?Q?vDrsMC1GqOe8SIVUarO9GpE4XdBex3TzttCTMiaOQw+SIwZPsF7YS2t80GT2?= =?us-ascii?Q?YWnprU+yCrmn8svXxQzu1OMxkqs3di7U5h9y5/NEFdEbKTW53dF/iqdgOBwx?= =?us-ascii?Q?kQn2P+YExju4QxlLCQLaXWc8d19lDKr4W0oJpXr5jyYQecglj0Xp9xsKflSW?= =?us-ascii?Q?p9XEy2K+kPWz2cnq8do+KtUcpaNke34ymEurCk0obOdPSVZ1006KDE2lJXtB?= =?us-ascii?Q?34NvyLZxxP+pW1wi9EHdqSHl/+r2NbqKYZTI+srp6UsbRoUGDricH76+telI?= =?us-ascii?Q?aS3N/pb6glALK+z4WcLzS+qghaFokZCYFSWWH9r4qNbvfmRt0v1d/RtsBDnB?= =?us-ascii?Q?3acEYeC2zub6+zkMEgvDMelIS8F7s9Bt3z4l0cQffKDFe1zXBKx5y8XyrNWn?= =?us-ascii?Q?scw2Uoll/1//C/Mfg/ioxX5wMIrk0f7/6OyMY0gQBXkjHFzdJ109ybw7FSoT?= =?us-ascii?Q?MnB20xMJo9TkeCQbTc+z+8kdgEzdspQu+i7OrRI+67mwxDNOFQntTLquHPlL?= =?us-ascii?Q?WF/o0j1QE9JTE/tffz8ucpVoFAGHvTSgIBvzoX9kCfsMiiMM1Ox1His1KxQh?= =?us-ascii?Q?O11p6kEbQarlaXWx0XyChBND4yX8UuKkQnvnVMRxA5IeZeolTasE93sBcjyn?= =?us-ascii?Q?Fy+AD5nkAMs5hSRR89EiCUNG77JxFsLIOKG12TpQ9DWQ3/BTdxwtpehPXS6T?= =?us-ascii?Q?DGmDY2reiL/meZfCmPeG9XVMD0EkH+K3WY0OvBDEH/sqQaHd7pbH6jvrAQQJ?= =?us-ascii?Q?A64hNCN+eG32CGd/aeFZt7LcDUdrY1T24bg/3zL3jpIly/GNl9E9Lf19dr3+?= =?us-ascii?Q?u5Bw7bHi1TZKR6prEJpuzKqaaA1J095OR0aV3hMP/WBEvMcdbiD66dm8tgCE?= =?us-ascii?Q?HDCseDKnBTZiPkLjQEq3JV6/d6CewUQsx7JuoY2HP0g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1792; 6:F2/t3k/bHUtpYPr9uv9h8m/olUZzm3PaGEI/y8VukSJF0oPiSLYC87bhaI13tXJCqGaP9Qk/L8hNLFV2EKRSxEDA1TaPEryYpihtSpw5ncW6l1Pxt/E5vvzmQArOV54qRLlH4C1ikqr9K1mRk/ZvuP6ncly899+NewhLShPvL2xeVDDyh+olm1uDJEZJKyc3sz4fdgdu8737E/0hOn2Zx16rokuht/e7Pz2wd8p13PXoxYrx+KM53rFjL+Fpd7XYPgRYPdg3o9iFbcGdOzL45SsSzRAHVnBgzXwq2pv64H9ZxBAAHCMxxufWvLLngxs95mdPVs3P2pybdgH5EblDd9lb6TW9NxE75xaas5Z6+/WB/zMd7bfP4dV6nPKiyUF6; 5:2LtiQ2Kr63sCnOo+tyc3G8Xwz4Ix3u/fggvh4i4xL36m3gN4QY0K9yj2DLZwXi4jexQLTjZc27bSVTIimn7tTqFBE5JiqnQLmLlFWj9AmVaJA5vbq5xiax8ndYW0DEZy/n1e/Weyp5U5ns2asXw/ZA==; 24:A3WyxI9kfGvPBU75CVrrvp3kNLsFIVDdzs5JEtqHTg9lr762ouq60+ktD+NaGxoBlRlgDJXCVpnb7hMMTXFDWQfJnLCX1zukSplscposJXI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1792; 7:869hZ/pz8opZUy/vXXV9aKSK+VetWZJDF1+W0h28vlIB+deAwkuzQAPtftR03/mczovbKEOvURViMwPvpPLNJHYkdDiNVWLnqyhoPUz9A4EMsx6ERRghzOR0JVNHhICRHKfI9mEGDUVn9WQKm7JEZL4Klq2YqMEwrz2nGlKJwBtsN4m9HMDBLnQrUPrEY6SnlTXjUhmvnUzyL8+46SGApzbzpBRW1sgb9495qyExPr0Rn1mxZPcpfdE25/VTOPCwCdN4ByritFtbjHJRMQaLjOpK5Zg6s9FZDt5g+PFHMJBIttCcdqcQDsT5M160Fr075/LqvbwZZ9syaU7K7DTDlIyvv74ztMglpgiSWM+k1ZQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2016 07:08:49.1990 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1792 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161113_230915_435646_44D3C9E2 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, kaly.xin@arm.com, mhocko@suse.com, kirill.shutemov@linux.intel.com, steve.capper@arm.com, will.deacon@arm.com, linux-mm@kvack.org, aneesh.kumar@linux.vnet.ibm.com, Huang Shijie , n-horiguchi@ah.jp.nec.com, nd@arm.com, gerald.schaefer@de.ibm.com, mike.kravetz@oracle.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After a future patch, the __alloc_buddy_huge_page() will not necessarily use the buddy allocator. So this patch removes the "buddy" from these functions: __alloc_buddy_huge_page -> __alloc_huge_page __alloc_buddy_huge_page_no_mpol -> __alloc_huge_page_no_mpol __alloc_buddy_huge_page_with_mpol -> __alloc_huge_page_with_mpol This patch makes preparation for the later patch. Signed-off-by: Huang Shijie --- mm/hugetlb.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3edb759..496b703 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1157,6 +1157,10 @@ static int alloc_fresh_gigantic_page(struct hstate *h, static inline bool gigantic_page_supported(void) { return true; } #else +static inline struct page *alloc_gigantic_page(int nid, unsigned int order) +{ + return NULL; +} static inline bool gigantic_page_supported(void) { return false; } static inline void free_gigantic_page(struct page *page, unsigned int order) { } static inline void destroy_compound_gigantic_page(struct page *page, @@ -1568,7 +1572,7 @@ static struct page *__hugetlb_alloc_buddy_huge_page(struct hstate *h, * For (2), we ignore 'vma' and 'addr' and use 'nid' exclusively. This * implies that memory policies will not be taken in to account. */ -static struct page *__alloc_buddy_huge_page(struct hstate *h, +static struct page *__alloc_huge_page(struct hstate *h, struct vm_area_struct *vma, unsigned long addr, int nid) { struct page *page; @@ -1649,21 +1653,21 @@ static struct page *__alloc_buddy_huge_page(struct hstate *h, * anywhere. */ static -struct page *__alloc_buddy_huge_page_no_mpol(struct hstate *h, int nid) +struct page *__alloc_huge_page_no_mpol(struct hstate *h, int nid) { unsigned long addr = -1; - return __alloc_buddy_huge_page(h, NULL, addr, nid); + return __alloc_huge_page(h, NULL, addr, nid); } /* * Use the VMA's mpolicy to allocate a huge page from the buddy. */ static -struct page *__alloc_buddy_huge_page_with_mpol(struct hstate *h, +struct page *__alloc_huge_page_with_mpol(struct hstate *h, struct vm_area_struct *vma, unsigned long addr) { - return __alloc_buddy_huge_page(h, vma, addr, NUMA_NO_NODE); + return __alloc_huge_page(h, vma, addr, NUMA_NO_NODE); } /* @@ -1681,7 +1685,7 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid) spin_unlock(&hugetlb_lock); if (!page) - page = __alloc_buddy_huge_page_no_mpol(h, nid); + page = __alloc_huge_page_no_mpol(h, nid); return page; } @@ -1711,7 +1715,7 @@ static int gather_surplus_pages(struct hstate *h, int delta) retry: spin_unlock(&hugetlb_lock); for (i = 0; i < needed; i++) { - page = __alloc_buddy_huge_page_no_mpol(h, NUMA_NO_NODE); + page = __alloc_huge_page_no_mpol(h, NUMA_NO_NODE); if (!page) { alloc_ok = false; break; @@ -2027,7 +2031,7 @@ struct page *alloc_huge_page(struct vm_area_struct *vma, page = dequeue_huge_page_vma(h, vma, addr, avoid_reserve, gbl_chg); if (!page) { spin_unlock(&hugetlb_lock); - page = __alloc_buddy_huge_page_with_mpol(h, vma, addr); + page = __alloc_huge_page_with_mpol(h, vma, addr); if (!page) goto out_uncharge_cgroup; if (!avoid_reserve && vma_has_reserves(vma, gbl_chg)) { @@ -2285,7 +2289,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, * First take pages out of surplus state. Then make up the * remaining difference by allocating fresh huge pages. * - * We might race with __alloc_buddy_huge_page() here and be unable + * We might race with __alloc_huge_page() here and be unable * to convert a surplus huge page to a normal huge page. That is * not critical, though, it just means the overall size of the * pool might be one hugepage larger than it needs to be, but @@ -2331,7 +2335,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, * By placing pages into the surplus state independent of the * overcommit value, we are allowing the surplus pool size to * exceed overcommit. There are few sane options here. Since - * __alloc_buddy_huge_page() is checking the global counter, + * __alloc_huge_page() is checking the global counter, * though, we'll note that we're not allowed to exceed surplus * and won't grow the pool anywhere else. Not until one of the * sysctls are changed, or the surplus pages go out of use.