Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Sat, Jun 17, 2017 at 08:37:21AM -0700, Guenter Roeck wrote: > On Fri, Jun 16, 2017 at 01:37:21PM -0700, wrote: > > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner> > wrote: > > > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > > include is removed, the below patch compiles on: x86 allno, x86_64 > > > allno, and my regular x86_64 config: > > > > > > --- > > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > > > Did you try x86_64 allmodconfig? I'm getting a mess: > > > > In file included from ./include/linux/mm.h:1032, > > from ./include/linux/highmem.h:7, > > from ./include/linux/bio.h:21, > > from ./include/linux/writeback.h:205, > > from ./include/linux/memcontrol.h:28, > > from ./include/linux/swap.h:8, > > from ./include/linux/suspend.h:4, > > from arch/x86/kernel/asm-offsets.c:12: > > ./include/linux/vmstat.h: In function 'lruvec_page_state': > > ./include/linux/vmstat.h:362: error: implicit declaration of function > > 'mem_cgroup_disabled' > > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete > > type > > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration > > of 'type name' > > ... > > > > Presumably because we have memcontrol.h indirectly including mm.h which > > includes vmstat.h (from a stupid place) and with this patch we have > > vmstat.h including memcontrol.h. > > > > How about the following ? Seems to be less invasive, and it fixes the > immediate problem. > > Guenter > > --- > From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 > From: Guenter Roeck > Date: Sat, 17 Jun 2017 08:15:57 -0700 > Subject: [PATCH] hexagon: Fix build error caused by include file order > > hexagon builds fail with the following error message. > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, >from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: > implicit declaration of function 'page_zone' > > Drop unnecessary includes from header files and add missing > includes to source files to fix the problem. > > Cc: Johannes Weiner > Cc: Andrew Morton > Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") > Signed-off-by: Guenter Roeck If they're not needed, all the better. Thanks! Acked-by: Johannes Weiner
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Sat, Jun 17, 2017 at 08:37:21AM -0700, Guenter Roeck wrote: > On Fri, Jun 16, 2017 at 01:37:21PM -0700, wrote: > > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner > > wrote: > > > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > > include is removed, the below patch compiles on: x86 allno, x86_64 > > > allno, and my regular x86_64 config: > > > > > > --- > > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > > > Did you try x86_64 allmodconfig? I'm getting a mess: > > > > In file included from ./include/linux/mm.h:1032, > > from ./include/linux/highmem.h:7, > > from ./include/linux/bio.h:21, > > from ./include/linux/writeback.h:205, > > from ./include/linux/memcontrol.h:28, > > from ./include/linux/swap.h:8, > > from ./include/linux/suspend.h:4, > > from arch/x86/kernel/asm-offsets.c:12: > > ./include/linux/vmstat.h: In function 'lruvec_page_state': > > ./include/linux/vmstat.h:362: error: implicit declaration of function > > 'mem_cgroup_disabled' > > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete > > type > > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration > > of 'type name' > > ... > > > > Presumably because we have memcontrol.h indirectly including mm.h which > > includes vmstat.h (from a stupid place) and with this patch we have > > vmstat.h including memcontrol.h. > > > > How about the following ? Seems to be less invasive, and it fixes the > immediate problem. > > Guenter > > --- > From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 > From: Guenter Roeck > Date: Sat, 17 Jun 2017 08:15:57 -0700 > Subject: [PATCH] hexagon: Fix build error caused by include file order > > hexagon builds fail with the following error message. > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, >from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: > implicit declaration of function 'page_zone' > > Drop unnecessary includes from header files and add missing > includes to source files to fix the problem. > > Cc: Johannes Weiner > Cc: Andrew Morton > Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") > Signed-off-by: Guenter Roeck If they're not needed, all the better. Thanks! Acked-by: Johannes Weiner
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
[resending; somehow Andrew got lost in my first reply] On Fri, Jun 16, 2017 at 01:37:21PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weinerwrote: > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > include is removed, the below patch compiles on: x86 allno, x86_64 > > allno, and my regular x86_64 config: > > > > --- > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > Did you try x86_64 allmodconfig? I'm getting a mess: > > In file included from ./include/linux/mm.h:1032, > from ./include/linux/highmem.h:7, > from ./include/linux/bio.h:21, > from ./include/linux/writeback.h:205, > from ./include/linux/memcontrol.h:28, > from ./include/linux/swap.h:8, > from ./include/linux/suspend.h:4, > from arch/x86/kernel/asm-offsets.c:12: > ./include/linux/vmstat.h: In function 'lruvec_page_state': > ./include/linux/vmstat.h:362: error: implicit declaration of function > 'mem_cgroup_disabled' > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of > 'type name' > ... > > Presumably because we have memcontrol.h indirectly including mm.h which > includes vmstat.h (from a stupid place) and with this patch we have > vmstat.h including memcontrol.h. > How about the following ? Seems to be less invasive, and it fixes the immediate problem. Guenter --- >From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Jun 2017 08:15:57 -0700 Subject: [PATCH] hexagon: Fix build error caused by include file order hexagon builds fail with the following error message. In file included from ./include/linux/memcontrol.h:30:0, from ./include/linux/swap.h:8, from ./arch/hexagon/include/asm/pgtable.h:27, from ./include/linux/mm.h:70, from arch/hexagon/kernel/asm-offsets.c:28: ./include/linux/vmstat.h: In function '__inc_zone_page_state': ./include/linux/vmstat.h:294:2: error: implicit declaration of function 'page_zone' Drop unnecessary includes from header files and add missing includes to source files to fix the problem. Cc: Johannes Weiner Cc: Andrew Morton Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Guenter Roeck --- arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 24a9177fb897..aef02f7ca8aa 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -24,7 +24,6 @@ /* * Page table definitions for Qualcomm Hexagon processor. */ -#include #include #define __ARCH_USE_5LEVEL_HACK #include diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 308be68d4fb3..3980c0407aa1 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index 9647d00cb761..b474065533ce 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c @@ -24,6 +24,7 @@ * be instantiated for it, differently from a native build. */ #include +#include #include #include -- 2.7.4
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
[resending; somehow Andrew got lost in my first reply] On Fri, Jun 16, 2017 at 01:37:21PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner wrote: > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > include is removed, the below patch compiles on: x86 allno, x86_64 > > allno, and my regular x86_64 config: > > > > --- > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > Did you try x86_64 allmodconfig? I'm getting a mess: > > In file included from ./include/linux/mm.h:1032, > from ./include/linux/highmem.h:7, > from ./include/linux/bio.h:21, > from ./include/linux/writeback.h:205, > from ./include/linux/memcontrol.h:28, > from ./include/linux/swap.h:8, > from ./include/linux/suspend.h:4, > from arch/x86/kernel/asm-offsets.c:12: > ./include/linux/vmstat.h: In function 'lruvec_page_state': > ./include/linux/vmstat.h:362: error: implicit declaration of function > 'mem_cgroup_disabled' > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of > 'type name' > ... > > Presumably because we have memcontrol.h indirectly including mm.h which > includes vmstat.h (from a stupid place) and with this patch we have > vmstat.h including memcontrol.h. > How about the following ? Seems to be less invasive, and it fixes the immediate problem. Guenter --- >From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Jun 2017 08:15:57 -0700 Subject: [PATCH] hexagon: Fix build error caused by include file order hexagon builds fail with the following error message. In file included from ./include/linux/memcontrol.h:30:0, from ./include/linux/swap.h:8, from ./arch/hexagon/include/asm/pgtable.h:27, from ./include/linux/mm.h:70, from arch/hexagon/kernel/asm-offsets.c:28: ./include/linux/vmstat.h: In function '__inc_zone_page_state': ./include/linux/vmstat.h:294:2: error: implicit declaration of function 'page_zone' Drop unnecessary includes from header files and add missing includes to source files to fix the problem. Cc: Johannes Weiner Cc: Andrew Morton Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Guenter Roeck --- arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 24a9177fb897..aef02f7ca8aa 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -24,7 +24,6 @@ /* * Page table definitions for Qualcomm Hexagon processor. */ -#include #include #define __ARCH_USE_5LEVEL_HACK #include diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 308be68d4fb3..3980c0407aa1 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index 9647d00cb761..b474065533ce 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c @@ -24,6 +24,7 @@ * be instantiated for it, differently from a native build. */ #include +#include #include #include -- 2.7.4
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, Jun 16, 2017 at 01:37:21PM -0700, wrote: > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weinerwrote: > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > include is removed, the below patch compiles on: x86 allno, x86_64 > > allno, and my regular x86_64 config: > > > > --- > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > Did you try x86_64 allmodconfig? I'm getting a mess: > > In file included from ./include/linux/mm.h:1032, > from ./include/linux/highmem.h:7, > from ./include/linux/bio.h:21, > from ./include/linux/writeback.h:205, > from ./include/linux/memcontrol.h:28, > from ./include/linux/swap.h:8, > from ./include/linux/suspend.h:4, > from arch/x86/kernel/asm-offsets.c:12: > ./include/linux/vmstat.h: In function 'lruvec_page_state': > ./include/linux/vmstat.h:362: error: implicit declaration of function > 'mem_cgroup_disabled' > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of > 'type name' > ... > > Presumably because we have memcontrol.h indirectly including mm.h which > includes vmstat.h (from a stupid place) and with this patch we have > vmstat.h including memcontrol.h. > How about the following ? Seems to be less invasive, and it fixes the immediate problem. Guenter --- >From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Jun 2017 08:15:57 -0700 Subject: [PATCH] hexagon: Fix build error caused by include file order hexagon builds fail with the following error message. In file included from ./include/linux/memcontrol.h:30:0, from ./include/linux/swap.h:8, from ./arch/hexagon/include/asm/pgtable.h:27, from ./include/linux/mm.h:70, from arch/hexagon/kernel/asm-offsets.c:28: ./include/linux/vmstat.h: In function '__inc_zone_page_state': ./include/linux/vmstat.h:294:2: error: implicit declaration of function 'page_zone' Drop unnecessary includes from header files and add missing includes to source files to fix the problem. Cc: Johannes Weiner Cc: Andrew Morton Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Guenter Roeck --- arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 24a9177fb897..aef02f7ca8aa 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -24,7 +24,6 @@ /* * Page table definitions for Qualcomm Hexagon processor. */ -#include #include #define __ARCH_USE_5LEVEL_HACK #include diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 308be68d4fb3..3980c0407aa1 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index 9647d00cb761..b474065533ce 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c @@ -24,6 +24,7 @@ * be instantiated for it, differently from a native build. */ #include +#include #include #include -- 2.7.4
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, Jun 16, 2017 at 01:37:21PM -0700, wrote: > On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner wrote: > > > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > > include is removed, the below patch compiles on: x86 allno, x86_64 > > allno, and my regular x86_64 config: > > > > --- > > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 > > Did you try x86_64 allmodconfig? I'm getting a mess: > > In file included from ./include/linux/mm.h:1032, > from ./include/linux/highmem.h:7, > from ./include/linux/bio.h:21, > from ./include/linux/writeback.h:205, > from ./include/linux/memcontrol.h:28, > from ./include/linux/swap.h:8, > from ./include/linux/suspend.h:4, > from arch/x86/kernel/asm-offsets.c:12: > ./include/linux/vmstat.h: In function 'lruvec_page_state': > ./include/linux/vmstat.h:362: error: implicit declaration of function > 'mem_cgroup_disabled' > ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type > ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of > 'type name' > ... > > Presumably because we have memcontrol.h indirectly including mm.h which > includes vmstat.h (from a stupid place) and with this patch we have > vmstat.h including memcontrol.h. > How about the following ? Seems to be less invasive, and it fixes the immediate problem. Guenter --- >From 3aa278a36b5f71ff64b28e0cea05182fbcaa72e6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Jun 2017 08:15:57 -0700 Subject: [PATCH] hexagon: Fix build error caused by include file order hexagon builds fail with the following error message. In file included from ./include/linux/memcontrol.h:30:0, from ./include/linux/swap.h:8, from ./arch/hexagon/include/asm/pgtable.h:27, from ./include/linux/mm.h:70, from arch/hexagon/kernel/asm-offsets.c:28: ./include/linux/vmstat.h: In function '__inc_zone_page_state': ./include/linux/vmstat.h:294:2: error: implicit declaration of function 'page_zone' Drop unnecessary includes from header files and add missing includes to source files to fix the problem. Cc: Johannes Weiner Cc: Andrew Morton Fixes: fb6646f52c45 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Guenter Roeck --- arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 24a9177fb897..aef02f7ca8aa 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -24,7 +24,6 @@ /* * Page table definitions for Qualcomm Hexagon processor. */ -#include #include #define __ARCH_USE_5LEVEL_HACK #include diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 308be68d4fb3..3980c0407aa1 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index 9647d00cb761..b474065533ce 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c @@ -24,6 +24,7 @@ * be instantiated for it, differently from a native build. */ #include +#include #include #include -- 2.7.4
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weinerwrote: > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > include is removed, the below patch compiles on: x86 allno, x86_64 > allno, and my regular x86_64 config: > > --- > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 Did you try x86_64 allmodconfig? I'm getting a mess: In file included from ./include/linux/mm.h:1032, from ./include/linux/highmem.h:7, from ./include/linux/bio.h:21, from ./include/linux/writeback.h:205, from ./include/linux/memcontrol.h:28, from ./include/linux/swap.h:8, from ./include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: ./include/linux/vmstat.h: In function 'lruvec_page_state': ./include/linux/vmstat.h:362: error: implicit declaration of function 'mem_cgroup_disabled' ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of 'type name' ... Presumably because we have memcontrol.h indirectly including mm.h which includes vmstat.h (from a stupid place) and with this patch we have vmstat.h including memcontrol.h.
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, 16 Jun 2017 16:15:23 -0400 Johannes Weiner wrote: > In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that > include is removed, the below patch compiles on: x86 allno, x86_64 > allno, and my regular x86_64 config: > > --- > Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 Did you try x86_64 allmodconfig? I'm getting a mess: In file included from ./include/linux/mm.h:1032, from ./include/linux/highmem.h:7, from ./include/linux/bio.h:21, from ./include/linux/writeback.h:205, from ./include/linux/memcontrol.h:28, from ./include/linux/swap.h:8, from ./include/linux/suspend.h:4, from arch/x86/kernel/asm-offsets.c:12: ./include/linux/vmstat.h: In function 'lruvec_page_state': ./include/linux/vmstat.h:362: error: implicit declaration of function 'mem_cgroup_disabled' ./include/linux/vmstat.h:365: error: dereferencing pointer to incomplete type ./include/linux/vmstat.h:365: error: type defaults to 'int' in declaration of 'type name' ... Presumably because we have memcontrol.h indirectly including mm.h which includes vmstat.h (from a stupid place) and with this patch we have vmstat.h including memcontrol.h.
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, Jun 16, 2017 at 12:14:53PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weinerwrote: > > > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > > Hi, > > > > > > I see the following build error in -next when building hexagon images. > > > > > > CC arch/hexagon/kernel/asm-offsets.s > > > In file included from ./include/linux/memcontrol.h:30:0, > > > from ./include/linux/swap.h:8, > > > from ./arch/hexagon/include/asm/pgtable.h:27, > > > from ./include/linux/mm.h:70, > > > from arch/hexagon/kernel/asm-offsets.c:28: > > > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > > > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > > > 'page_zone' [-Werror=implicit-function-declaration] > > > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > > > '__inc_zone_state' makes pointer from integer without a cast [enabled by > > > default] > > > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but > > > argument is of type 'int' > > > > vmstat.h depends on definitions in mm.h, but mm.h through the above > > chain includes vmstat.h first. It worked in my x86 test because x86 > > pgtable.h doesn't include swap.h. > > > > The headers are a bit of a mess. memcontrol.h is supposed to be a > > lower level header than mm.h and vmstat.h, yet the new accounting > > functions depend on mm.h definitions. > > > > Let's move the lruvec accounting infra to vmstat.h and shuffle > > memcontrol.h into the stack under mm.h and vmstat.h. > > > > Does the following fix the hexagon build? > > This breaks x86_64 allnoconfig. > > arch/x86/mm/pat.c:734: error: redefinition of 'arch_io_reserve_memtype_wc' > ./include/linux/io.h:175: note: previous definition of > 'arch_io_reserve_memtype_wc' was here > arch/x86/mm/pat.c:742: error: redefinition of 'arch_io_free_memtype_wc' > ./include/linux/io.h:181: note: previous definition of > 'arch_io_free_memtype_wc' was here wat: /home/hannes/src/linux/linux/arch/x86/mm/pat.c:734:5: error: redefinition of ‘arch_io_reserve_memtype_wc’ int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size) ^~ In file included from /home/hannes/src/linux/linux/include/linux/irq.h:24:0, from /home/hannes/src/linux/linux/arch/x86/include/asm/hardirq.h:5, from /home/hannes/src/linux/linux/include/linux/hardirq.h:8, from /home/hannes/src/linux/linux/include/linux/memcontrol.h:24, from /home/hannes/src/linux/linux/include/linux/vmstat.h:9, from /home/hannes/src/linux/linux/include/linux/mm.h:1032, from /home/hannes/src/linux/linux/include/linux/pfn_t.h:3, from /home/hannes/src/linux/linux/arch/x86/mm/pat.c:15: /home/hannes/src/linux/linux/include/linux/io.h:175:19: note: previous definition of ‘arch_io_reserve_memtype_wc’ was here static inline int arch_io_reserve_memtype_wc(resource_size_t base, ^~ In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that include is removed, the below patch compiles on: x86 allno, x86_64 allno, and my regular x86_64 config: --- Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, > from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > 'page_zone' [-Werror=implicit-function-declaration] > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > '__inc_zone_state' makes pointer from integer without a cast [enabled by > default] > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but argument > is of type 'int' vmstat.h depends on definitions in mm.h, but mm.h through the above chain includes vmstat.h first. It worked in my x86 test because x86 pgtable.h doesn't include swap.h. The headers are a bit of a mess. memcontrol.h is supposed to be a lower level header than mm.h and vmstat.h, yet the new accounting functions depend on mm.h definitions. Let's move the lruvec accounting infra to vmstat.h and shuffle memcontrol.h into the stack under mm.h and vmstat.h. Reported-by: Guenter
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, Jun 16, 2017 at 12:14:53PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > > > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > > Hi, > > > > > > I see the following build error in -next when building hexagon images. > > > > > > CC arch/hexagon/kernel/asm-offsets.s > > > In file included from ./include/linux/memcontrol.h:30:0, > > > from ./include/linux/swap.h:8, > > > from ./arch/hexagon/include/asm/pgtable.h:27, > > > from ./include/linux/mm.h:70, > > > from arch/hexagon/kernel/asm-offsets.c:28: > > > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > > > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > > > 'page_zone' [-Werror=implicit-function-declaration] > > > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > > > '__inc_zone_state' makes pointer from integer without a cast [enabled by > > > default] > > > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but > > > argument is of type 'int' > > > > vmstat.h depends on definitions in mm.h, but mm.h through the above > > chain includes vmstat.h first. It worked in my x86 test because x86 > > pgtable.h doesn't include swap.h. > > > > The headers are a bit of a mess. memcontrol.h is supposed to be a > > lower level header than mm.h and vmstat.h, yet the new accounting > > functions depend on mm.h definitions. > > > > Let's move the lruvec accounting infra to vmstat.h and shuffle > > memcontrol.h into the stack under mm.h and vmstat.h. > > > > Does the following fix the hexagon build? > > This breaks x86_64 allnoconfig. > > arch/x86/mm/pat.c:734: error: redefinition of 'arch_io_reserve_memtype_wc' > ./include/linux/io.h:175: note: previous definition of > 'arch_io_reserve_memtype_wc' was here > arch/x86/mm/pat.c:742: error: redefinition of 'arch_io_free_memtype_wc' > ./include/linux/io.h:181: note: previous definition of > 'arch_io_free_memtype_wc' was here wat: /home/hannes/src/linux/linux/arch/x86/mm/pat.c:734:5: error: redefinition of ‘arch_io_reserve_memtype_wc’ int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size) ^~ In file included from /home/hannes/src/linux/linux/include/linux/irq.h:24:0, from /home/hannes/src/linux/linux/arch/x86/include/asm/hardirq.h:5, from /home/hannes/src/linux/linux/include/linux/hardirq.h:8, from /home/hannes/src/linux/linux/include/linux/memcontrol.h:24, from /home/hannes/src/linux/linux/include/linux/vmstat.h:9, from /home/hannes/src/linux/linux/include/linux/mm.h:1032, from /home/hannes/src/linux/linux/include/linux/pfn_t.h:3, from /home/hannes/src/linux/linux/arch/x86/mm/pat.c:15: /home/hannes/src/linux/linux/include/linux/io.h:175:19: note: previous definition of ‘arch_io_reserve_memtype_wc’ was here static inline int arch_io_reserve_memtype_wc(resource_size_t base, ^~ In any case, memcontrol.h doesn't/shouldn't need hardirq.h. When that include is removed, the below patch compiles on: x86 allno, x86_64 allno, and my regular x86_64 config: --- Subject: mm-memcontrol-per-lruvec-stats-infrastructure-fix-4 On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, > from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > 'page_zone' [-Werror=implicit-function-declaration] > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > '__inc_zone_state' makes pointer from integer without a cast [enabled by > default] > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but argument > is of type 'int' vmstat.h depends on definitions in mm.h, but mm.h through the above chain includes vmstat.h first. It worked in my x86 test because x86 pgtable.h doesn't include swap.h. The headers are a bit of a mess. memcontrol.h is supposed to be a lower level header than mm.h and vmstat.h, yet the new accounting functions depend on mm.h definitions. Let's move the lruvec accounting infra to vmstat.h and shuffle memcontrol.h into the stack under mm.h and vmstat.h. Reported-by: Guenter Roeck
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weinerwrote: > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > Hi, > > > > I see the following build error in -next when building hexagon images. > > > > CC arch/hexagon/kernel/asm-offsets.s > > In file included from ./include/linux/memcontrol.h:30:0, > > from ./include/linux/swap.h:8, > > from ./arch/hexagon/include/asm/pgtable.h:27, > > from ./include/linux/mm.h:70, > > from arch/hexagon/kernel/asm-offsets.c:28: > > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > > 'page_zone' [-Werror=implicit-function-declaration] > > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > > '__inc_zone_state' makes pointer from integer without a cast [enabled by > > default] > > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but > > argument is of type 'int' > > vmstat.h depends on definitions in mm.h, but mm.h through the above > chain includes vmstat.h first. It worked in my x86 test because x86 > pgtable.h doesn't include swap.h. > > The headers are a bit of a mess. memcontrol.h is supposed to be a > lower level header than mm.h and vmstat.h, yet the new accounting > functions depend on mm.h definitions. > > Let's move the lruvec accounting infra to vmstat.h and shuffle > memcontrol.h into the stack under mm.h and vmstat.h. > > Does the following fix the hexagon build? This breaks x86_64 allnoconfig. arch/x86/mm/pat.c:734: error: redefinition of 'arch_io_reserve_memtype_wc' ./include/linux/io.h:175: note: previous definition of 'arch_io_reserve_memtype_wc' was here arch/x86/mm/pat.c:742: error: redefinition of 'arch_io_free_memtype_wc' ./include/linux/io.h:181: note: previous definition of 'arch_io_free_memtype_wc' was here
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > Hi, > > > > I see the following build error in -next when building hexagon images. > > > > CC arch/hexagon/kernel/asm-offsets.s > > In file included from ./include/linux/memcontrol.h:30:0, > > from ./include/linux/swap.h:8, > > from ./arch/hexagon/include/asm/pgtable.h:27, > > from ./include/linux/mm.h:70, > > from arch/hexagon/kernel/asm-offsets.c:28: > > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > > 'page_zone' [-Werror=implicit-function-declaration] > > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > > '__inc_zone_state' makes pointer from integer without a cast [enabled by > > default] > > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but > > argument is of type 'int' > > vmstat.h depends on definitions in mm.h, but mm.h through the above > chain includes vmstat.h first. It worked in my x86 test because x86 > pgtable.h doesn't include swap.h. > > The headers are a bit of a mess. memcontrol.h is supposed to be a > lower level header than mm.h and vmstat.h, yet the new accounting > functions depend on mm.h definitions. > > Let's move the lruvec accounting infra to vmstat.h and shuffle > memcontrol.h into the stack under mm.h and vmstat.h. > > Does the following fix the hexagon build? This breaks x86_64 allnoconfig. arch/x86/mm/pat.c:734: error: redefinition of 'arch_io_reserve_memtype_wc' ./include/linux/io.h:175: note: previous definition of 'arch_io_reserve_memtype_wc' was here arch/x86/mm/pat.c:742: error: redefinition of 'arch_io_free_memtype_wc' ./include/linux/io.h:181: note: previous definition of 'arch_io_free_memtype_wc' was here
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
Hi Guenter, On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, > from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > 'page_zone' [-Werror=implicit-function-declaration] > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > '__inc_zone_state' makes pointer from integer without a cast [enabled by > default] > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but argument > is of type 'int' vmstat.h depends on definitions in mm.h, but mm.h through the above chain includes vmstat.h first. It worked in my x86 test because x86 pgtable.h doesn't include swap.h. The headers are a bit of a mess. memcontrol.h is supposed to be a lower level header than mm.h and vmstat.h, yet the new accounting functions depend on mm.h definitions. Let's move the lruvec accounting infra to vmstat.h and shuffle memcontrol.h into the stack under mm.h and vmstat.h. Does the following fix the hexagon build? --- diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index da9360885260..10042ada06e6 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include @@ -536,78 +534,6 @@ static inline void mod_memcg_page_state(struct page *page, mod_memcg_state(page->mem_cgroup, idx, val); } -static inline unsigned long lruvec_page_state(struct lruvec *lruvec, - enum node_stat_item idx) -{ - struct mem_cgroup_per_node *pn; - long val = 0; - int cpu; - - if (mem_cgroup_disabled()) - return node_page_state(lruvec_pgdat(lruvec), idx); - - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - for_each_possible_cpu(cpu) - val += per_cpu(pn->lruvec_stat->count[idx], cpu); - - if (val < 0) - val = 0; - - return val; -} - -static inline void __mod_lruvec_state(struct lruvec *lruvec, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - __mod_node_page_state(lruvec_pgdat(lruvec), idx, val); - if (mem_cgroup_disabled()) - return; - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - __mod_memcg_state(pn->memcg, idx, val); - __this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void mod_lruvec_state(struct lruvec *lruvec, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - mod_node_page_state(lruvec_pgdat(lruvec), idx, val); - if (mem_cgroup_disabled()) - return; - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - mod_memcg_state(pn->memcg, idx, val); - this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void __mod_lruvec_page_state(struct page *page, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - __mod_node_page_state(page_pgdat(page), idx, val); - if (mem_cgroup_disabled() || !page->mem_cgroup) - return; - __mod_memcg_state(page->mem_cgroup, idx, val); - pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; - __this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void mod_lruvec_page_state(struct page *page, -enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - mod_node_page_state(page_pgdat(page), idx, val); - if (mem_cgroup_disabled() || !page->mem_cgroup) - return; - mod_memcg_state(page->mem_cgroup, idx, val); - pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; - this_cpu_add(pn->lruvec_stat->count[idx], val); -} - unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, gfp_t gfp_mask, unsigned long *total_scanned); @@ -835,36 +761,6 @@ static inline void mod_memcg_page_state(struct page *page, { } -static inline unsigned long lruvec_page_state(struct lruvec *lruvec, - enum node_stat_item idx) -{ - return node_page_state(lruvec_pgdat(lruvec), idx); -} - -static inline void __mod_lruvec_state(struct lruvec *lruvec, -
Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'
Hi Guenter, On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from ./include/linux/swap.h:8, > from ./arch/hexagon/include/asm/pgtable.h:27, > from ./include/linux/mm.h:70, > from arch/hexagon/kernel/asm-offsets.c:28: > ./include/linux/vmstat.h: In function '__inc_zone_page_state': > ./include/linux/vmstat.h:294:2: error: implicit declaration of function > 'page_zone' [-Werror=implicit-function-declaration] > ./include/linux/vmstat.h:294:2: warning: passing argument 1 of > '__inc_zone_state' makes pointer from integer without a cast [enabled by > default] > ./include/linux/vmstat.h:267:20: note: expected 'struct zone *' but argument > is of type 'int' vmstat.h depends on definitions in mm.h, but mm.h through the above chain includes vmstat.h first. It worked in my x86 test because x86 pgtable.h doesn't include swap.h. The headers are a bit of a mess. memcontrol.h is supposed to be a lower level header than mm.h and vmstat.h, yet the new accounting functions depend on mm.h definitions. Let's move the lruvec accounting infra to vmstat.h and shuffle memcontrol.h into the stack under mm.h and vmstat.h. Does the following fix the hexagon build? --- diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index da9360885260..10042ada06e6 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include @@ -536,78 +534,6 @@ static inline void mod_memcg_page_state(struct page *page, mod_memcg_state(page->mem_cgroup, idx, val); } -static inline unsigned long lruvec_page_state(struct lruvec *lruvec, - enum node_stat_item idx) -{ - struct mem_cgroup_per_node *pn; - long val = 0; - int cpu; - - if (mem_cgroup_disabled()) - return node_page_state(lruvec_pgdat(lruvec), idx); - - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - for_each_possible_cpu(cpu) - val += per_cpu(pn->lruvec_stat->count[idx], cpu); - - if (val < 0) - val = 0; - - return val; -} - -static inline void __mod_lruvec_state(struct lruvec *lruvec, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - __mod_node_page_state(lruvec_pgdat(lruvec), idx, val); - if (mem_cgroup_disabled()) - return; - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - __mod_memcg_state(pn->memcg, idx, val); - __this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void mod_lruvec_state(struct lruvec *lruvec, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - mod_node_page_state(lruvec_pgdat(lruvec), idx, val); - if (mem_cgroup_disabled()) - return; - pn = container_of(lruvec, struct mem_cgroup_per_node, lruvec); - mod_memcg_state(pn->memcg, idx, val); - this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void __mod_lruvec_page_state(struct page *page, - enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - __mod_node_page_state(page_pgdat(page), idx, val); - if (mem_cgroup_disabled() || !page->mem_cgroup) - return; - __mod_memcg_state(page->mem_cgroup, idx, val); - pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; - __this_cpu_add(pn->lruvec_stat->count[idx], val); -} - -static inline void mod_lruvec_page_state(struct page *page, -enum node_stat_item idx, int val) -{ - struct mem_cgroup_per_node *pn; - - mod_node_page_state(page_pgdat(page), idx, val); - if (mem_cgroup_disabled() || !page->mem_cgroup) - return; - mod_memcg_state(page->mem_cgroup, idx, val); - pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; - this_cpu_add(pn->lruvec_stat->count[idx], val); -} - unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, gfp_t gfp_mask, unsigned long *total_scanned); @@ -835,36 +761,6 @@ static inline void mod_memcg_page_state(struct page *page, { } -static inline unsigned long lruvec_page_state(struct lruvec *lruvec, - enum node_stat_item idx) -{ - return node_page_state(lruvec_pgdat(lruvec), idx); -} - -static inline void __mod_lruvec_state(struct lruvec *lruvec, -