From patchwork Fri Oct 12 03:59:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10637817 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 58A3F933 for ; Fri, 12 Oct 2018 04:00:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 485A52BDF0 for ; Fri, 12 Oct 2018 04:00:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C5C72BE0B; Fri, 12 Oct 2018 04:00:33 +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 B61182BDF0 for ; Fri, 12 Oct 2018 04:00:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 96AB46B0008; Fri, 12 Oct 2018 00:00:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 91B436B000A; Fri, 12 Oct 2018 00:00:31 -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 79A526B000C; Fri, 12 Oct 2018 00:00:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by kanga.kvack.org (Postfix) with ESMTP id 4E14A6B0008 for ; Fri, 12 Oct 2018 00:00:31 -0400 (EDT) Received: by mail-oi1-f200.google.com with SMTP id v188-v6so7632486oie.3 for ; Thu, 11 Oct 2018 21:00:31 -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=fSLTB+suE4jQDkzNmxoT/5zFhEjA42OfsiF/vmuVUcr4l5Q4YKy1Mx3PH0gfrBRzYC Pi9AQX9xvvDYBVP/j1Ee36uY+T/Plt5r0zj6dCsPSO+QyzL9DYtEUOgz5P7syTM0sfbT iB3V6IA3v7ge7b9iOgcW9WMWGRJX1FBO2irJPgJKsbstQrNldYbEGKoiohsL9pqTjDvl LlUsMsYgHVpuDihr3cZEHRfm9MWQgFFWUGQnfqXLod3p2BEhgZF993OSJxbfOzH9sPJ+ uiE1nAewE5ulE6PteV+4OgP/J/6We9JaKHCv79rMiWLissbMajNNC8zIpr5+rO7q8/+o w2MQ== 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: ABuFfoj92xmpiA5uWFtiWLe+pQQZa4cbuq2A2PNy47qm0GaDg44h+rtp IcP+ZFvCo6T0XDR572SGQI17bf+5EeMqdaweJGcMXMDndtcxE6J6jFgHyhx0+Wso4BAAbaW4UW6 CfcIN78gsu+wP0csLah0PStM20ylvw7izHweD1lNFPRvzoCsrhu211+sR5WNANtQP3A== X-Received: by 2002:aca:ce07:: with SMTP id e7-v6mr2522712oig.54.1539316831060; Thu, 11 Oct 2018 21:00:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV60YS8MQEOsu+BLboijT7AuZhloGr+zKDl/Kmdr1dC2LGm5ueCcE8BH7WCAqkXttA7+/SvLP X-Received: by 2002:aca:ce07:: with SMTP id e7-v6mr2522682oig.54.1539316830280; Thu, 11 Oct 2018 21:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539316830; cv=none; d=google.com; s=arc-20160816; b=dYug4H2AC7SFpg7tdwyGYf1Gh6UFVbM3e+AKsNsvRvaXRGj3oktwOjO15pDbimP9uw VI6Rp7fI/A+HkaAo0J+ANYnMLCUtbpE6cqN+UtwFJPQt78quUrNgRWFm/wpJooyu0MKE wOL9JvIIvh6+7bjXoR3G2GY/Fwwx0qVlOuB/gziI20Pcz9PlHXlfSWL7YRaf1IbyMT4J izUbAZNgnNlO69lFq/8wKRjafxxpDi4O7EAKv7LglIJpBcQDLgF/DzeH8INwxl2mvXWp XrFUTpVLfH4GbKsyDw0x0AXVQsi1KFbLFVXePxQqEJGeot7sUwm3vZNlS1+6vAgkUPCl JDRA== 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=hvoBcmxdQu5YEnmoW7X3iUifgVVVRugmN6611/Su6hAdXHV0EDF2qlhT4JyhWPQQIr Lux1//VH++KrtOY9GmQNafwQDUULU6hJqO1MXYw3xlegnGxhJrqYPPwH2tSMh32aJhLe dBIe7ILI+qjVSvYWJrJv0j5BZOhWNGTqdT94Z7BQqguDDsQOiSYyAA36sSYkrfSDB2Yl IwegABKbgrp1JVcuwrPWF+CJrYIvKp/OQ/ZF1UH5ytUMuMY3yigxAr3o2mKZxV8dIFO5 /NcBcRPRiL+NcMf1nGeXDVPPKIbI2Z+H348vQNvmM9aQpThLXnzzPow1KmJhwW/Pq2CG UhIg== 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 p4si4526070otc.88.2018.10.11.21.00.30 for ; Thu, 11 Oct 2018 21:00:30 -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 CE81B15BF; Thu, 11 Oct 2018 21:00:29 -0700 (PDT) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.0.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 087C03F5B7; Thu, 11 Oct 2018 21:00:25 -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 V2 1/5] mm/hugetlb: Enable PUD level huge page migration Date: Fri, 12 Oct 2018 09:29:55 +0530 Message-Id: <1539316799-6064-2-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539316799-6064-1-git-send-email-anshuman.khandual@arm.com> References: <1539316799-6064-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;