Re: Random panic in load_balance() with 3.16-rc

Linus Torvalds
2014-07-26T19:56:24Z

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

On Sat, Jul 26, 2014 at 12:35 PM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
>
> But fortunately the workaround for the new inode.c bug is the same as
> for the original bug: -fno-var-tracking-assignments.
>
> It would make sense to enabled it unconditionally for all debug
> configurations for now.

So how is code generation affected - if at all? Does the whole
"var-tracking-assignments" thing *only* matter for debug information?

Also, when was it introduced as an option? Can we just unconditionally
enable it, or do we need to be careful about gcc versions?

I'd *like* a debug kernel to not differ significantly from a non-debug
kernel. Most sane kernel developers (where "sane" is "me" by
definition) do not tend to use debug kernels, because the debug
overhead is absolutely disgustingly enormous at build time. But if we
then have most users using distro kernels that had debug info enabled,
it would be sad if code generation differences are huge.

So I'd prefer to just unconditionally add that
"-fno-var-tracking-assignments" to the build.

I just tested it on one file (fs/dcache.c) and it made no difference
at all for my non-debug build. Is this expected?

Because if the only effect of "-fno-var-tracking-assignments" is
potentially slightly worse debug information for variables, I'll
enable it in a jiffy if it fixes this code generation bug. But I'd
like to get that confirmed.

Finally, for CONFIG_DEBUG_INFO_REDUCED, we already use
"-fno-var-tracking". Is that a stronger version that also disables
"var-tracking-assignments"?

Also, Michel - can you try this patch if you still have your
gcc-4.9.0 install, and send me the resulting fair.s file again?

Linus

[-- Attachment #2: patch.diff --]
[-- Type: text/plain, Size: 377 bytes --]

Makefile | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 6b2774145d66..5147f3f23504 100644
--- a/Makefile
+++ b/Makefile
@@ -688,6 +688,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer
endif
endif

+KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
+
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -Wa,-gdwarf-2