Re: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected





On Mon, 25 Aug 2008, Linus Torvalds wrote:

But I'll look at your vmlinux, see what stands out.

Oops. I already see the problem.

Your .config has soem _huge_ CPU count, doesn't it?

checkstack.pl shows these things as the top problems:

0xffffffff80266234 smp_call_function_mask [vmlinux]: 2736
0xffffffff80234747 __build_sched_domains [vmlinux]: 2232
0xffffffff8023523f __build_sched_domains [vmlinux]: 2232
0xffffffff8021e884 setup_IO_APIC_irq [vmlinux]: 1616
0xffffffff8021ee24 arch_setup_ht_irq [vmlinux]: 1600
0xffffffff8021f144 arch_setup_msi_irq [vmlinux]: 1600
0xffffffff8021e3b0 __assign_irq_vector [vmlinux]: 1592
0xffffffff8021e626 __assign_irq_vector [vmlinux]: 1592
0xffffffff8023257e move_task_off_dead_cpu [vmlinux]: 1592
0xffffffff802326e8 move_task_off_dead_cpu [vmlinux]: 1592
0xffffffff8025dbc5 tick_handle_oneshot_broadcast [vmlinux]:1544
0xffffffff8025dcb4 tick_handle_oneshot_broadcast [vmlinux]:1544
0xffffffff803f3dc4 store_scaling_governor [vmlinux]: 1376
0xffffffff80279ef4 cpuset_write_resmask [vmlinux]: 1360
0xffffffff803f465d cpufreq_add_dev [vmlinux]: 1352
0xffffffff803f495b cpufreq_add_dev [vmlinux]: 1352
0xffffffff803f3fc4 store_scaling_max_freq [vmlinux]: 1328
0xffffffff803f4064 store_scaling_min_freq [vmlinux]: 1328
0xffffffff803f44c4 cpufreq_update_policy [vmlinux]: 1328
..

and sys_init_module is actually way way down the list. I bet the only
reason it showed up at all was because dynamically it was such a deep
callchain, and part of that callchain probably called some of those really
nasty things.

Anyway, the reason smp_call_function_mask and friends have such _huge_
stack usages for you is that they contain a 'cpumask_t' on the stack.

For example, for me, usign a sane NR_CPU, the size of the stack frame for
smp_call_function_mask is under 200 bytes. For you, it's 2736 bytes.

How about you make CONFIG_NR_CPU's something _sane_? Like 16? Or do you
really have four thousand CPU's in that system?

Oh, I guess you have the MAXSMP config enabled? I really think that was a
bit too aggressive.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [3/6] make IRQ stacks independently configurable (was: Re: [-mm patch] i386: enable 4k stacks by
    ... Divorce IRQ stack configuration from CONFIG_4KSTACKS, ... config VMALLOC_STACK ... bool "Use 32KB for kernel stacks" ... +#ifdef CONFIG_IRQSTACKS ...
    (Linux-Kernel)
  • Re: Bad port on 470-48T switch
    ... unit it will get all MLT and vlan info? ... I just swap that switch out for a new one will it automatically pull ... The new ES470 will pull all configuration from entire stack. ... as long as the stack remains powered up, the stack will operate as one unit and when the new base is installed the other units provide the config. ...
    (comp.dcom.sys.nortel)
  • Re: Bad port on 470-48T switch
    ... unit it will get all MLT and vlan info? ... I just swap that switch out for a new one will it automatically pull ... The new ES470 will pull all configuration from entire stack. ... as long as the stack remains powered up, the stack will operate as one unit and when the new base is installed the other units provide the config. ...
    (comp.dcom.sys.nortel)
  • [PATCH] s390: kernel stack options.
    ... the stack frames of kernel functions. ... reduction of kernel stack use. ... +config PACK_STACK ...
    (Linux-Kernel)
  • Re: Realtime Preemption, 2.6.12, Beginners Guide?
    ... > attached my config, which has CONFIG_4KSTACKS and the options you ... But it's not necessarily a stack overflow - ... Does that make the crash ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)