From patchwork Tue Dec 18 08:24:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10735105 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 47FC514E2 for ; Tue, 18 Dec 2018 08:24:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37EEE2A640 for ; Tue, 18 Dec 2018 08:24:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C4F62A644; Tue, 18 Dec 2018 08:24:19 +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 C01B52A640 for ; Tue, 18 Dec 2018 08:24:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E12C08E0006; Tue, 18 Dec 2018 03:24:17 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D9A2B8E0001; Tue, 18 Dec 2018 03:24:17 -0500 (EST) 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 C634A8E0006; Tue, 18 Dec 2018 03:24:17 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by kanga.kvack.org (Postfix) with ESMTP id A065F8E0001 for ; Tue, 18 Dec 2018 03:24:17 -0500 (EST) Received: by mail-ot1-f70.google.com with SMTP id s12so8941958otc.12 for ; Tue, 18 Dec 2018 00:24:17 -0800 (PST) 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:in-reply-to:references; bh=HFpFpNsMXDamKcXKNvB8nUQzeCgTMjPcA+nZ0NzhBTI=; b=AFCt7UP6MOC7TcKBJJfXoY6DJ2/2IRwrtUol46Tt7Iv3JkxMtYveT93XJZ++X/MA7t ZMfFV5ZBn/KJo6Esdw1Uy4UigzpW9mH1bXf+98StbBZMMQV0jHbqTyvHQabx7iKTubUQ 6HZUg1PHVhkwwWaXv4UA/+O1o98a4jyokH2dX2CEoe6jVdEJ+yZ77bGgwnNTRz/fqUov RPf9D32yy2LRcgY7KqcW44K3bhGv1Z5ccGQpyw+EX4V6RbSEHw6qe29jSi6OlOAHZwws hrnqt0cc9N5uDcuN+2XmX6dsglG7RNtF1PdDjdGxl4JKss+zt4wvbWrFgFaBte1i4iOm GCww== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-Gm-Message-State: AA+aEWb2j3Ub/WkZAn4KM7CieYwzSJLvDL8A49fgz4fxEF/tlj1eZNDM tLsKCF0zYuhNJiEVFNH6ey41d5pFSwMyaBvAVK9sYVTwTBZ4Wo0CmnIvIte7oi3gygeAfkq24Y3 oV7hGfMeOcan1y8bxtWCRH2y7xcIQxb5P51uaKIwqaPA+nbV71+nY6+u7ssT6AocfFQ== X-Received: by 2002:aca:cc:: with SMTP id 195mr7376886oia.297.1545121455962; Tue, 18 Dec 2018 00:24:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wf8Wj/fF1k022R/Fza/1688CHfYWrAIc3lPCEArwAj3nyVETfKgl5kewBcwzHgK4jHgeDO X-Received: by 2002:aca:cc:: with SMTP id 195mr7376825oia.297.1545121453652; Tue, 18 Dec 2018 00:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545121453; cv=none; d=google.com; s=arc-20160816; b=TfmYHUxb8OBdQOPUePfStnu2lPjwe3f0ctVM4i+hc2A+EflDgRbo48aqfu45Um0v3D wCZenohfYMcJDH12Y5lebMRX7I2/pxvmS6uyv04IZuX2lQR6Q0S26N5m+as3qO5SuGZS uAJg5RGHD64QLw2QKKihuLG2bVGCfM5dGw7cB2hCSuUloZdwa9/xpS6tnYY39hAFLxxn tfxxS21liULP//Fp9HGzNwYMlQFibC8EGGMtT7lL6kEF2THnE6pnWMKtKaAC2Qk5MRmO 7jd2IaczFuc3YKJfnUBAtPsP4ZzIbNmvRTDvv3k/fyGTkE8hxq9F7QtvYkm56/3weCT3 VU4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=HFpFpNsMXDamKcXKNvB8nUQzeCgTMjPcA+nZ0NzhBTI=; b=vT2ZrcGwGpzTFS98Cd6iPvjvKAoCH5jVKW5fRVXqYg5/Tm/jC+Gvjt14Y5xxa3JG+c M0bBmVLzR7y494RS/nT6NKd5vgIAQkvCHLc4ByMb1JZDtAHH/Kdxi2sGqGk8X17wDs37 dVnpKhetUkLmnuRtvpMpyxS2pAxwiIuN8204dzx+BwkClIIoP560CdkI6N2i7ii3HhNf O8RhbIVTjmczw+bCZS0kQ5gM+ZZ/eZ7KBezbYtxXKztWVk1lqM7Rylwbki7pklT/ErS1 QuiR/hfk3keNylFdgFnRug7Sydm5xePnUhzXN4pZmwdBHfl7BXumXQM6L6uNYC88IxEg Wu0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id 96si6996056otq.153.2018.12.18.00.24.13 for ; Tue, 18 Dec 2018 00:24:13 -0800 (PST) Received-SPF: pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0123C15BF; Tue, 18 Dec 2018 00:24:13 -0800 (PST) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.41.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6BAF93F575; Tue, 18 Dec 2018 00:24:09 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: suzuki.poulose@arm.com, will.deacon@arm.com, Steven.Price@arm.com, steve.capper@arm.com, catalin.marinas@arm.com, mhocko@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com Subject: [RESEND PATCH V3 2/5] mm/hugetlb: Enable PUD level huge page migration Date: Tue, 18 Dec 2018 13:54:07 +0530 Message-Id: <1545121450-1663-3-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545121450-1663-1-git-send-email-anshuman.khandual@arm.com> References: <1545121450-1663-1-git-send-email-anshuman.khandual@arm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 Architectures like arm64 have PUD level HugeTLB pages for certain configs (1GB huge page is PUD based on ARM64_4K_PAGES base page size) that can be enabled for migration. It can be achieved through checking for PUD_SHIFT order based HugeTLB pages during migration. Reviewed-by: Naoya Horiguchi Reviewed-by: Steve Capper Acked-by: Michal Hocko Signed-off-by: Anshuman Khandual --- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 1b858d7..70bcd89 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -497,7 +497,8 @@ static inline bool hugepage_migration_supported(struct hstate *h) { #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION if ((huge_page_shift(h) == PMD_SHIFT) || - (huge_page_shift(h) == PGDIR_SHIFT)) + (huge_page_shift(h) == PUD_SHIFT) || + (huge_page_shift(h) == PGDIR_SHIFT)) return true; else return false;