From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753462AbdHUAgp (ORCPT ); Sun, 20 Aug 2017 20:36:45 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:36093 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbdHUAgo (ORCPT ); Sun, 20 Aug 2017 20:36:44 -0400 Date: Sun, 20 Aug 2017 17:36:41 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton , Michal Hocko cc: Vlastimil Babka , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks fix In-Reply-To: <20170818084912.GA18513@dhcp22.suse.cz> Message-ID: References: <20170818084912.GA18513@dhcp22.suse.cz> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1113868975-761508760-1503275802=:117182" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1113868975-761508760-1503275802=:117182 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Fix build: mm/compaction.c: In function ‘isolate_freepages_block’: mm/compaction.c:469:4: error: implicit declaration of function ‘pageblock_skip_persistent’ [-Werror=implicit-function-declaration] if (pageblock_skip_persistent(page, order)) { ^ mm/compaction.c:470:5: error: implicit declaration of function ‘set_pageblock_skip’ [-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 --- 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) { --1113868975-761508760-1503275802=:117182--