* + mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch added to -mm tree
@ 2017-06-15 21:12 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-06-15 21:12 UTC (permalink / raw)
To: arnd, n-horiguchi, mm-commits
The patch titled
Subject: mm: hugetlb: replace some macros with inline functions
has been added to the -mm tree. Its filename is
mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Arnd Bergmann <arnd@arndb.de>
Subject: mm: hugetlb: replace some macros with inline functions
All users of dissolve_free_huge_page() that ignore the result cause a
warning when CONFIG_HUGETLB_PAGE is disabled:
mm/memory-failure.c: In function 'me_huge_page':
include/linux/hugetlb.h:556:36: error: statement with no effect [-Werror=unused-value]
#define dissolve_free_huge_page(p) 0
We can avoid this by using an inline function instead of the macro, and I
decided to do the same change for the related helpers as well.
Fixes: mmotm ("mm: hugetlb: soft-offline: dissolve source hugepage after successful migration")
Link: http://lkml.kernel.org/r/20170609102544.2947326-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/hugetlb.h | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff -puN include/linux/hugetlb.h~mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix include/linux/hugetlb.h
--- a/include/linux/hugetlb.h~mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix
+++ a/include/linux/hugetlb.h
@@ -551,16 +551,37 @@ static inline unsigned int pages_per_hug
{
return 1;
}
-#define hstate_index_to_shift(index) 0
-#define hstate_index(h) 0
+
+static inline unsigned hstate_index_to_shift(unsigned index)
+{
+ return 0;
+}
+
+static inline int hstate_index(struct hstate *h)
+{
+ return 0;
+}
static inline pgoff_t basepage_index(struct page *page)
{
return page->index;
}
-#define dissolve_free_huge_page(p) 0
-#define dissolve_free_huge_pages(s, e) 0
-#define hugepage_migration_supported(h) false
+
+static inline int dissolve_free_huge_page(struct page *page)
+{
+ return 0;
+}
+
+static inline int dissolve_free_huge_pages(unsigned long start_pfn,
+ unsigned long end_pfn)
+{
+ return 0;
+}
+
+static inline bool hugepage_migration_supported(struct hstate *h)
+{
+ return false;
+}
static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
struct mm_struct *mm, pte_t *pte)
_
Patches currently in -mm which might be from arnd@arndb.de are
mm-madvise-enable-softhard-offline-of-hugetlb-pages-at-pgd-level-fix.patch
mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-15 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 21:12 + mm-hugetlb-soft-offline-dissolve-source-hugepage-after-successful-migration-fix.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.