lkml.org 
[lkml]   [2011]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: percpu related boot crash on x86 (was: Linux 2.6.38-rc1)
    From
    Date
    On Wed, 2011-01-19 at 14:56 +0200, Pekka Enberg wrote:
    >
    > On Wed, Jan 19, 2011 at 2:48 PM, Peter Zijlstra
    > <a.p.zijlstra@chello.nl> wrote:
    > > start_kernel()
    > > local_irq_disable()
    > > ...
    > > early_irq_init()
    > > alloc_desc()
    > > alloc_percpu()
    > > __alloc_percpu()
    > > pcpu_alloc()
    > > pcpu_extend_area_map()
    > > pcpu_mem_free()
    > > vfree()
    > > __vunmap()
    > > remove_vm_area()
    > > free_unmap_vmap_area()
    > > vmap_debug_free_range()
    > > #ifdef CONFIG_DEBUG_PAGEALLOC
    > > flush_tlb_kernel_range()
    > > flush_tlb_all()
    > > on_each_cpu()
    > > smp_call_function()
    > > WARN_ON_ONCE(irqs_disabled()....);
    > >
    > >
    > > Not quite sure that to do about that though..
    >
    > Is vmalloc() and vfree() supposed to work with interrupts disabled?

    I'm not sure about vmalloc(), but vfree() has been known to not work
    with IRQs disabled for a long long while.

    Looking at the code neither can work, since vmalloc() can end up calling
    vfree(), what's curious though is that all the BUG_ON()s in there are on
    in_interrupt() instead of for irqs_disabled().

    > I always thought they weren't which would mean something in
    > pcpu_mem_alloc() needs changing...

    Is alloc_percpu() supposed to work from atomic context?


    \
     
     \ /
      Last update: 2011-01-19 14:15    [W:0.021 / U:249.764 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site