linux-next: build warning in Linus' tree
Hi Linus,
Building your tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:
mm/memory_hotplug.c: In function 'try_offline_node':mm/memory_hotplug.c:2120:6: warning: unused variable 'i' [-Wunused-variable]
int i;
^Introduced by commit
9dcb8b685fc3 ("mm: remove per-zone hashtable of bitlock waitqueues")
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Building your tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
Quoted 8 lines
mm/memory_hotplug.c: In function 'try_offline_node':mm/memory_hotplug.c:2120:6: warning: unused variable 'i' [-Wunused-variable]int i; ^Introduced by commit
9dcb8b685fc3("mm: remove per-zone hashtable of bitlock waitqueues")
Strange. I wonder why I didn't see that warning. Not with allmodconfig, and not with my normal build.
[ Looks around ]
Hmm. Apparently "allmodconfig" doesn't actually enable memory hotplug. And the reason is that allmodconfig enables KASAN, which then disables MEMORY_HOTPLUG.
I wonder if we should make KASAN depend on !COMPILE_TEST, because it does seem to disable a lot of build-time testing.
Oh well. I'll remove the stupid unused variable, thanks for the heads-up.
Linus
Quoted 3 lines · Linus Torvalds
I wonder if we should make KASAN depend on !COMPILE_TEST, because it does seem to disable a lot of build-time testing.
Actually, we should probably just make the MEMORY_HOTPLUG dependency be
depends on COMPILE_TEST || !KASAN
since the memory-hotplug code should still *build* with KASAN, it just doesn't work. That's exactly what the COMPILE_TEST config option is there for - to get build coverage even for things that aren't necessarily sane to run.
I'll do that, to get my build coverage up. I really expected my allmodconfig builds to verify that I had removed the per-zone waitqueue code completely, and I'm happy that the breakage was apparently limited to that unused variable..
In the meantime, thanks for noticing and letting me know.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Linus Torvalds
I wonder if we should make KASAN depend on !COMPILE_TEST, because it does seem to disable a lot of build-time testing.
Actually, we should probably just make the
MEMORY_HOTPLUGdependency bedepends on COMPILE_TEST || !KASAN
Maybe we could just reverse the MEMORY_HOTPLUG->!KASAN dependency to make it KASAN->!MEMORY_HOTPLUG?
Is it at all correct that allmodconfig enables KASAN? If/when we have other compiler-based tools, which of them will allmodconfig pick?
Quoted 13 lines
since the memory-hotplug code should still *build* with KASAN, it just doesn't work. That's exactly what the
COMPILE_TESTconfig option is there for - to get build coverage even for things that aren't necessarily sane to run.I'll do that, to get my build coverage up. I really expected my allmodconfig builds to verify that I had removed the per-zone waitqueue code completely, and I'm happy that the breakage was apparently limited to that unused variable..
In the meantime, thanks for noticing and letting me know.
Linus
Signature · 10 lines
Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
Quoted 3 lines · Alexander Potapenko
Maybe we could just reverse the MEMORY_HOTPLUG->!KASAN dependency to make it KASAN->!MEMORY_HOTPLUG?
Yes, that was my initial approach too, but then I decided that I'd rather build-test both together anyway. Since I can. So that just gets me the best of both worlds.
We've had issues like this before, and "make allmodconfig" will never enable _everything_ (ie you always have to make some choices that will disable other cases, if only for reasons like SLUB-vs-SLAB etc).
But in general the more coverage I get from build testing (without having to do lots and lots of builds - that's what the build farms are for after I have pushed things out), the better.
Linus
Hi Linus,
Quoted 2 lines · On Thu, 27 Oct 2016 16:01:22 -0700 Linus Torvalds…
In the meantime, thanks for noticing and letting me know.
It was pointed out by the extra checking you asked me to add in order to easier detect new warnings for code added to linux-next :-)
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Linus,
Quoted 6 lines · Linus Torvalds
Quoted 3 lines · Linus Torvalds
I wonder if we should make KASAN depend on !COMPILE_TEST, because it does seem to disable a lot of build-time testing.
Quoted 8 lines
Actually, we should probably just make the
MEMORY_HOTPLUGdependency bedepends on COMPILE_TEST || !KASANsince the memory-hotplug code should still *build* with KASAN, it just doesn't work. That's exactly what the
COMPILE_TESTconfig option is there for - to get build coverage even for things that aren't necessarily sane to run.
In what way does it not work? Does it crash? People do run COMPILE_TEST=y/allmodconfig kernels.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 12 lines · Geert Uytterhoeven
Hi Linus,
Quoted 8 lines · Linus Torvalds
Quoted 3 lines · Linus Torvalds
I wonder if we should make KASAN depend on !COMPILE_TEST, because it does seem to disable a lot of build-time testing.
Actually, we should probably just make the
MEMORY_HOTPLUGdependency be
Quoted 8 lines
Quoted 6 lines
depends on COMPILE_TEST || !KASANsince the memory-hotplug code should still *build* with KASAN, it just doesn't work. That's exactly what the
COMPILE_TESTconfig option is there for - to get build coverage even for things that aren't necessarily sane to run.In what way does it not work? Does it crash?
It doesn't crash, it will fail to online hotpluged memory.
Originally, we didn't have build-time dependency at all.
It appeared quite recently in 1e185736d214("mm: disable CONFIG_MEMORY_HOTPLUG when KASAN is enabled")
Quoted 13 lines
People do run COMPILE_TEST=y/allmodconfig kernels.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds