From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by kanga.kvack.org (Postfix) with ESMTP id 4C04F6B000A for ; Fri, 19 Oct 2018 04:10:02 -0400 (EDT) Received: by mail-pf1-f197.google.com with SMTP id 14-v6so31270067pfk.22 for ; Fri, 19 Oct 2018 01:10:02 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id s14-v6si71087plp.352.2018.10.19.01.10.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Oct 2018 01:10:01 -0700 (PDT) Date: Fri, 19 Oct 2018 10:09:59 +0200 From: Michal Hocko Subject: Re: [PATCH V2 1/5] mm/hugetlb: Enable PUD level huge page migration Message-ID: <20181019080959.GL18839@dhcp22.suse.cz> References: <1539316799-6064-1-git-send-email-anshuman.khandual@arm.com> <1539316799-6064-2-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1539316799-6064-2-git-send-email-anshuman.khandual@arm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Anshuman Khandual Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, suzuki.poulose@arm.com, punit.agrawal@arm.com, will.deacon@arm.com, Steven.Price@arm.com, steve.capper@arm.com, catalin.marinas@arm.com, akpm@linux-foundation.org, mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com I planed to get to review this earlier but been busy. Anyway, this patch should be applied only after movability one to prevent from (theoretical) bisectability issues. I would probably fold it into the one which defines arch specific hook. On Fri 12-10-18 09:29:55, Anshuman Khandual wrote: > 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; > -- > 2.7.4 -- Michal Hocko SUSE Labs