From patchwork Tue Oct 23 13:01:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10653191 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 A5DFF14DE for ; Tue, 23 Oct 2018 13:02:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C2FD295FA for ; Tue, 23 Oct 2018 13:02:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FFFB29634; Tue, 23 Oct 2018 13:02:43 +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 20E7C295FA for ; Tue, 23 Oct 2018 13:02:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 24EFB6B0010; Tue, 23 Oct 2018 09:02:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1FEFA6B0266; Tue, 23 Oct 2018 09:02:42 -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 0ED276B0269; Tue, 23 Oct 2018 09:02:42 -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 DE2ED6B0010 for ; Tue, 23 Oct 2018 09:02:41 -0400 (EDT) Received: by mail-oi1-f199.google.com with SMTP id v2-v6so714818oie.3 for ; Tue, 23 Oct 2018 06:02:41 -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=4bITFLQ/WorHHvvoaq0x/1oK2F0Wat3C94019U2dCkk=; b=HEA0Wx6qOWQyZmHSPC0cgMaYDRIkbVp/o0hlnv1ze03kbre6EiDNPKShf7LsfrjR4h CmVfpXtLuF/CPBdzNmmV5qGriPf11jpDNJfBWT2F2YH7c4whkNWsolw5mBjIQuqZg2s0 caS0pe48ZcvHkwDhBdmLTsZDZnBSvenQUUwNNqR0Se+hXQt2ZmpOOm1xB2uucJPGWhmO r5XBL7vMx9eriQ8N5uAqacqOpzIEubXwn6o4MNd+Ju5m0obyGz8TvNGuoDmVJNTYENAz 7PW8C1luYHyGOyAjmSSQLjvmueWyUTItkXgVFfkly4T8kLYxyDzkJudARsvm/iIsdCuX UGfw== 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: AGRZ1gId8rU9B/qaieq3W1pmRzHk3K+0D4bMzp3p4JIujJwYT6FQXsK0 QpZhX9etX4brEQDePuwKeKJrqxgYCRzmgY3asQ9PUV7LhNITNr1zO2tC/t1dowAvrSRSZaua/QP bUG9fuLelslrpEaLJOK5n6/Pr51d0zT1AuJvfsqXTJ4ohpFuDMQ1JGK+NH25Igc+54w== X-Received: by 2002:a9d:7742:: with SMTP id t2mr3654332otl.148.1540299761668; Tue, 23 Oct 2018 06:02:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5eZorOJFuL4w7X85j+xOrFZ/YXRe5VMwXLEyWmsKV9mit77xROCfq0FrhI5sSVkEEXOYZ9x X-Received: by 2002:a9d:7742:: with SMTP id t2mr3654144otl.148.1540299758015; Tue, 23 Oct 2018 06:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540299757; cv=none; d=google.com; s=arc-20160816; b=XnldvWstYg9IEodV18WehdgkFrIH5g1YS29zozXJ+TGALHDq/CYzGzPC5XSlv6SujJ Bg7+mRzPHiUzPRuFM8o0tBpwGeUb1Lma0e7h17t6Jz1ZHPHoOQSzP74HSgugm4ED3OBD YDwvt/IOJ7kxTEY7lDzoqhAixDeJWXnBa0qVn15f+Sg0iUjfF3+YcvgeNLSsjDqELt5X 9iEIptOZGJq/5LZTQzf35RHXsWxUxa1QrxqXhauVtmPtWZ8dKGgLuC9hN6dMDHLzZkVa +Lwl48/fdYFv1XtxNtuR4UzPNVeZpsqgEkQpymGGBd30fgVaL/j6J4K4uWFD6MiyV354 JZtw== 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=4bITFLQ/WorHHvvoaq0x/1oK2F0Wat3C94019U2dCkk=; b=VMxZO4xZfTUYC3dt5IZCu8iYJ7rb8wdap/mxtNGHMcwEgByND3EfkXpbY/r1qb+YF5 4LdaPUGliYjOrd7laenib7b9S6KDa0vpLgmXERRzZ3rCa5OVH6u8ir2BUPryRHk7wp5G LJ5O0yYNl2VD/5JyDrKWj1i68Gbftj34CfO9QlIMt0mRwEW86K6XRU5ZchKzopRR3vAc 3sG/eB4NfyBX6JmAXtCGw+BChDRQFL9UfJa0GrMFKjn3Ld7dHYdCgdEWhiNIv55ulUo/ wwqQtRhEjFWylZiDxlhA8+JQ/8x1DzFYYY/edBcD+jS0HqI5RoXp1T17E/Y1qpg6xsiZ 0GOg== 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 5si539067otr.231.2018.10.23.06.02.37 for ; Tue, 23 Oct 2018 06:02:37 -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 D04AB15AD; Tue, 23 Oct 2018 06:02:36 -0700 (PDT) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 15AB23F6A8; Tue, 23 Oct 2018 06:02:24 -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, 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: [PATCH V3 2/5] mm/hugetlb: Enable PUD level huge page migration Date: Tue, 23 Oct 2018 18:31:58 +0530 Message-Id: <1540299721-26484-3-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540299721-26484-1-git-send-email-anshuman.khandual@arm.com> References: <1540299721-26484-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 Signed-off-by: Anshuman Khandual Reviewed-by: Steve Capper --- 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;