From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 8074D6B0038 for ; Tue, 3 Oct 2017 03:33:03 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id y142so868966wme.12 for ; Tue, 03 Oct 2017 00:33:03 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id d76si8869759wmd.52.2017.10.03.00.33.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 03 Oct 2017 00:33:02 -0700 (PDT) Date: Tue, 3 Oct 2017 09:33:01 +0200 From: Michal Hocko Subject: Re: + mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level.patch added to -mm tree Message-ID: <20171003073301.hydw7jf2wztsx2om@dhcp22.suse.cz> References: <59cd6cfc.gjq2hAb82xF6wYrU%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59cd6cfc.gjq2hAb82xF6wYrU%akpm@linux-foundation.org> Sender: owner-linux-mm@kvack.org List-ID: To: akpm@linux-foundation.org Cc: 00moses.alexander00@gmail.com, aneesh.kumar@linux.vnet.ibm.com, gerald.schaefer@de.ibm.com, khandual@linux.vnet.ibm.com, kirill@shutemov.name, mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com, punit.agrawal@arm.com, mm-commits@vger.kernel.org, linux-mm@kvack.org I am sorry to jump here late On Thu 28-09-17 14:43:24, Andrew Morton wrote: > From: Alexandru Moise <00moses.alexander00@gmail.com> > Subject: mm/madvise: enable soft offline of HugeTLB pages at PUD level > > Since 94310cbcaa3c2 ("mm/madvise: enable (soft|hard) offline of HugeTLB > pages at PGD level") we've been able to soft offline 1G hugepages at the > PGD level, however x86_64 gigantic hugepages are at the PUD level so we > should add an extra check to account for hstate order at PUD level. > > I'm not sure if this also applies to 5 level page tables on x86_64 > however. Tested with 4 level pagetable. This patch is wrong I believe! And I suspect 94310cbcaa3c2 is wrong as well but I am not familiar with ppc enough to be sure. It will allow PUD, PGD pages to be allocated from the zone movable while at least PUD pages are not migrateable for x86_64 AFAIR. Are PGD pages migrateable on ppc? If yes, are there any other architectures to allow PGD hugetlb pages which are not migrateable? Andrew, could you drop it please? > Link: http://lkml.kernel.org/r/20170913101047.GA13026@gmail.com > Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> > Cc: Michal Hocko > Cc: Aneesh Kumar K.V > Cc: Naoya Horiguchi > Cc: Mike Kravetz > Cc: Anshuman Khandual > Cc: Punit Agrawal > Cc: Gerald Schaefer > Cc: "Kirill A. Shutemov" > Signed-off-by: Andrew Morton > --- > > include/linux/hugetlb.h | 1 + > 1 file changed, 1 insertion(+) > > diff -puN include/linux/hugetlb.h~mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level include/linux/hugetlb.h > --- a/include/linux/hugetlb.h~mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level > +++ a/include/linux/hugetlb.h > @@ -480,6 +480,7 @@ static inline bool hugepage_migration_su > { > #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION > if ((huge_page_shift(h) == PMD_SHIFT) || > + (huge_page_shift(h) == PUD_SHIFT) || > (huge_page_shift(h) == PGDIR_SHIFT)) > return true; > else > _ > > Patches currently in -mm which might be from 00moses.alexander00@gmail.com are > > mm-hugetlb-soft_offline-save-compound-page-order-before-page-migration.patch > mm-madvise-enable-soft-offline-of-hugetlb-pages-at-pud-level.patch > -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org