diff mbox

mmotm 2016-02-03-16-36 uploaded

Message ID 20160204165744.GG14425@dhcp22.suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Hocko Feb. 4, 2016, 4:57 p.m. UTC
[CCing Minchan]

I am getting many compilation errors if !CONFIG_COMPACTION and
CONFIG_MEMORY_ISOLATION=y. I didn't get to check what has hanged in that
regards because this code is quite old but the previous mmotm seemed ok,
maybe some subtle change in my config?

---
mm/page_alloc.c:6893:6: warning: ‘struct compact_control’ declared inside parameter list [enabled by default]
      unsigned long start, unsigned long end)
      ^
mm/page_alloc.c:6893:6: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
mm/page_alloc.c: In function ‘__alloc_contig_migrate_range’:
mm/page_alloc.c:6903:37: error: dereferencing pointer to incomplete type
  while (pfn < end || !list_empty(&cc->migratepages)) {
                                     ^
mm/page_alloc.c:6909:21: error: dereferencing pointer to incomplete type
   if (list_empty(&cc->migratepages)) {
                     ^
mm/page_alloc.c:6910:6: error: dereferencing pointer to incomplete type
    cc->nr_migratepages = 0;
      ^
mm/page_alloc.c:6911:4: error: implicit declaration of function ‘isolate_migratepages_range’ [-Werror=implicit-function-declaration]
    pfn = isolate_migratepages_range(cc, pfn, end);
    ^
mm/page_alloc.c:6922:50: error: dereferencing pointer to incomplete type
   nr_reclaimed = reclaim_clean_pages_from_list(cc->zone,
                                                  ^
mm/page_alloc.c:6923:11: error: dereferencing pointer to incomplete type
        &cc->migratepages);
           ^
mm/page_alloc.c:6924:5: error: dereferencing pointer to incomplete type
   cc->nr_migratepages -= nr_reclaimed;
     ^
mm/page_alloc.c:6926:26: error: dereferencing pointer to incomplete type
   ret = migrate_pages(&cc->migratepages, alloc_migrate_target,
                          ^
mm/page_alloc.c:6927:20: error: dereferencing pointer to incomplete type
         NULL, 0, cc->mode, MR_CMA);
                    ^
mm/page_alloc.c:6930:28: error: dereferencing pointer to incomplete type
   putback_movable_pages(&cc->migratepages);
                            ^
mm/page_alloc.c: In function ‘alloc_contig_range’:
mm/page_alloc.c:6963:9: error: variable ‘cc’ has initializer but incomplete type
  struct compact_control cc = {
         ^
mm/page_alloc.c:6964:3: error: unknown field ‘nr_migratepages’ specified in initializer
   .nr_migratepages = 0,

---
I have tried to do


but that failed during linkage:
mm/built-in.o: In function `alloc_contig_range':
/dev/shm/mhocko/mmotm/mm/page_alloc.c:7062: undefined reference to `isolate_freepages_range'
mm/built-in.o: In function `__alloc_contig_migrate_range':
/dev/shm/mhocko/mmotm/mm/page_alloc.c:6911: undefined reference to `isolate_migratepages_range'

So it really seems that CONFIG_MEMORY_ISOLATION depends on unctionality
provided by CONFIG_COMPACTION. The whole MEMORY_ISOLATION came in
ee6f509c3274 ("mm: factor out memory isolate functions") in 3.6 so quite
some time ago. I do not have a good idea how to untangle this. We can
move isolate_freepages_range and isolate_migratepages_range but then it
needs to do ifdef for both MEMORY_ISOLATION and COMPACTION.

Another option would be to make MEMORY_ISOLATION depend on
COMPACTION. Do we ever need this functionality without compaction?

Comments

Joonsoo Kim Feb. 4, 2016, 5:02 p.m. UTC | #1
2016-02-05 1:57 GMT+09:00 Michal Hocko <mhocko@kernel.org>:
> [CCing Minchan]
>
> I am getting many compilation errors if !CONFIG_COMPACTION and
> CONFIG_MEMORY_ISOLATION=y. I didn't get to check what has hanged in that
> regards because this code is quite old but the previous mmotm seemed ok,
> maybe some subtle change in my config?

It would be caused by Vlastimil's "mm, hugetlb: don't require CMA for
runtime gigantic pages".

https://lkml.org/lkml/2016/2/3/841

Fix is already there.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Hocko Feb. 4, 2016, 5:10 p.m. UTC | #2
On Fri 05-02-16 02:02:08, Joonsoo Kim wrote:
> 2016-02-05 1:57 GMT+09:00 Michal Hocko <mhocko@kernel.org>:
> > [CCing Minchan]
> >
> > I am getting many compilation errors if !CONFIG_COMPACTION and
> > CONFIG_MEMORY_ISOLATION=y. I didn't get to check what has hanged in that
> > regards because this code is quite old but the previous mmotm seemed ok,
> > maybe some subtle change in my config?
> 
> It would be caused by Vlastimil's "mm, hugetlb: don't require CMA for
> runtime gigantic pages".
> 
> https://lkml.org/lkml/2016/2/3/841
> 
> Fix is already there.

What would be the fix? Maybe I have missed it in the current mmotm...
Michal Hocko Feb. 4, 2016, 5:16 p.m. UTC | #3
On Thu 04-02-16 18:10:54, Michal Hocko wrote:
> On Fri 05-02-16 02:02:08, Joonsoo Kim wrote:
> > 2016-02-05 1:57 GMT+09:00 Michal Hocko <mhocko@kernel.org>:
> > > [CCing Minchan]
> > >
> > > I am getting many compilation errors if !CONFIG_COMPACTION and
> > > CONFIG_MEMORY_ISOLATION=y. I didn't get to check what has hanged in that
> > > regards because this code is quite old but the previous mmotm seemed ok,
> > > maybe some subtle change in my config?
> > 
> > It would be caused by Vlastimil's "mm, hugetlb: don't require CMA for
> > runtime gigantic pages".
> > 
> > https://lkml.org/lkml/2016/2/3/841
> > 
> > Fix is already there.
> 
> What would be the fix? Maybe I have missed it in the current mmotm...

Ohh, v2, I should have read the rest of the thread.
diff mbox

Patch

diff --git a/mm/internal.h b/mm/internal.h
index 271ad9567e32..f7c0024a013a 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -150,7 +150,7 @@  extern bool is_free_buddy_page(struct page *page);
 #endif
 extern int user_min_free_kbytes;
 
-#if defined CONFIG_COMPACTION || defined CONFIG_CMA
+#if defined CONFIG_COMPACTION || defined CONFIG_CMA || defined MEMORY_ISOLATION
 
 /*
  * in mm/compaction.c