From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: kbuild test robot <lkp@intel.com>
Cc: "kbuild-all@01.org" <kbuild-all@01.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <dave.hansen@intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Mel Gorman <mgorman@techsingularity.net>,
Michal Hocko <mhocko@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
Pavel Emelyanov <xemul@parallels.com>,
"Zi Yan" <zi.yan@cs.rutgers.edu>,
Balbir Singh <bsingharora@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Naoya Horiguchi" <nao.horiguchi@gmail.com>
Subject: Re: [PATCH v2 12/12] mm: memory_hotplug: memory hotremove supports thp migration
Date: Tue, 8 Nov 2016 01:36:03 +0000 [thread overview]
Message-ID: <20161108013602.GA20317@hori1.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <201611080850.MhSq3cNm%fengguang.wu@intel.com>
On Tue, Nov 08, 2016 at 08:30:10AM +0800, kbuild test robot wrote:
> Hi Naoya,
>
> [auto build test WARNING on mmotm/master]
> [also build test WARNING on next-20161028]
> [cannot apply to v4.9-rc4]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Naoya-Horiguchi/mm-x86-move-_PAGE_SWP_SOFT_DIRTY-from-bit-7-to-bit-6/20161108-080615
> base: git://git.cmpxchg.org/linux-mmotm.git master
> config: x86_64-randconfig-x003-201645 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> mm/memory_hotplug.c: In function 'try_offline_node':
> mm/memory_hotplug.c:2131:6: warning: unused variable 'i' [-Wunused-variable]
> int i;
> ^
> In file included from include/uapi/linux/stddef.h:1:0,
> from include/linux/stddef.h:4,
> from mm/memory_hotplug.c:7:
This seems unrelated to my patchset, but the fix is easy.
I'll post a separate patch later.
> mm/memory_hotplug.c: In function 'new_node_page':
> include/linux/compiler.h:518:38: error: call to '__compiletime_assert_1575' declared with attribute error: BUILD_BUG failed
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^
> include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
> ______r = !!(cond); \
> ^~~~
> >> mm/memory_hotplug.c:1575:2: note: in expansion of macro 'if'
> if (new_page && order == HPAGE_PMD_ORDER)
> ^~
> include/linux/compiler.h:506:2: note: in expansion of macro '__compiletime_assert'
> __compiletime_assert(condition, msg, prefix, suffix)
> ^~~~~~~~~~~~~~~~~~~~
> include/linux/compiler.h:518:2: note: in expansion of macro '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> ^~~~~~~~~~~~~~~~~~~
> include/linux/bug.h:54:37: note: in expansion of macro 'compiletime_assert'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> include/linux/bug.h:88:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
> ^~~~~~~~~~~~~~~~
> include/linux/huge_mm.h:181:28: note: in expansion of macro 'BUILD_BUG'
> #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> ^~~~~~~~~
> include/linux/huge_mm.h:56:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
> #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
> ^~~~~~~~~~~~~~~
> mm/memory_hotplug.c:1575:27: note: in expansion of macro 'HPAGE_PMD_ORDER'
> if (new_page && order == HPAGE_PMD_ORDER)
> ^~~~~~~~~~~~~~~
HPAGE_PMD_ORDER is not available in non-thp code now, so let's add
a simple wrapper to access it in generic code.
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 3c252cdef587..b75a9a1bbf3e 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -148,6 +148,12 @@ static inline int hpage_nr_pages(struct page *page)
return HPAGE_PMD_NR;
return 1;
}
+static inline int hpage_order(struct page *page)
+{
+ if (unlikely(PageTransHuge(page)))
+ return HPAGE_PMD_ORDER;
+ return 0;
+}
extern int do_huge_pmd_numa_page(struct fault_env *fe, pmd_t orig_pmd);
@@ -183,6 +189,7 @@ static inline bool thp_migration_supported(void)
#define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
#define hpage_nr_pages(x) 1
+#define hpage_order(x) 0
#define transparent_hugepage_enabled(__vma) 0
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index a9c3fe1b55ea..d612a75ceec4 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1555,7 +1555,7 @@ static struct page *new_node_page(struct page *page, unsigned long private,
next_node_in(nid, nmask));
if (thp_migration_supported() && PageTransHuge(page)) {
- order = HPAGE_PMD_ORDER;
+ order = hpage_order(page);
gfp_mask |= GFP_TRANSHUGE;
}
@@ -1572,7 +1572,7 @@ static struct page *new_node_page(struct page *page, unsigned long private,
new_page = __alloc_pages(gfp_mask, order,
node_zonelist(nid, gfp_mask));
- if (new_page && order == HPAGE_PMD_ORDER)
+ if (new_page && order == hpage_order(page))
prep_transhuge_page(new_page);
return new_page;
@@ -1606,7 +1606,7 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
continue;
} else if (thp_migration_supported() && PageTransHuge(page))
pfn = page_to_pfn(compound_head(page))
- + HPAGE_PMD_NR - 1;
+ + hpage_nr_pages(page) - 1;
if (!get_page_unless_zero(page))
continue;
These changes are applied in the next version.
Thanks,
Naoya Horiguchi
>
> vim +/if +1575 mm/memory_hotplug.c
>
> 1559 gfp_mask |= GFP_TRANSHUGE;
> 1560 }
> 1561
> 1562 node_clear(nid, nmask);
> 1563
> 1564 if (PageHighMem(page)
> 1565 || (zone_idx(page_zone(page)) == ZONE_MOVABLE))
> 1566 gfp_mask |= __GFP_HIGHMEM;
> 1567
> 1568 if (!nodes_empty(nmask))
> 1569 new_page = __alloc_pages_nodemask(gfp_mask, order,
> 1570 node_zonelist(nid, gfp_mask), &nmask);
> 1571 if (!new_page)
> 1572 new_page = __alloc_pages(gfp_mask, order,
> 1573 node_zonelist(nid, gfp_mask));
> 1574
> > 1575 if (new_page && order == HPAGE_PMD_ORDER)
> 1576 prep_transhuge_page(new_page);
> 1577
> 1578 return new_page;
> 1579 }
> 1580
> 1581 #define NR_OFFLINE_AT_ONCE_PAGES (256)
> 1582 static int
> 1583 do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2016-11-08 1:42 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 23:31 [PATCH v2 00/12] mm: page migration enhancement for thp Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 01/12] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 6 Naoya Horiguchi
2016-11-10 23:29 ` Dave Hansen
2016-11-11 1:08 ` Naoya Horiguchi
2016-11-11 11:12 ` Kirill A. Shutemov
2016-11-07 23:31 ` [PATCH v2 02/12] mm: mempolicy: add queue_pages_node_check() Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 03/12] mm: thp: introduce separate TTU flag for thp freezing Naoya Horiguchi
2016-11-10 8:31 ` Anshuman Khandual
2016-11-10 9:09 ` Naoya Horiguchi
2016-11-11 3:18 ` Anshuman Khandual
2016-11-11 11:16 ` Kirill A. Shutemov
2016-11-07 23:31 ` [PATCH v2 04/12] mm: thp: introduce CONFIG_ARCH_ENABLE_THP_MIGRATION Naoya Horiguchi
2016-11-11 11:18 ` Kirill A. Shutemov
2016-11-15 2:05 ` Naoya Horiguchi
2016-11-28 14:21 ` Michal Hocko
2016-11-29 7:50 ` Naoya Horiguchi
2016-11-29 8:45 ` Michal Hocko
2016-11-07 23:31 ` [PATCH v2 05/12] mm: thp: add core routines for thp/pmd migration Naoya Horiguchi
2016-11-08 3:05 ` kbuild test robot
2016-11-08 6:46 ` Naoya Horiguchi
2016-11-08 8:13 ` Anshuman Khandual
2016-11-08 8:16 ` Naoya Horiguchi
2016-11-10 8:29 ` Anshuman Khandual
2016-11-10 9:43 ` Naoya Horiguchi
2016-11-14 11:45 ` Kirill A. Shutemov
2016-11-15 4:57 ` Naoya Horiguchi
2016-11-28 14:31 ` Michal Hocko
2016-11-29 7:57 ` Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 06/12] mm: thp: enable thp migration in generic path Naoya Horiguchi
2016-11-28 14:33 ` Michal Hocko
2016-11-29 8:16 ` Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi
2016-11-08 0:23 ` kbuild test robot
2016-11-08 1:22 ` Naoya Horiguchi
2016-11-10 8:36 ` Anshuman Khandual
2016-11-10 9:12 ` Naoya Horiguchi
2016-11-10 9:08 ` Hillf Danton
2016-11-10 9:21 ` Naoya Horiguchi
2016-11-10 9:28 ` Hillf Danton
2016-11-10 9:34 ` Naoya Horiguchi
2016-11-17 23:56 ` Kirill A. Shutemov
2016-11-29 6:46 ` Naoya Horiguchi
2016-11-28 14:35 ` Michal Hocko
2016-11-07 23:31 ` [PATCH v2 08/12] mm: soft-dirty: keep soft-dirty bits over thp migration Naoya Horiguchi
2016-11-10 8:38 ` Anshuman Khandual
2016-11-10 9:13 ` Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 09/12] mm: hwpoison: soft offline supports " Naoya Horiguchi
2016-11-10 10:31 ` Balbir Singh
2016-11-10 23:58 ` Naoya Horiguchi
2016-11-14 23:22 ` Balbir Singh
2016-11-07 23:31 ` [PATCH v2 10/12] mm: mempolicy: mbind and migrate_pages support " Naoya Horiguchi
2016-11-25 12:27 ` Anshuman Khandual
2016-11-29 7:07 ` Naoya Horiguchi
2016-11-07 23:31 ` [PATCH v2 11/12] mm: migrate: move_pages() supports " Naoya Horiguchi
2016-11-18 0:01 ` Kirill A. Shutemov
2016-11-07 23:31 ` [PATCH v2 12/12] mm: memory_hotplug: memory hotremove " Naoya Horiguchi
2016-11-08 0:29 ` kbuild test robot
2016-11-08 0:30 ` kbuild test robot
2016-11-08 1:36 ` Naoya Horiguchi [this message]
2016-11-08 1:41 ` [PATCH] mm: fix unused variable warning Naoya Horiguchi
2016-11-09 2:32 ` [PATCH v2 00/12] mm: page migration enhancement for thp Balbir Singh
2016-11-09 4:59 ` Naoya Horiguchi
2016-11-09 21:28 ` Balbir Singh
2016-11-09 10:33 ` Anshuman Khandual
2016-11-09 23:52 ` Naoya Horiguchi
2016-11-10 14:01 ` Zi Yan
2016-11-11 3:48 ` Anshuman Khandual
2017-01-30 10:47 ` Anshuman Khandual
2017-01-31 19:54 ` Zi Yan
2017-02-03 3:12 ` Hillf Danton
2017-02-03 3:24 ` Zi Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161108013602.GA20317@hori1.linux.bs1.fc.nec.co.jp \
--to=n-horiguchi@ah.jp.nec.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=dave.hansen@intel.com \
--cc=hughd@google.com \
--cc=kbuild-all@01.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=nao.horiguchi@gmail.com \
--cc=vbabka@suse.cz \
--cc=xemul@parallels.com \
--cc=zi.yan@cs.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).