Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716113

Re: [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks fix

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks fix
Date 2017-08-21 08:40 +0200
Message-ID <ugOxr-Jy-7@gated-at.bofh.it> (permalink)
References <ueTBg-7O5-7@gated-at.bofh.it> <ueTBg-7O5-13@gated-at.bofh.it> <ufL8D-13v-25@gated-at.bofh.it> <ugIV3-5yZ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun 20-08-17 17:36:41, David Rientjes wrote:
> 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 <rientjes@google.com>

Yes, this passes the compilation test for me.

> ---
>  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)
>  {


-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[patch 1/2] mm, compaction: kcompactd should not ignore pageblock  skip David Rientjes <rientjes@google.com> - 2017-08-16 01:40 +0200
  [patch 2/2] mm, compaction: persistently skip hugetlbfs pageblocks David Rientjes <rientjes@google.com> - 2017-08-16 01:40 +0200
    Re: [patch 2/2] mm, compaction: persistently skip hugetlbfs  pageblocks Michal Hocko <mhocko@kernel.org> - 2017-08-18 10:50 +0200
      [patch -mm] mm, compaction: persistently skip hugetlbfs pageblocks  fix David Rientjes <rientjes@google.com> - 2017-08-21 02:40 +0200
        Re: [patch -mm] mm, compaction: persistently skip hugetlbfs  pageblocks fix Michal Hocko <mhocko@kernel.org> - 2017-08-21 08:40 +0200
    Re: [patch 2/2] mm, compaction: persistently skip hugetlbfs  pageblocks Vlastimil Babka <vbabka@suse.cz> - 2017-08-23 10:50 +0200
  Re: [patch 1/2] mm, compaction: kcompactd should not ignore pageblock  skip Vlastimil Babka <vbabka@suse.cz> - 2017-08-23 10:30 +0200

csiph-web