From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks fix
Date: Sun, 20 Aug 2017 17:36:41 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1708201734390.117182@chino.kir.corp.google.com> (raw)
In-Reply-To: <20170818084912.GA18513@dhcp22.suse.cz>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1981 bytes --]
Fix build:
mm/compaction.c: In function a??isolate_freepages_blocka??:
mm/compaction.c:469:4: error: implicit declaration of function a??pageblock_skip_persistenta?? [-Werror=implicit-function-declaration]
if (pageblock_skip_persistent(page, order)) {
^
mm/compaction.c:470:5: error: implicit declaration of function a??set_pageblock_skipa?? [-Werror=implicit-function-declaration]
set_pageblock_skip(page);
^
CMA doesn't guarantee pageblock skip will get reset when migration and
freeing scanners meet, and pageblock skip is a CONFIG_COMPACTION only
feature, so disable it when CONFIG_COMPACTION=n.
Signed-off-by: David Rientjes <rientjes@google.com>
---
include/linux/pageblock-flags.h | 11 +++++++++++
mm/compaction.c | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h
--- a/include/linux/pageblock-flags.h
+++ b/include/linux/pageblock-flags.h
@@ -96,6 +96,17 @@ void set_pfnblock_flags_mask(struct page *page,
#define set_pageblock_skip(page) \
set_pageblock_flags_group(page, 1, PB_migrate_skip, \
PB_migrate_skip)
+#else
+static inline bool get_pageblock_skip(struct page *page)
+{
+ return false;
+}
+static inline void clear_pageblock_skip(struct page *page)
+{
+}
+static inline void set_pageblock_skip(struct page *page)
+{
+}
#endif /* CONFIG_COMPACTION */
#endif /* PAGEBLOCK_FLAGS_H */
diff --git a/mm/compaction.c b/mm/compaction.c
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -322,7 +322,13 @@ static inline bool isolation_suitable(struct compact_control *cc,
return true;
}
-static void update_pageblock_skip(struct compact_control *cc,
+static inline bool pageblock_skip_persistent(struct page *page,
+ unsigned int order)
+{
+ return false;
+}
+
+static inline void update_pageblock_skip(struct compact_control *cc,
struct page *page, unsigned long nr_isolated,
bool migrate_scanner)
{
next prev parent reply other threads:[~2017-08-21 0:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 23:39 [patch 1/2] mm, compaction: kcompactd should not ignore pageblock skip David Rientjes
2017-08-15 23:39 ` [patch 2/2] mm, compaction: persistently skip hugetlbfs pageblocks David Rientjes
2017-08-18 8:49 ` Michal Hocko
2017-08-21 0:36 ` David Rientjes [this message]
2017-08-21 6:37 ` [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks fix Michal Hocko
2017-08-23 8:41 ` [patch 2/2] mm, compaction: persistently skip hugetlbfs pageblocks Vlastimil Babka
2017-09-01 12:32 ` Vlastimil Babka
2017-09-11 1:13 ` David Rientjes
2017-09-11 1:12 ` David Rientjes
2017-09-11 6:50 ` Vlastimil Babka
2017-09-11 21:11 ` David Rientjes
2017-08-23 8:23 ` [patch 1/2] mm, compaction: kcompactd should not ignore pageblock skip Vlastimil Babka
2017-09-11 1:07 ` David Rientjes
2017-09-11 6:34 ` Vlastimil Babka
2017-09-11 21:13 ` David Rientjes
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=alpine.DEB.2.10.1708201734390.117182@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=vbabka@suse.cz \
/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