From patchwork Thu Sep 6 05:43:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 10589867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B13313BB for ; Thu, 6 Sep 2018 05:44:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E1192A574 for ; Thu, 6 Sep 2018 05:44:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 126282A58B; Thu, 6 Sep 2018 05:44:03 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A03B42A574 for ; Thu, 6 Sep 2018 05:44:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ADB436B771C; Thu, 6 Sep 2018 01:44:01 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A8AC56B771D; Thu, 6 Sep 2018 01:44:01 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9531B6B771E; Thu, 6 Sep 2018 01:44:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id 5F3C06B771C for ; Thu, 6 Sep 2018 01:44:01 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id j17-v6so11476202oii.8 for ; Wed, 05 Sep 2018 22:44:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=XskK/JpEF2pUekGRLHG5roYTrmpnUCGQSomLZWPanGI=; b=OSa+bVvgUM4UEtK/naJ2KB9+y0nJiuT9kDfQFowNgTB7zhtYcVlxAJ2z50iLbtl+rA S0OHOOYY8kSfbbONrQEY+KJT88z2zzSEiy4XTfGVbGkbkoXG/Wn3WcXlSHGurswHnQ12 hHdZwCBFUwi3+Aqp9ZUOjh3hiKtdd9pjWlmDVw29td5AbFhBU11FMUo+hr8i7TN8UB9w zbaPtBLaGjHEksBSrrhTedjP41ALESURagtnK8jXCBHIjywKDpXwLykZtkmeaptzISKZ pe9V39yCySytuje6zgVDvCJDCv4uU9WAHLQPfx0GqmaXUSHVXcIOK0RUPFzLTVK/z4G8 Akrw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: APzg51B8daS3/LGAiF7NHs4UUH4Eu6Sqngcs93tJeVr7e74Wb0CgqJRn Qa5uwDnpL2Zg5hbKto4JJ01WTu8y7iW+1Bm6eSyMWZIP5NeRcvv3OWJ/2Dh77fQYrWQGVWeOdlG KpCqkHLbOJl0mOOz9K3Bdox6wIM/eS/oV0AO4qv9EJPLIjB6Z+jTuRlkHa6J2C2Ir/A== X-Received: by 2002:aca:bcc1:: with SMTP id m184-v6mr1157377oif.19.1536212641080; Wed, 05 Sep 2018 22:44:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJg5HY7kwRLCnVmXtyxHBMxJgmQn0WD80cl4sHqQxdZc6KfYWSmM+xs6+ESgC82mX0Gqaw X-Received: by 2002:aca:bcc1:: with SMTP id m184-v6mr1157350oif.19.1536212640502; Wed, 05 Sep 2018 22:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536212640; cv=none; d=google.com; s=arc-20160816; b=HZwUy63ECgbx0S538dVcAk3doRrsYAnulqpSBYuXIErljhX6gfPpkyqqv4hNrQjbpz Na7dTxVZTxo/Vzw+j5dJNkv1dh3zM669al8qwr0AiSMOcA/8Id2/DWHqiRP0nvqSe7dG vtvF4UF5jaJV/4rHU5DtKzBrGuS2DrhbZsfu/XYaKmSgGAoEGYBdm4DWyxltO07Epni4 MyQYfm4pyHOKUxxs1wAtyTTdF10RTH8S44FkD9Ob7NaD4MMnqaP1CyzjEAM7QCggHEWh N5L2pWhuFYGcgwAfgig6maRnGAToYLYsH2oFrU7kGbs+EAz5MKJqchBt8DIpOd4rNYm9 zulg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=XskK/JpEF2pUekGRLHG5roYTrmpnUCGQSomLZWPanGI=; b=eJgalaTLftYbiXkOSGC5Ljv8fXROSzC9f/yIvbRmNdBZ9rWIT02lOkhbUka3aZnpb6 vyKzqGPmCtw6RtEHhh+xUJ+OIrVUJFEz4rBGM/z7b2d0WJMTmn8rLHTU1MgMzWFIBU2z BFNBcnXoLvotMeFD2TWlNs9d4/ZCT+G6VJRYwQf6QBTX2VKgxjymg72HotLmaO+l+GPB I7ZgwSGj0ywEdysjoL5C5J8d1eJVmHqkOFz17ulnh6YPfCGs0kl9d54Oanz2JJlLBq8d bZPSbm7gtj1XMfA69gHjCA2LH5Nl5Uy3XsBcSWe+vo0akZNBFmbIbAP8BNLGfDCAQnun 57fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id b74-v6si2785014oii.106.2018.09.05.22.44.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 22:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w865hgVf010700 for ; Thu, 6 Sep 2018 01:43:59 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mat7a8kc9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 06 Sep 2018 01:43:59 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Sep 2018 01:43:58 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 6 Sep 2018 01:43:55 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w865hsUi38797416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Sep 2018 05:43:54 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E693E124054; Thu, 6 Sep 2018 02:44:23 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9010A124053; Thu, 6 Sep 2018 02:44:21 -0400 (EDT) Received: from skywalker.ibmuc.com (unknown [9.102.0.183]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 6 Sep 2018 02:44:21 -0400 (EDT) From: "Aneesh Kumar K.V" To: akpm@linux-foundation.org, Alexey Kardashevskiy , mpe@ellerman.id.au Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" Subject: [RFC PATCH V2 1/4] mm: Export alloc_migrate_huge_page Date: Thu, 6 Sep 2018 11:13:39 +0530 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 18090605-0064-0000-0000-00000347C5FF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009676; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01084227; UDB=6.00559596; IPR=6.00864226; MB=3.00023138; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-06 05:43:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090605-0065-0000-0000-00003A8C7721 Message-Id: <20180906054342.25094-1-aneesh.kumar@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-06_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=883 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809060061 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000060, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP We want to use this to support customized huge page migration. Signed-off-by: Aneesh Kumar K.V --- include/linux/hugetlb.h | 2 ++ mm/hugetlb.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index c39d9170a8a0..98c9c6dc308c 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -357,6 +357,8 @@ struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, nodemask_t *nmask); struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma, unsigned long address); +struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask, + int nid, nodemask_t *nmask); int huge_add_to_page_cache(struct page *page, struct address_space *mapping, pgoff_t idx); diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 47566bb0b4b1..88881b3f8628 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1586,8 +1586,8 @@ static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask, return page; } -static struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask, - int nid, nodemask_t *nmask) +struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask, + int nid, nodemask_t *nmask) { struct page *page;