linux-next: build failure after merge of the mm tree
Subsystems (3)
Hi all,
After merging the mm tree, today's linux-next build (powerpc allyesconfig) failed like this:
In file included from mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
92 | }
| ^
Presumably caused by commit
062111898568 ("mm: move per-vma lock into vm_area_struct")
I have applied the following hack for today.
From: Stephen Rothwell <[email protected]>
Date: Mon, 9 Dec 2024 16:33:16 +1100
Subject: [PATCH] fix up for "mm: move per-vma lock into vm_area_struct"
on PowerPC that change causes a frame size error
--- mm/damon/tests/vaddr-kunit.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/damon/tests/vaddr-kunit.h +3 -1
@@ -14,6 +14,7 @@#include <kunit/test.h> +#ifdef notdefstatic int __link_vmas (struct maple_tree *mt,struct vm_area_struct *vmas,ssize_t nr_vmas) {
@@ -90,6 +91,7 @@ static void damon_test_three_regions_in_vmas(struct kunit *test)KUNIT_EXPECT_EQ (test,300ul , regions[2 ].start); KUNIT_EXPECT_EQ(test, 330ul, regions[2].end); } +#endif static struct damon_region *__nth_region_of (struct damon_target *t,int idx) {
@@ -306,7 +308,7 @@ static void damon_test_split_evenly(struct kunit *test) }static struct kunit_case damon_test_cases[] = { -KUNIT_CASE (damon_test_three_regions_in_vmas), +// KUNIT_CASE(damon_test_three_regions_in_vmas), KUNIT_CASE (damon_test_apply_three_regions1),KUNIT_CASE (damon_test_apply_three_regions2),KUNIT_CASE (damon_test_apply_three_regions3),
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Andrew Morton
maintainerQuoted 9 lines · On Mon, 9 Dec 2024 17:08:29 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the mm tree, today's linux-next build (powerpc allyesconfig) failed like this:
In file included from
mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
92 | }
Quoted 6 lines
| ^Presumably caused by commit
062111898568 ("mm: move per-vma lock into
vm_area_struct")
How about this?
From: Andrew Morton <[email protected]>
Subject: mm/damon/tests/vaddr-kunit.h: reduce stack consumption
Date: Mon Dec 9 06:20:01 PM PST 2024
After "mm: move per-vma lock into vm_area_struct" we're hitting
mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
Fix by moving all those vmas off the stack.
---
mm/damon/tests/vaddr-kunit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/tests/vaddr-kunit.h renamed from mm/damon/tests/vaddr-kunit.h~mm-damon-tests-vaddr-kunith-reduce-stack-consumption +1 -1
@@ -68,7 +68,7 @@ static void damon_test_three_regions_in_static struct mm_struct mm;struct damon_addr_range regions[3 ] = {0 };/* 10-20-25, 200-210-220, 300-305, 307-330 */ -struct vm_area_struct vmas[] = { +static const struct vm_area_struct vmas[] = { (struct vm_area_struct ) {.vm_start =10 , .vm_end =20 }, (struct vm_area_struct ) {.vm_start =20 , .vm_end =25 }, (struct vm_area_struct ) {.vm_start =200 , .vm_end =210 },
_
Quoted 14 lines · Andrew Morton
Quoted 11 lines · On Mon, 9 Dec 2024 17:08:29 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the mm tree, today's linux-next build (powerpc allyesconfig) failed like this:
In file included from
mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
92 | }| ^
Quoted 6 lines
Quoted 4 lines
Presumably caused by commit
062111898568 ("mm: move per-vma lock into
vm_area_struct")How about this?
This looks like a good fix. Thanks!
Quoted 37 lines
From: Andrew Morton <[email protected]>
Subject:mm/damon/tests/vaddr-kunit.h: reduce stack consumption
Date: Mon Dec 9 06:20:01 PM PST 2024After "mm: move per-vma lock into
vm_area_struct" we're hitting
mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]Fix by moving all those vmas off the stack.
Reported-by Stephen Rothwell <[email protected]>Cc SeongJae Park <[email protected]>Cc Suren Baghdasaryan <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
mm/damon/tests/vaddr-kunit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/damon/tests/vaddr-kunit.h renamed from mm/damon/tests/vaddr-kunit.h~mm-damon-tests-vaddr-kunith-reduce-stack-consumption +1
-1@@ -68,7 +68,7 @@ static void damon_test_three_regions_in_static struct mm_struct mm;struct damon_addr_range regions[3 ] = {0 };/* 10-20-25, 200-210-220, 300-305, 307-330 */ -struct vm_area_struct vmas[] = { +static const struct vm_area_struct vmas[] = { (struct vm_area_struct ) {.vm_start =10 , .vm_end =20 }, (struct vm_area_struct ) {.vm_start =20 , .vm_end =25 }, (struct vm_area_struct ) {.vm_start =200 , .vm_end =210 },_
Quoted 30 lines · On Mon, 9 Dec 2024 18:25:57 -0800 Andrew Morton <[email protected]>…
Quoted 9 lines · On Mon, 9 Dec 2024 17:08:29 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the mm tree, today's linux-next build (powerpc allyesconfig) failed like this:
In file included from
mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
92 | }Quoted 6 lines
| ^Presumably caused by commit
062111898568 ("mm: move per-vma lock into
vm_area_struct")How about this?
From: Andrew Morton <[email protected]>
Subject:mm/damon/tests/vaddr-kunit.h: reduce stack consumption
Date: Mon Dec 9 06:20:01 PM PST 2024After "mm: move per-vma lock into
vm_area_struct" we're hitting
mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
Quoted 8 lines
Fix by moving all those vmas off the stack.
Reported-by Stephen Rothwell <[email protected]>Cc SeongJae Park <[email protected]>Cc Suren Baghdasaryan <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Thank you for this quick fix, Andrew.
Quoted 16 lines
---
mm/damon/tests/vaddr-kunit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/damon/tests/vaddr-kunit.h renamed from mm/damon/tests/vaddr-kunit.h~mm-damon-tests-vaddr-kunith-reduce-stack-consumption +1
-1@@ -68,7 +68,7 @@ static void damon_test_three_regions_in_static struct mm_struct mm;struct damon_addr_range regions[3 ] = {0 };/* 10-20-25, 200-210-220, 300-305, 307-330 */ -struct vm_area_struct vmas[] = { +static const struct vm_area_struct vmas[] = { (struct vm_area_struct ) {.vm_start =10 , .vm_end =20 }, (struct vm_area_struct ) {.vm_start =20 , .vm_end =25 }, (struct vm_area_struct ) {.vm_start =200 , .vm_end =210 },
Quoted 1 line
_
Thanks,
SJ
Hi Andrew,
Quoted 2 lines · On Mon, 9 Dec 2024 18:25:57 -0800 Andrew Morton <[email protected]>…
How about this?
Unfortunately:
In file included from mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:81:36: error: passing argument 2 of '__link_vmas' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
81 | if (__link_vmas(&mm.mm_mt, vmas, ARRAY_SIZE(vmas)))
| ^~~~mm/damon/tests/vaddr-kunit.h:17:70: note: expected 'struct vm_area_struct *' but argument is of type 'const struct vm_area_struct *'
17 | static int __link_vmas(struct maple_tree *mt, struct vm_area_struct *vmas,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
Signature · 2 lines
Cheers, Stephen Rothwell
Andrew Morton
maintainerQuoted 6 lines · On Tue, 10 Dec 2024 16:00:11 +1100 Stephen Rothwell <[email protected]>…
Quoted 2 lines · On Mon, 9 Dec 2024 18:25:57 -0800 Andrew Morton <[email protected]>…
How about this?
Unfortunately:
Quoted 8 lines
In file included from
mm/damon/vaddr.c:736:mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':mm/damon/tests/vaddr-kunit.h:81:36: error: passing argument 2 of '__link_vmas' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
81 | if (__link_vmas(&mm.mm_mt, vmas, ARRAY_SIZE(vmas)))
| ^~~~mm/damon/tests/vaddr-kunit.h:17:70: note: expected 'structvm_area_struct*' but argument is of type 'const structvm_area_struct*'
17 | static int __link_vmas(structmaple_tree*mt, structvm_area_struct*vmas,| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
Bah. OK, I'll drop the const.