From patchwork Tue Oct 2 12:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10623573 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 EC765174A for ; Tue, 2 Oct 2018 12:15:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E491D28884 for ; Tue, 2 Oct 2018 12:15:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D88A328887; Tue, 2 Oct 2018 12:15:48 +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 7FF3B28884 for ; Tue, 2 Oct 2018 12:15:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 355656B0008; Tue, 2 Oct 2018 08:15:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2DB7A6B000A; Tue, 2 Oct 2018 08:15:47 -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 1CA8B6B000C; Tue, 2 Oct 2018 08:15:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by kanga.kvack.org (Postfix) with ESMTP id ED3BD6B0008 for ; Tue, 2 Oct 2018 08:15:46 -0400 (EDT) Received: by mail-oi1-f199.google.com with SMTP id v188-v6so1112516oie.3 for ; Tue, 02 Oct 2018 05:15:46 -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:in-reply-to:references; bh=MuojBUk0nL/v+mqV1BNv2M4agha44zd3BlcKFLfrz0A=; b=AZ9OFx0vJowxGNbKvxPSqt3HXmtFfTe186obztYHBstqm7Ok7B/kPW7VLfC31RJXom D9royhcr6rnywWjQ9oW7ydczjzo3dySL6wY4wdt9wdpGYptBTogMXMjHJuFDHVE0QfDe B/iFfV0KgFNXZSsePTTMdCzctV7HF66oUK6gmq/CsQa1ff/W/2Ct/Vb37Uij+bacpJ/y YZCsJqE053jyDojdBqEtznfoW1HQT6p6/UaKuXH0V93DldD5vVpZq9yn0+qfSbuH82IG G4AteMwk23Xrl96UvfWPW/WG1KBPhFU9W58mA/7l2iWcv1lFIwu/ek89NCZESp8VeoPT 5Z+Q== 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: ABuFfogeK65rxrnWn8MHFr99cTa4nBZRt7L1KSqnCJsQDwBr3l+DjlZc +PJ5UR5fBK5c+L91WihykviW4cRsN//yJJKicaij5eJSrAKXRy1uwp9HeIJfAmEY4+nwZzehJw/ Qkygn5fy7FHHsZxyoruD76iS2O0DFK90vam35is9ZcY1atQXxo6sLVNuAFnw7JuPgwA== X-Received: by 2002:a9d:41f6:: with SMTP id v51-v6mr8357960oti.8.1538482546724; Tue, 02 Oct 2018 05:15:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV63wiDV32eXPNRAOlViCH0zwmM/uAPwEij05f2roiGniFosfyeySvwX+a0hcEYMXkD3QSPMB X-Received: by 2002:a9d:41f6:: with SMTP id v51-v6mr8357933oti.8.1538482546048; Tue, 02 Oct 2018 05:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538482546; cv=none; d=google.com; s=arc-20160816; b=eTzOknByptLb8kYHZCk+3D1bNms+FexedgLrtFrPn5vx4WQndyeI4XEtKKJ7Cfe9iS WjFN6sxZ/u3z2Mz3xyaZMAv4u3v9OXjDobU9yw0u+vBBS4P7oNRsIzdmywsjs201N9UJ sBGlHzYVT2y23mY7d6DccLzSsKR0cbqWlSuXIF15alCZDf7gIgX+zEC/04Ajl1aAZWtS EDrDhW19gYMgR4abXSbMwxqcRymTqpyphCyjnGi7sk12/fEsEfnqXT3rd+QUojozuVKL dsUlbDTmqI0HVJYfUJ6YGP+A8uDU+aqhSFuex8e52Ay7cuGzK4xfPdWq513aX4aBXjNP TL3w== 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=MuojBUk0nL/v+mqV1BNv2M4agha44zd3BlcKFLfrz0A=; b=JcZPmnzteVflvwDBBZZj/FX5mS6nCOkzvTmtXJeLsmCfvUUjyhmixjh/tb77SLKzGc mH1QhkUITgtTd9k+rD4/Tfv97vabfsQNjJCBtSwtLM/jnD6Arg4VoKFMXYSh06HMlLYs L9Ke+eQhc8Gng/BvubBKEe6prVP1Wfjck2t/oeltoUFkT+uPkAnY04QTIgMliQMleEbl rZk8O+DHmWkgrHTuUxFBHf6LoMVlA6KeVPfuFvlzlX3jqVq7l73kAoHYgR2/gjJkFtQe kAYPjQuF3hAQsqkYKnvDZ8zCIn1v6+x+mnwWPxMWoUeOlkcD9+T/dXa8n7X1nHGqNyFi YxzQ== 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 (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id q9-v6si123292otc.25.2018.10.02.05.15.45 for ; Tue, 02 Oct 2018 05:15:45 -0700 (PDT) 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 944D51596; Tue, 2 Oct 2018 05:15:45 -0700 (PDT) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 022B53F5B7; Tue, 2 Oct 2018 05:15:41 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: suzuki.poulose@arm.com, punit.agrawal@arm.com, will.deacon@arm.com, Steven.Price@arm.com, catalin.marinas@arm.com, mhocko@kernel.org, mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com Subject: [PATCH 1/4] mm/hugetlb: Enable PUD level huge page migration Date: Tue, 2 Oct 2018 17:45:28 +0530 Message-Id: <1538482531-26883-2-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538482531-26883-1-git-send-email-anshuman.khandual@arm.com> References: <1538482531-26883-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. 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 6b68e34..9c1b77f 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -483,7 +483,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;