Skip to contentSkip to conversation

linux-next: build failure after merge of the mm tree

PATCH Stephen Rothwell 4 participants 6 messages Dec 9, 2024 – Dec 10, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index b9fe3bc8472b..564373fadf38 100644
@@ -14,6 +14,7 @@
 
 #include <kunit/test.h>
 
+#ifdef notdef
 static 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
maintainer
#1 lore raw
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 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},

_

#2 lore raw
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 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},

_

maintainer Reviewed-by
#3 lore raw
In reply to Andrew Morton
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 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=]

Quoted 8 lines

Fix by moving all those vmas off the stack.

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

#4 lore raw
In reply to Andrew Morton

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
maintainer
#5 lore raw
Quoted 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 '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,

      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~

Bah. OK, I'll drop the const.