2.6.26.6-rt11: BUGs (sleeping function called from invalid context) - Kernel

This is a discussion on 2.6.26.6-rt11: BUGs (sleeping function called from invalid context) - Kernel ; Three BUGs while booting 2.6.26.7 + rt11 (same hardware: no problems with 2.6.24.7-rt21): Nov 7 10:31:19 host kernel: BUG: sleeping function called from invalid context IRQ-22(540) at arch/x86/mm/highmem_32.c:8 Nov 7 10:31:19 host kernel: in_atomic():0 [00000000], irqs_disabled():1 Nov 7 10:31:19 host ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

  1. 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    Three BUGs while booting 2.6.26.7 + rt11 (same hardware: no problems
    with 2.6.24.7-rt21):

    Nov 7 10:31:19 host kernel: BUG: sleeping function called from invalid
    context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    Nov 7 10:31:19 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    Nov 7 10:31:19 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    Nov 7 10:31:19 host kernel: [] __might_sleep+0xe8/0xed
    Nov 7 10:31:19 host kernel: [] kmap+0x42/0x55
    Nov 7 10:31:19 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    [libata]
    Nov 7 10:31:19 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    [libata]
    Nov 7 10:31:19 host kernel: [] handle_IRQ_event+0x49/0xcd
    Nov 7 10:31:19 host kernel: [] thread_simple_irq+0x45/0x7c
    Nov 7 10:31:19 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:31:19 host kernel: [] do_irqd+0xaf/0x229
    Nov 7 10:31:19 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:31:19 host kernel: [] kthread+0x3b/0x61
    Nov 7 10:31:19 host kernel: [] ? kthread+0x0/0x61
    Nov 7 10:31:19 host kernel: [] kernel_thread_helper+0x7/0x10
    Nov 7 10:31:19 host kernel: =======================


    Nov 7 10:31:01 host kernel: BUG: sleeping function called from invalid
    context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    Nov 7 10:31:01 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    Nov 7 10:31:01 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    Nov 7 10:31:01 host kernel: [] __might_sleep+0xe8/0xed
    Nov 7 10:31:01 host kernel: [] kmap+0x42/0x55
    Nov 7 10:31:01 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    [libata]
    Nov 7 10:31:01 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    [libata]
    Nov 7 10:31:01 host kernel: [] handle_IRQ_event+0x49/0xcd
    Nov 7 10:31:01 host kernel: [] thread_simple_irq+0x45/0x7c
    Nov 7 10:31:01 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:31:01 host kernel: [] do_irqd+0xaf/0x229
    Nov 7 10:31:01 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:31:01 host kernel: [] kthread+0x3b/0x61
    Nov 7 10:31:01 host kernel: [] ? kthread+0x0/0x61
    Nov 7 10:31:01 host kernel: [] kernel_thread_helper+0x7/0x10
    Nov 7 10:31:01 host kernel: =======================


    Nov 7 10:30:58 host kernel: BUG: sleeping function called from invalid
    context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    Nov 7 10:30:58 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    Nov 7 10:30:58 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    Nov 7 10:30:58 host kernel: [] __might_sleep+0xe8/0xed
    Nov 7 10:30:58 host kernel: [] kmap+0x42/0x55
    Nov 7 10:30:58 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    [libata]
    Nov 7 10:30:58 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    [libata]
    Nov 7 10:30:58 host kernel: [] handle_IRQ_event+0x49/0xcd
    Nov 7 10:30:58 host kernel: [] thread_simple_irq+0x45/0x7c
    Nov 7 10:30:58 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:30:58 host kernel: [] do_irqd+0xaf/0x229
    Nov 7 10:30:58 host kernel: [] ? do_irqd+0x0/0x229
    Nov 7 10:30:58 host kernel: [] kthread+0x3b/0x61
    Nov 7 10:30:58 host kernel: [] ? kthread+0x0/0x61
    Nov 7 10:30:58 host kernel: [] kernel_thread_helper+0x7/0x10
    Nov 7 10:30:58 host kernel: =======================

    -- Fernando


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

  2. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)


    Peter, I think we've seen this before. It is the highmem code sleeping.

    On Fri, 7 Nov 2008, Fernando Lopez-Lezcano wrote:

    > Three BUGs while booting 2.6.26.7 + rt11 (same hardware: no problems
    > with 2.6.24.7-rt21):
    >
    > Nov 7 10:31:19 host kernel: BUG: sleeping function called from invalid
    > context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    > Nov 7 10:31:19 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    > Nov 7 10:31:19 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    > 2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    > Nov 7 10:31:19 host kernel: [] __might_sleep+0xe8/0xed
    > Nov 7 10:31:19 host kernel: [] kmap+0x42/0x55


    As here.

    -- Steve

    > Nov 7 10:31:19 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    > [libata]
    > Nov 7 10:31:19 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    > [libata]
    > Nov 7 10:31:19 host kernel: [] handle_IRQ_event+0x49/0xcd
    > Nov 7 10:31:19 host kernel: [] thread_simple_irq+0x45/0x7c
    > Nov 7 10:31:19 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:31:19 host kernel: [] do_irqd+0xaf/0x229
    > Nov 7 10:31:19 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:31:19 host kernel: [] kthread+0x3b/0x61
    > Nov 7 10:31:19 host kernel: [] ? kthread+0x0/0x61
    > Nov 7 10:31:19 host kernel: [] kernel_thread_helper+0x7/0x10
    > Nov 7 10:31:19 host kernel: =======================
    >
    >
    > Nov 7 10:31:01 host kernel: BUG: sleeping function called from invalid
    > context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    > Nov 7 10:31:01 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    > Nov 7 10:31:01 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    > 2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    > Nov 7 10:31:01 host kernel: [] __might_sleep+0xe8/0xed
    > Nov 7 10:31:01 host kernel: [] kmap+0x42/0x55
    > Nov 7 10:31:01 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    > [libata]
    > Nov 7 10:31:01 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    > [libata]
    > Nov 7 10:31:01 host kernel: [] handle_IRQ_event+0x49/0xcd
    > Nov 7 10:31:01 host kernel: [] thread_simple_irq+0x45/0x7c
    > Nov 7 10:31:01 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:31:01 host kernel: [] do_irqd+0xaf/0x229
    > Nov 7 10:31:01 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:31:01 host kernel: [] kthread+0x3b/0x61
    > Nov 7 10:31:01 host kernel: [] ? kthread+0x0/0x61
    > Nov 7 10:31:01 host kernel: [] kernel_thread_helper+0x7/0x10
    > Nov 7 10:31:01 host kernel: =======================
    >
    >
    > Nov 7 10:30:58 host kernel: BUG: sleeping function called from invalid
    > context IRQ-22(540) at arch/x86/mm/highmem_32.c:8
    > Nov 7 10:30:58 host kernel: in_atomic():0 [00000000], irqs_disabled():1
    > Nov 7 10:30:58 host kernel: Pid: 540, comm: IRQ-22 Not tainted
    > 2.6.26.7-1.rt11.1fc9.ccrma.i686.rt #1
    > Nov 7 10:30:58 host kernel: [] __might_sleep+0xe8/0xed
    > Nov 7 10:30:58 host kernel: [] kmap+0x42/0x55
    > Nov 7 10:30:58 host kernel: [] ata_sff_hsm_move+0x3d3/0x66b
    > [libata]
    > Nov 7 10:30:58 host kernel: [] ata_sff_interrupt+0x153/0x1eb
    > [libata]
    > Nov 7 10:30:58 host kernel: [] handle_IRQ_event+0x49/0xcd
    > Nov 7 10:30:58 host kernel: [] thread_simple_irq+0x45/0x7c
    > Nov 7 10:30:58 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:30:58 host kernel: [] do_irqd+0xaf/0x229
    > Nov 7 10:30:58 host kernel: [] ? do_irqd+0x0/0x229
    > Nov 7 10:30:58 host kernel: [] kthread+0x3b/0x61
    > Nov 7 10:30:58 host kernel: [] ? kthread+0x0/0x61
    > Nov 7 10:30:58 host kernel: [] kernel_thread_helper+0x7/0x10
    > Nov 7 10:30:58 host kernel: =======================
    >
    > -- Fernando
    >
    >
    >
    >

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

  3. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > Peter, I think we've seen this before. It is the highmem code sleeping.


    I've been working on an alternative kmap_atomic implementation for -rt,
    the below has been build and booted but not stressed, anybody care to
    give it a spin ?

    ---
    arch/x86/mm/highmem_32.c | 130 ++++++++++++++++++++++++++++++++++++++++++---
    include/asm-x86/highmem.h | 11 ----
    include/linux/sched.h | 5 ++
    kernel/sched.c | 10 ++++
    4 files changed, 137 insertions(+), 19 deletions(-)

    diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
    index dc5cf71..e9f1ea4 100644
    --- a/arch/x86/mm/highmem_32.c
    +++ b/arch/x86/mm/highmem_32.c
    @@ -39,6 +39,12 @@ struct page *kmap_to_page(void *ptr)
    }
    EXPORT_SYMBOL_GPL(kmap_to_page); /* PREEMPT_RT converts some modules to use this */

    +EXPORT_SYMBOL(kmap);
    +EXPORT_SYMBOL(kunmap);
    +EXPORT_SYMBOL(kunmap_virt);
    +
    +#ifndef CONFIG_PREEMPT_RT
    +
    static void debug_kmap_atomic_prot(enum km_type type)
    {
    #ifdef CONFIG_DEBUG_HIGHMEM
    @@ -112,11 +118,6 @@ void *__kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
    return (void *)vaddr;
    }

    -void *__kmap_atomic(struct page *page, enum km_type type)
    -{
    - return kmap_atomic_prot(page, type, kmap_prot);
    -}
    -
    void __kunmap_atomic(void *kvaddr, enum km_type type)
    {
    unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
    @@ -161,6 +162,121 @@ void *__kmap_atomic_pfn(unsigned long pfn, enum km_type type)
    return (void*) vaddr;
    }

    +#else /* CONFIG_PREEMPT_RT */
    +
    +void *__kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
    +{
    + unsigned long vaddr;
    +
    + preempt_disable();
    + pagefault_disable();
    + if (!PageHighMem(page))
    + vaddr = (unsigned long)page_address(page);
    + else {
    + enum fixed_addresses idx;
    + pte_t pte;
    +
    + idx = type + KM_TYPE_NR * smp_processor_id();
    + vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
    + WARN_ON_ONCE(!pte_none(*(kmap_pte - idx)));
    + pte = mk_pte(page, prot);
    + current->kmap_atomic_ptes[idx] = pte;
    + current->kmap_atomic_count++;
    + set_pte(kmap_pte - idx, pte);
    + arch_flush_lazy_mmu_mode();
    + }
    + preempt_enable();
    +
    + return (void *)vaddr;
    +}
    +
    +void __kunmap_atomic(void *kvaddr, enum km_type type)
    +{
    + unsigned long vaddr = (unsigned long)kvaddr & PAGE_MASK;
    + enum fixed_addresses idx;
    +
    + preempt_disable();
    + idx = type + KM_TYPE_NR * smp_processor_id();
    + if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx)) {
    + current->kmap_atomic_ptes[idx] = native_make_pte(0);
    + current->kmap_atomic_count--;
    + kpte_clear_flush(kmap_pte - idx, vaddr);
    + } else {
    +#ifdef CONFIG_DEBUG_HIGHMEM
    + BUG_ON(vaddr < PAGE_OFFSET);
    + BUG_ON(vaddr >= (unsigned long)high_memory);
    +#endif
    + }
    + arch_flush_lazy_mmu_mode();
    + pagefault_enable();
    + preempt_enable();
    +}
    +
    +void *__kmap_atomic_pfn(unsigned long pfn, enum km_type type)
    +{
    + enum fixed_addresses idx;
    + unsigned long vaddr;
    + pte_t pte;
    +
    + preempt_disable();
    + pagefault_disable();
    +
    + idx = type + KM_TYPE_NR*smp_processor_id();
    + vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
    + pte = pfn_pte(pfn, kmap_prot);
    +
    + current->kmap_atomic_ptes[idx] = pte;
    + current->kmap_atomic_count++;
    +
    + set_pte(kmap_pte-idx, pte);
    + arch_flush_lazy_mmu_mode();
    + preempt_enable();
    +
    + return (void*) vaddr;
    +}
    +
    +void arch_kmap_atomic_save(void)
    +{
    + int i;
    +
    + if (!current->kmap_atomic_count)
    + return;
    +
    + arch_enter_lazy_mmu_mode();
    + for (i = 0; i < KM_TYPE_NR; i++) {
    + enum fixed_addresses idx = i + KM_TYPE_NR * smp_processor_id();
    + unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
    +
    + kpte_clear_flush(kmap_pte - idx, vaddr);
    + }
    + arch_leave_lazy_mmu_mode();
    +}
    +
    +void arch_kmap_atomic_restore(void)
    +{
    + int i;
    +
    + if (!current->kmap_atomic_count)
    + return;
    +
    + arch_enter_lazy_mmu_mode();
    + for (i = 0; i < KM_TYPE_NR; i++) {
    + enum fixed_addresses idx = i + KM_TYPE_NR * smp_processor_id();
    + pte_t pte = current->kmap_atomic_ptes[i];
    +
    + if (!pte_none(pte))
    + set_pte(kmap_pte - idx, pte);
    + }
    + arch_leave_lazy_mmu_mode();
    +}
    +
    +#endif /* CONFIG_PREEMPT_RT */
    +
    +void *__kmap_atomic(struct page *page, enum km_type type)
    +{
    + return kmap_atomic_prot(page, type, kmap_prot);
    +}
    +
    struct page *__kmap_atomic_to_page(void *ptr)
    {
    unsigned long idx, vaddr = (unsigned long)ptr;
    @@ -174,8 +290,6 @@ struct page *__kmap_atomic_to_page(void *ptr)
    return pte_page(*pte);
    }

    -EXPORT_SYMBOL(kmap);
    -EXPORT_SYMBOL(kunmap);
    -EXPORT_SYMBOL(kunmap_virt);
    EXPORT_SYMBOL(__kmap_atomic);
    EXPORT_SYMBOL(__kunmap_atomic);
    +
    diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h
    index 61bae9b..2e37334 100644
    --- a/include/asm-x86/highmem.h
    +++ b/include/asm-x86/highmem.h
    @@ -84,22 +84,11 @@ struct page *kmap_atomic_to_page(void *ptr);

    #define flush_cache_kmaps() do { } while (0)

    -/*
    - * on PREEMPT_RT kmap_atomic() is a wrapper that uses kmap():
    - */
    -#ifdef CONFIG_PREEMPT_RT
    -# define kmap_atomic_prot(page, type, prot) ({ pagefault_disable(); kmap(page); })
    -# define kmap_atomic(page, type) ({ pagefault_disable(); kmap(page); })
    -# define kmap_atomic_pfn(pfn, type) kmap(pfn_to_page(pfn))
    -# define kunmap_atomic(kvaddr, type) do { pagefault_enable(); kunmap_virt(kvaddr); } while(0)
    -# define kmap_atomic_to_page(kvaddr) kmap_to_page(kvaddr)
    -#else
    # define kmap_atomic_prot(page, type, prot) __kmap_atomic_prot(page, type, prot)
    # define kmap_atomic(page, type) __kmap_atomic(page, type)
    # define kmap_atomic_pfn(pfn, type) __kmap_atomic_pfn(pfn, type)
    # define kunmap_atomic(kvaddr, type) __kunmap_atomic(kvaddr, type)
    # define kmap_atomic_to_page(kvaddr) __kmap_atomic_to_page(kvaddr)
    -#endif

    #endif /* __KERNEL__ */

    diff --git a/include/linux/sched.h b/include/linux/sched.h
    index 423978b..7dd2b8e 100644
    --- a/include/linux/sched.h
    +++ b/include/linux/sched.h
    @@ -1441,6 +1441,11 @@ struct task_struct {
    */
    int in_printk;
    #endif
    +
    +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_PREEMPT_RT)
    + int kmap_atomic_count;
    + pte_t kmap_atomic_ptes[KM_TYPE_NR];
    +#endif
    };

    #ifdef CONFIG_PREEMPT_RT
    diff --git a/kernel/sched.c b/kernel/sched.c
    index 0d68e79..7b52d3b 100644
    --- a/kernel/sched.c
    +++ b/kernel/sched.c
    @@ -2623,6 +2623,14 @@ EXPORT_SYMBOL(preempt_enable_no_resched);
    #endif


    +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_PREEMPT_RT)
    +extern void arch_kmap_atomic_save(void);
    +extern void arch_kmap_atomic_restore(void);
    +#else
    +static inline void arch_kmap_atomic_save(void) { }
    +static inline void arch_kmap_atomic_restore(void) { }
    +#endif
    +
    /**
    * prepare_task_switch - prepare to switch tasks
    * @rq: the runqueue preparing to switch
    @@ -2741,6 +2749,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
    {
    struct mm_struct *mm, *oldmm;

    + arch_kmap_atomic_save();
    prepare_task_switch(rq, prev, next);
    trace_sched_switch(rq, prev, next);
    mm = next->mm;
    @@ -2788,6 +2797,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
    * frame will be invalid.
    */
    finish_task_switch(this_rq(), prev);
    + arch_kmap_atomic_restore();
    }

    /*


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

  4. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Fri, 2008-11-07 at 20:16 +0100, Peter Zijlstra wrote:
    > On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > > Peter, I think we've seen this before. It is the highmem code sleeping.

    >
    > I've been working on an alternative kmap_atomic implementation for -rt,
    > the below has been build and booted but not stressed, anybody care to
    > give it a spin ?


    I'll give it a try. Anything in particular I should try to do? Or not
    do? Or watch for?

    -- Fernando


    > ---
    > arch/x86/mm/highmem_32.c | 130 ++++++++++++++++++++++++++++++++++++++++++---
    > include/asm-x86/highmem.h | 11 ----
    > include/linux/sched.h | 5 ++
    > kernel/sched.c | 10 ++++
    > 4 files changed, 137 insertions(+), 19 deletions(-)
    > [MUNCH]



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

  5. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Fri, 2008-11-07 at 13:35 -0800, Fernando Lopez-Lezcano wrote:
    > On Fri, 2008-11-07 at 20:16 +0100, Peter Zijlstra wrote:
    > > On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > > > Peter, I think we've seen this before. It is the highmem code sleeping.

    > >
    > > I've been working on an alternative kmap_atomic implementation for -rt,
    > > the below has been build and booted but not stressed, anybody care to
    > > give it a spin ?

    >
    > I'll give it a try. Anything in particular I should try to do? Or not
    > do? Or watch for?


    Lots of I/O should stress the i386 highmem stuff. If all is well it
    works, if not, crashes and splats.

    > -- Fernando
    >
    >
    > > ---
    > > arch/x86/mm/highmem_32.c | 130 ++++++++++++++++++++++++++++++++++++++++++---
    > > include/asm-x86/highmem.h | 11 ----
    > > include/linux/sched.h | 5 ++
    > > kernel/sched.c | 10 ++++
    > > 4 files changed, 137 insertions(+), 19 deletions(-)
    > > [MUNCH]

    >
    >


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

  6. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Fri, 2008-11-07 at 22:47 +0100, Peter Zijlstra wrote:
    > On Fri, 2008-11-07 at 13:35 -0800, Fernando Lopez-Lezcano wrote:
    > > On Fri, 2008-11-07 at 20:16 +0100, Peter Zijlstra wrote:
    > > > On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > > > > Peter, I think we've seen this before. It is the highmem code sleeping.
    > > >
    > > > I've been working on an alternative kmap_atomic implementation for -rt,
    > > > the below has been build and booted but not stressed, anybody care to
    > > > give it a spin ?

    > >
    > > I'll give it a try. Anything in particular I should try to do? Or not
    > > do? Or watch for?

    >
    > Lots of I/O should stress the i386 highmem stuff. If all is well it
    > works, if not, crashes and splats.


    Crashes and splats on boot... sorry, I don't have a way to capture the
    kernel oops (or whatever happens, I can only see the end of the
    printout)

    -- Fernando

    PS: things left on the screen (top to bottom):

    ? speedstep_detect_processor
    ? __copy_from_user_ll_noccache_nozero
    iov_iter_copy_from_user_atomic
    ? generic_file_buffered_write
    generic_file_buffered_write
    ? avs_has_perm_noaudit
    ? __rt_spin_lock
    ? selinux_inode_need_killpriv
    ? __rt_spin_lock
    mnt_drop_write
    __generic_file_aio_write_nolock
    generic_file_aio_write
    do_sync_write
    ? __enqueue_entity
    ? autoremove_wake_function
    ? selinux_file_oermission
    ? security_file_permission
    ? do_sync_write
    vfs_write
    sys_write
    ? schedule_tail
    ? ret_from_fork
    ? thread_kernel_helper


    > > -- Fernando
    > >
    > >
    > > > ---
    > > > arch/x86/mm/highmem_32.c | 130 ++++++++++++++++++++++++++++++++++++++++++---
    > > > include/asm-x86/highmem.h | 11 ----
    > > > include/linux/sched.h | 5 ++
    > > > kernel/sched.c | 10 ++++
    > > > 4 files changed, 137 insertions(+), 19 deletions(-)
    > > > [MUNCH]

    > >
    > >


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

  7. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Fri, 2008-11-07 at 15:52 -0800, Fernando Lopez-Lezcano wrote:
    > On Fri, 2008-11-07 at 22:47 +0100, Peter Zijlstra wrote:
    > > On Fri, 2008-11-07 at 13:35 -0800, Fernando Lopez-Lezcano wrote:
    > > > On Fri, 2008-11-07 at 20:16 +0100, Peter Zijlstra wrote:
    > > > > On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > > > > > Peter, I think we've seen this before. It is the highmem code sleeping.
    > > > >
    > > > > I've been working on an alternative kmap_atomic implementation for -rt,
    > > > > the below has been build and booted but not stressed, anybody care to
    > > > > give it a spin ?
    > > >
    > > > I'll give it a try. Anything in particular I should try to do? Or not
    > > > do? Or watch for?

    > >
    > > Lots of I/O should stress the i386 highmem stuff. If all is well it
    > > works, if not, crashes and splats.

    >
    > Crashes and splats on boot... sorry, I don't have a way to capture the
    > kernel oops (or whatever happens, I can only see the end of the
    > printout)
    >
    > -- Fernando
    >
    > PS: things left on the screen (top to bottom):
    >
    > ? speedstep_detect_processor
    > ? __copy_from_user_ll_noccache_nozero
    > iov_iter_copy_from_user_atomic
    > ? generic_file_buffered_write
    > generic_file_buffered_write
    > ? avs_has_perm_noaudit
    > ? __rt_spin_lock
    > ? selinux_inode_need_killpriv
    > ? __rt_spin_lock
    > mnt_drop_write
    > __generic_file_aio_write_nolock
    > generic_file_aio_write
    > do_sync_write
    > ? __enqueue_entity
    > ? autoremove_wake_function
    > ? selinux_file_oermission
    > ? security_file_permission
    > ? do_sync_write
    > vfs_write
    > sys_write
    > ? schedule_tail
    > ? ret_from_fork
    > ? thread_kernel_helper


    Oh well, thanks for trying, I guess I need to go run this on real
    hardware, which means finding where I left this i386 distro on the test
    boxen :-)
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: 2.6.26.6-rt11: BUGs (sleeping function called from invalid context)

    On Sat, 2008-11-08 at 09:47 +0100, Peter Zijlstra wrote:
    > On Fri, 2008-11-07 at 15:52 -0800, Fernando Lopez-Lezcano wrote:
    > > On Fri, 2008-11-07 at 22:47 +0100, Peter Zijlstra wrote:
    > > > On Fri, 2008-11-07 at 13:35 -0800, Fernando Lopez-Lezcano wrote:
    > > > > On Fri, 2008-11-07 at 20:16 +0100, Peter Zijlstra wrote:
    > > > > > On Fri, 2008-11-07 at 14:01 -0500, Steven Rostedt wrote:
    > > > > > > Peter, I think we've seen this before. It is the highmem code sleeping.
    > > > > >
    > > > > > I've been working on an alternative kmap_atomic implementation for -rt,
    > > > > > the below has been build and booted but not stressed, anybody care to
    > > > > > give it a spin ?
    > > > >
    > > > > I'll give it a try. Anything in particular I should try to do? Or not
    > > > > do? Or watch for?
    > > >
    > > > Lots of I/O should stress the i386 highmem stuff. If all is well it
    > > > works, if not, crashes and splats.

    > >
    > > Crashes and splats on boot... sorry, I don't have a way to capture the
    > > kernel oops (or whatever happens, I can only see the end of the
    > > printout)
    > >
    > > ? speedstep_detect_processor
    > > ? __copy_from_user_ll_noccache_nozero
    > > iov_iter_copy_from_user_atomic
    > > ? generic_file_buffered_write
    > > generic_file_buffered_write
    > > ? avs_has_perm_noaudit
    > > ? __rt_spin_lock
    > > ? selinux_inode_need_killpriv
    > > ? __rt_spin_lock
    > > mnt_drop_write
    > > __generic_file_aio_write_nolock
    > > generic_file_aio_write
    > > do_sync_write
    > > ? __enqueue_entity
    > > ? autoremove_wake_function
    > > ? selinux_file_oermission
    > > ? security_file_permission
    > > ? do_sync_write
    > > vfs_write
    > > sys_write
    > > ? schedule_tail
    > > ? ret_from_fork
    > > ? thread_kernel_helper

    >
    > Oh well, thanks for trying, I guess I need to go run this on real
    > hardware, which means finding where I left this i386 distro on the test
    > boxen :-)


    Let me know if you have something to test (or just maybe a simpler fix
    for the BUGs that I posted at the beginning of the thread?)

    -- Fernando


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

+ Reply to Thread