From patchwork Mon Dec 5 09:17:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 9460683 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 D583260236 for ; Mon, 5 Dec 2016 09:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0EC624DA2 for ; Mon, 5 Dec 2016 09:20:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3E5626246; Mon, 5 Dec 2016 09:20:35 +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 30AA824DA2 for ; Mon, 5 Dec 2016 09:20:35 +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 1cDpQM-0001dL-JK; Mon, 05 Dec 2016 09:19:02 +0000 Received: from mail-he1eur01on0055.outbound.protection.outlook.com ([104.47.0.55] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cDpQB-0001U0-Mp for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2016 09:18:59 +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=wmVNV7++vnSxjYKHloSPGGP3BEH7Nor4qJ86M4h/MFw=; b=iW3/1EjnBJIOVk/ErWnBjStk2x8AGVcugeg0/YJu/w6CW2uLUnaxTag/TFyu+9buVeyQqWtEzSyVmbr/3XeIhwU0ywQK8aljhjMd1XTEk8EnAHKeBDBSHex00678RWQF3wCaPyx0Jy9wecq8oIuWAr+9Cyim70RamNWpGpPUbsA= Received: from DB6PR0801CA0044.eurprd08.prod.outlook.com (10.169.219.12) by AM4PR08MB1107.eurprd08.prod.outlook.com (10.167.91.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Mon, 5 Dec 2016 09:18:27 +0000 Received: from AM1FFO11FD006.protection.gbl (2a01:111:f400:7e00::148) by DB6PR0801CA0044.outlook.office365.com (2603:10a6:4:2b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Mon, 5 Dec 2016 09:18:27 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; kvack.org; dkim=none (message not signed) header.d=none; kvack.org; 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 AM1FFO11FD006.mail.protection.outlook.com (10.174.64.68) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.734.4 via Frontend Transport; Mon, 5 Dec 2016 09:18:27 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:1094; 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, 5 Dec 2016 09:17:57 +0000 From: Huang Shijie To: , Subject: [PATCH v3 2/4] mm: hugetlb: add a new parameter for some functions Date: Mon, 5 Dec 2016 17:17:09 +0800 Message-ID: <1480929431-22348-3-git-send-email-shijie.huang@arm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1480929431-22348-1-git-send-email-shijie.huang@arm.com> References: <1480929431-22348-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)(199003)(189002)(7846002)(5001770100001)(626004)(5660300001)(50986999)(5003940100001)(39840400001)(39450400002)(50466002)(77096006)(6636002)(48376002)(38730400001)(26826002)(2906002)(76176999)(6666003)(106466001)(86362001)(4326007)(246002)(47776003)(2950100002)(305945005)(92566002)(356003)(8936002)(33646002)(36756003)(39850400001)(104016004)(189998001)(50226002)(8676002)(7416002)(39410400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB1107; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD006; 1:rHdKW9oYfzRcYsBKYheW1gLG2zyl/Fi6oRiQ1aF19elrynATQxNS6UBXGMCKV0NLpirSmklxdfr3IBJAqIUIAI/44/SEIn7aRqtYYe5IMSiphbOpIGJNsLGfxjws76FdTFFZ9MhCwUDU9C7Ceuvtb6C/+oHGAztcg5qAUQ0nhIWn9/wYuTdUtgHkxTE5P5YN7/F0DALvf90DtinzOdlsJhIOb72rN7hNdyV1axfhcQCOFWnRq3K8jTEzIZ73VJabfcX6bBWsNYYf1biTlmKDz+Lkd3UFhVc/vReBL9l1XLQUD77/9aMg7ZYkZNACnfqRMWqtUexG6Xd6gCgIRQ7PjYLrBSl8sjUG3zP59Y+haQCd0jEkxKhZXfer6vBgsqZoa6gIah1Gd2/y/RuM1t5eIM/3+5EuSZQEFKMN/2ONtqCBhSp/xz8leV3uBeBC1ZaOu3mlb5nzodeq/qBy6Ll1VjOxrHIcXuT3toKiz+TJlRxJWqSvsIKtfox6i1Qik3UDoJWmWvaPeQYPXS7l4Ifaum+0ZdOYsW8o1I267gzy3/kB+EVv9iN+VsJn1X8JTNzg6O0byfz+crF1/KP784VT44+QCZ6Zct/RWiXn0JZKbgF5/AERDeuxMXFxaSwPLGMO9wKvKSIuyzPU6O+xTRwdH3lwdAJ/E/QbrdCajwUtvAE= X-MS-Office365-Filtering-Correlation-Id: 8ce628a0-38d3-4e1f-a483-08d41cefac20 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:AM4PR08MB1107; X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB1107; 3:dWzaCUzzPXFDsBozcoQFOpEfI8VDRe2998H7lfPbvXl6UPNQeqH7xRxbnz1s6jzKvuvlvvRrXO1w8E9dFxI9+CDJknwQmhLugFuwrybJcmsSKNVCYF5klmY2JysO+vmOogjf6zCCtoh/5N3agQb4/isQguscCDvarNPe8rg/UJuEpr0JErYx0Kfi9fFflWGUY1u0+KMa9PWggelY4W8zbJ+ntRaslM81CPN2Mr4UAcfiKVgrRHU7W4UyeLPfAAn5nA1q7Xc7sVUAUDkjMZ5jYRHA+Dx4fRUe/GT40wI61lo8v7kX6hAAunI53wTAIXG4kH8Fg2wbyaRLp6N9jH9WF1yZQBX/vpiT1NlN/jP4qWAQ3Flxma+hC0CWwxt0vCDf5DNIOe5PrfwBdC2QEGuUfA==; 25:wdg6FO/siBh+bomUPBEpblYloAk2FRpbxgrNDqvmSNOnQcF/4dQyF9BAmx0xpUfBdsMimErkkpSEk1RIxFxqzJm8W//JQpcBbTSSyzzTHW1lDNr2kcPtag+JEDP7yxLi08EOoA4/goDW5Rn4Yq8s5b5hZBh99nrSpd19P3CaQ9hIsh/mWIrGOh90ndD/XNGCW23mFs+jwCmWpJPkoL2FKM2lURfohMWDmY2NmTI5hklIZLyVuLCSppx0wmEaDKz3kzhuc9j4HFIQTGv+8urcxIR47CeTX7AT8RizC/SYfyquk1prgM5rxzhP/48GRr52DUpHasDLuNqOxMOPp148CI6mYl+Ucg3cZf04HEHjNVOswsKNG9nmt/Ea+CfYkcjAJayg2GlniAvwPdrUTen00A3FOJJU/6Zw2KVtS54Xx/P3TKPXhoJzMVLiMnlcGIJVKd5rc0q5NkcdcA+UvKrTXw== X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB1107; 31:K0A/dLddbmq8hmKwvFhMoZbRxIUfnFDOrddSqMN/4Gqdv2JN01UUrX0e1Loh2qSvklX8YVkVs02lX7+RkdOtaTx2S8dUC2YVZFStLk1DpHqdBF3jHh5VsB4ftRdFJNIm8Y1bdTm/HnYDPGunALHrl6X/5JpTSMk5IWMt+MnVBAG7pTta4kAWwxn/8wAIu0JBQ1Zil98pHI/zPFJQuweLfv/WTrdIm4T1NFRaatlmlk6JP7MC35rXwEuINNZmN40zaXkPIwl5Za88Yn256Mz2/kv01U55bDJ1LP9QAIyOF94=; 20:yqxwsCOtZQ5GWbiHPn1Lf5cpMmUzaaZfPPdE1VEyoPhQP1vHPIMwyAt7oyISX3PSglfRdfb2bkR/D9Mv9UMEF0ZbgIEkSePMltJtnrUiy0RXznnNTgcThtwYGj7dL5n25t0BxQXboIkVxMiJknIO74/PNGqixdi6pZs+HWaQgA71T1ICNvhVMq8pg9FElpqGvRvA2MOOO791N53fCSfTfFmnzeuH3cm95ErpRd5E5SkFj130BoDWp6/01skwTRm7 NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13023025)(13024025)(13013025)(13020025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558021)(6072148); SRVR:AM4PR08MB1107; BCL:0; PCL:0; RULEID:; SRVR:AM4PR08MB1107; X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB1107; 4:GwPL9b9MdfnEqJQ7xQ4iTQGjUKG6LFojrgDghK+irAMbOh3F2Axbkcz0Rmaf7aB8MAmOf/UdYEtZX3vhjZbbiM8oxQk/6NOMjoFAkKe8s67GAFO5O7Yt7hVXLaWnQmutHGjjethSmJbg7IX2l9PJ2T0JG9dRfRR9g+5y4SHNvuMamv4mFIuis0Djz9tZBoGvPK0qu0BzvfEpf2sME0mYnoV+Ipbm2wmx84UDveaTWem4TC7F8wLYrjH/9X2WuLBCKnZfT8y1HT4dH6uCWDCn31wHRzONfJnq138Jt/j23RDq5qVu2QMaZWxVUSTkuQlQ/8A+kCqYYUeHnYikxkgcFUWXybSOZHai3g98GX2bnYd6Qvi7b3ONWRhkX6C9Wtwlgn2miLpKcHc+ps+Dw15nyIgYHyI1m+2abJDfdbE0Hn5wrIrcMC5V6LXjJFbUDg3K5xziMPlzaCFh1pUitncHKrnOPguqify1DXSvpYdo77ubzB+A071pQVWISR0SAe8xWCqKJbU0e1/xiatjUzQ8XrjNRpxb0L3QQxYb5LKgjKJjWAXc7fZDijLVhA+mAd8DrJQV1YsEN5gwi+CB9VTesviyFmmhBkJxH0eiE6HjQwvzbWgXKDUx47wQo/EHH8fcCo0GEQ0+FzhPmv8niSjlyGYgfdLlsEgpWCKTSlFQ+Sa+HUOppnnsFlYqzwO+GF8UxdHpyDlXYDuar+pUZA7U/7kM2WlTPZRZ13paFucPsbUUDh8ea0Xf5da7XvckH66C X-Forefront-PRVS: 0147E151B5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR08MB1107; 23:Tu9UusvzZw2lKwGUlZP+/rSy2yqWhYLIEi4teBChR?= =?us-ascii?Q?LinFaN7GrwVhkC2MB4imnIjhg/Daanh9If+NCgxrIkwuekS4uEXuqDOTuzIk?= =?us-ascii?Q?KOw5H4QBYn+3PmaVJVu2Tk/RQHSe6Wwww3ACHRramTOurwLAtQh7O3ehV/3N?= =?us-ascii?Q?0+78mybi2in82FpYQNzgTDpQyU6oXH271ScA0NvYb3LEccBADC/u7j7KHgDy?= =?us-ascii?Q?4asaklI6cLauejPfFmCpZ1DkURfx4QqdHCQXDNsl6bPtcaDfzoWh8UFlVSO8?= =?us-ascii?Q?Jav/lJGjp0DoZqssXAyCCH1XY+LKfGYctSkwWIwJfNeOkkcp0F2GtquWALCR?= =?us-ascii?Q?c7CJErWt5h0Bt4+QjT+WVOPHJVVr8RrK6IZalfcFOXDc/0Uy7mZkF8N4rIh+?= =?us-ascii?Q?0JGUw2nP+p7OaOqLgn2hdW556Kt7ciwfpO+J4Xx+lyw96u/ehQBC4BzcUtpK?= =?us-ascii?Q?2zxRERkaLe6fzQ6JrbSQkd/vEOa3H+UWjE6tN/4eZJ6efINuA3m5NRzWiUw6?= =?us-ascii?Q?kDQ2UZcQs/KawmCTy6kJt25txyI8KF5+wHcrKmzlyoBks1vUFd3LjV+j+dJy?= =?us-ascii?Q?eOfIV4WtRrtxQyQwty31kj01UfMuNvIK0Oisdv0n5nDbChCeKMVXRjGQcHGW?= =?us-ascii?Q?vB1HOn8FLE9bxJD64BDji6o8Gg7J6nrsosfSwdNuzJSdETJlcToyUOUe/7rW?= =?us-ascii?Q?PBH+hC0XIZA2RiAEpvtnVIlGV4gdGMgzlLDFC3lmZvbvgOaiiM3b3H4tQph2?= =?us-ascii?Q?9a2oRwd7imrJUciN/Awsu6LA30LRFM6oCrG9n7uTzTsnHgQHJYQjjj49c06q?= =?us-ascii?Q?yEYHRXupQ1/bXTAZuAjSMbtSmxj00FHXzGBp1cLaLJf8zu8x/qXkupe0c7Yd?= =?us-ascii?Q?8gbVcYUj9Y246hsVJ1hmKwakzn0YYV7gs6os4xTkswnrDHE0Ta4NI/giFTW1?= =?us-ascii?Q?tpt/qD+En3K/dmriM1iptiVjO6iKuE7VHU4AYTHGeEHXcdHdF5pymJLXsVex?= =?us-ascii?Q?P6IAoclR326HdWxDycBQ/i8KnmQzyJxsdsWIpDruk/1Vw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB1107; 6:lvJOKkgHpiptScu7i4/2QypronGJiMMAIHegL8A4O3dUGr+OB3ZuEYyJmDAcyXEkFAXF/ZJqI7/bkm7O6HJJ0Dxx1WnA8IR7nz8LPmWaWKPiJsVHew627WzuwTQ5A0XSKzteO3H15hCEDU1KxfRDBHntqHTQNLPfgTacyuu7Za1ksmY+a22XGKKT7FfSVp44MpAt7KOmlbLvP3aSSNJ0KZNBWQ4iS75r421L6aInvDeeLG+UYOKfpzAir/3jYuW21fIHLh0lSLLokZNZDNAoFjUFTf10QWajwwZC9+NzVxOyW8VzTgYe8RPQuSn6BWXXi604y3Gr+0DjWwXAZaEcqMz7C0rZrXf98/8/hivYJz4G0LudxRsPZdmS/J0+wppe6SZ1G99yqqyTJYUtO8Gqs1NLNWL1irTcMzNarjv3jYngqC/Dhyjvgmv3PIhtbbTLjSZRbM9O7s+7ZRpZqMADhQ==; 5:BIvBJm6Ame5TakZx3z3cqH1u5tLeUuD8rluSemSVc+smDCmCOI8FTLuNOw6nq9013y6ebFeFC2VL5ISrLYQY3j8ip/ESz92h76BuVcUdFEKsOYGwd9hq08Cr7qAN4rrAYmNPDmtHpNx1sA3S2JMba3SKslTwkjcwsU+op8i6VWI=; 24:Gb0gtAYGmUyGLcMu9DYeN5fOGrckoy2VpCr6TvHuk3fCs8EAeYGEfmYl7s+RrkYZWLAe4okW0VhJvht3WV5Z0WnJRQkn/QA+j8GH7PjL0Aw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB1107; 7:O/hV8qYfEvDfA+hbkvPbmSyvJSrBBZ9cAJMedd9cTXDEKGZZa95WgdtcmPKSesMJeAC3eM3/f4UFC2Wq7+cIa5el6x+qbSs3U2kPBGB02fgAUIbjuUy4WEfyrbcaYPgDZjSn6VHoOYNLpB0Cg1AyyVUMnBKnLeRBFTGQre+rCQNej21tym/0ryHR7EO+iw/y0Ypg1dnojlvSaQnW0j6ZQwyMj2YYeT04EApK9J44FubgXHw3rqecFcaRNL6pk/Ouz6cgAKxaBKtRwoLJOK40MXJaf+uTK6HU71raQ6XDur9JJbTqCjJ5LPGkR/pZW3vtDrgz0EP0SnjYK0TgD1i6myfpd3t9p14T+P9QcvoMzohJwbGdjGUVdvPFMrH2VuKqYavXMmclmaEi9V9EFLueRQlwJx+19lB9Yy6OhvRC50pPLaXhZC8scys09Jq16xj4vj1tcu6wzqQiFwEkE1J+dg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2016 09:18:27.4324 (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: AM4PR08MB1107 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161205_011852_382797_6F0483C3 X-CRM114-Status: GOOD ( 12.15 ) 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, vbabka@suze.cz, 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 This patch adds a new parameter, the "do_prep", for these functions: alloc_fresh_gigantic_page_node() alloc_fresh_gigantic_page() The prep_new_huge_page() does some initialization for the new page. But sometime, we do not need it to do so, such as in the surplus case in later patch. With this parameter, the prep_new_huge_page() can be called by needed: If the "do_prep" is true, calls the prep_new_huge_page() in the alloc_fresh_gigantic_page_node(); This patch makes preparation for the later patches. Signed-off-by: Huang Shijie --- mm/hugetlb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 5f4213d..b7c73a1 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1133,27 +1133,29 @@ static struct page *alloc_gigantic_page(int nid, unsigned int order) static void prep_new_huge_page(struct hstate *h, struct page *page, int nid); static void prep_compound_gigantic_page(struct page *page, unsigned int order); -static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid) +static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, + int nid, bool do_prep) { struct page *page; page = alloc_gigantic_page(nid, huge_page_order(h)); if (page) { prep_compound_gigantic_page(page, huge_page_order(h)); - prep_new_huge_page(h, page, nid); + if (do_prep) + prep_new_huge_page(h, page, nid); } return page; } static int alloc_fresh_gigantic_page(struct hstate *h, - nodemask_t *nodes_allowed) + nodemask_t *nodes_allowed, bool do_prep) { struct page *page = NULL; int nr_nodes, node; for_each_node_mask_to_alloc(h, nr_nodes, node, nodes_allowed) { - page = alloc_fresh_gigantic_page_node(h, node); + page = alloc_fresh_gigantic_page_node(h, node, do_prep); if (page) return 1; } @@ -1172,7 +1174,7 @@ static inline void free_gigantic_page(struct page *page, unsigned int order) { } static inline void destroy_compound_gigantic_page(struct page *page, unsigned int order) { } static inline int alloc_fresh_gigantic_page(struct hstate *h, - nodemask_t *nodes_allowed) { return 0; } + nodemask_t *nodes_allowed, bool do_prep) { return 0; } #endif static void update_and_free_page(struct hstate *h, struct page *page) @@ -2319,7 +2321,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, cond_resched(); if (hstate_is_gigantic(h)) - ret = alloc_fresh_gigantic_page(h, nodes_allowed); + ret = alloc_fresh_gigantic_page(h, nodes_allowed, true); else ret = alloc_fresh_huge_page(h, nodes_allowed); spin_lock(&hugetlb_lock);