Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312310 Details for
Bug 455747
Oops when running oprofile
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Patch that introduces oops with oprofile
slab-fix-rt-v2.patch (text/x-diff), 6.02 KB, created by
IBM Bug Proxy
on 2008-07-22 06:10:43 UTC
(
hide
)
Description:
Patch that introduces oops with oprofile
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2008-07-22 06:10:43 UTC
Size:
6.02 KB
patch
obsolete
>From: Peter Zijlstra <peterz@infradead.org> >Subject: Re: slab-rt-fix latest > >second try at slab fix > >Index: linux-2.6.24.7.noarch/mm/slab.c >=================================================================== >--- linux-2.6.24.7.noarch.orig/mm/slab.c >+++ linux-2.6.24.7.noarch/mm/slab.c >@@ -1402,7 +1402,20 @@ static int __cpuinit cpuup_callback(stru > switch (action) { > case CPU_LOCK_ACQUIRE: > mutex_lock(&cache_chain_mutex); >+ return NOTIFY_OK; >+ case CPU_LOCK_RELEASE: >+ mutex_unlock(&cache_chain_mutex); >+ return NOTIFY_OK; >+ >+ default: > break; >+ } >+ >+#ifdef CONFIG_PREEMPT_RT >+ spin_lock(&__get_cpu_lock(slab_irq_locks, cpu)); >+#endif >+ >+ switch (action) { > case CPU_UP_PREPARE: > case CPU_UP_PREPARE_FROZEN: > err = cpuup_prepare(cpu); >@@ -1444,10 +1457,11 @@ static int __cpuinit cpuup_callback(stru > case CPU_UP_CANCELED_FROZEN: > cpuup_canceled(cpu); > break; >- case CPU_LOCK_RELEASE: >- mutex_unlock(&cache_chain_mutex); >- break; > } >+ >+#ifdef CONFIG_PREEMPT_RT >+ spin_unlock(&__get_cpu_lock(slab_irq_locks, cpu)); >+#endif > return err ? NOTIFY_BAD : NOTIFY_OK; > } > >Index: linux-2.6.24.7.noarch/mm/page_alloc.c >=================================================================== >--- linux-2.6.24.7.noarch.orig/mm/page_alloc.c >+++ linux-2.6.24.7.noarch/mm/page_alloc.c >@@ -2797,6 +2797,10 @@ static int __cpuinit pageset_cpuup_callb > int cpu = (long)hcpu; > int ret = NOTIFY_OK; > >+#ifdef CONFIG_PREEMP_RT >+ spin_lock(&__get_cpu_lock(pcp_locks, cpu)); >+#endif >+ > switch (action) { > case CPU_UP_PREPARE: > case CPU_UP_PREPARE_FROZEN: >@@ -2812,6 +2816,11 @@ static int __cpuinit pageset_cpuup_callb > default: > break; > } >+ >+#ifdef CONFIG_PREEMP_RT >+ spin_unlock(&__get_cpu_lock(pcp_locks, cpu)); >+#endif >+ > return ret; > } > >Index: linux-2.6.24.7.noarch/arch/x86/kernel/setup64.c >=================================================================== >--- linux-2.6.24.7.noarch.orig/arch/x86/kernel/setup64.c >+++ linux-2.6.24.7.noarch/arch/x86/kernel/setup64.c >@@ -137,19 +137,12 @@ void pda_init(int cpu) > pda->pcurrent = &init_task; > pda->irqstackptr = boot_cpu_stack; > } else { >- pda->irqstackptr = (char *) >- __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER); >- if (!pda->irqstackptr) >- panic("cannot allocate irqstack for cpu %d", cpu); >+ pda->irqstackptr = (char *)per_cpu(init_tss, cpu).irqstack; > } > >- > pda->irqstackptr += IRQSTACKSIZE-64; > } > >-char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ] >-__attribute__((section(".bss.page_aligned"))); >- > extern asmlinkage void ignore_sysret(void); > > /* May not be marked __init: used by software suspend */ >@@ -203,15 +196,13 @@ void __cpuinit cpu_init (void) > struct tss_struct *t = &per_cpu(init_tss, cpu); > struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu); > unsigned long v; >- char *estacks = NULL; > struct task_struct *me; > int i; > > /* CPU 0 is initialised in head64.c */ > if (cpu != 0) { > pda_init(cpu); >- } else >- estacks = boot_exception_stacks; >+ } > > me = current; > >@@ -245,22 +236,8 @@ void __cpuinit cpu_init (void) > /* > * set up and load the per-CPU TSS > */ >- for (v = 0; v < N_EXCEPTION_STACKS; v++) { >- static const unsigned int order[N_EXCEPTION_STACKS] = { >- [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER, >-#if DEBUG_STACK > 0 >- [DEBUG_STACK - 1] = DEBUG_STACK_ORDER >-#endif >- }; >- if (cpu) { >- estacks = (char *)__get_free_pages(GFP_ATOMIC, order[v]); >- if (!estacks) >- panic("Cannot allocate exception stack %ld %d\n", >- v, cpu); >- } >- estacks += PAGE_SIZE << order[v]; >- orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks; >- } >+ for (v = 0; v < N_EXCEPTION_STACKS; v++) >+ orig_ist->ist[v] = t->ist[v] = (unsigned long)t->estacks[v]; > > t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); > /* >Index: linux-2.6.24.7.noarch/arch/x86/kernel/smpboot_64.c >=================================================================== >--- linux-2.6.24.7.noarch.orig/arch/x86/kernel/smpboot_64.c >+++ linux-2.6.24.7.noarch/arch/x86/kernel/smpboot_64.c >@@ -535,6 +535,60 @@ static void __cpuinit do_fork_idle(struc > complete(&c_idle->done); > } > >+static char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ] >+__attribute__((section(".bss.page_aligned"))); >+ >+static int __cpuinit allocate_stacks(int cpu) >+{ >+ static const unsigned int order[N_EXCEPTION_STACKS] = { >+ [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER, >+#if DEBUG_STACK > 0 >+ [DEBUG_STACK - 1] = DEBUG_STACK_ORDER >+#endif >+ }; >+ struct tss_struct *t = &per_cpu(init_tss, cpu); >+ int node = cpu_to_node(cpu); >+ struct page *page; >+ char *estack; >+ int v; >+ >+ if (cpu && !t->irqstack) { >+ page = alloc_pages_node(node, GFP_KERNEL, >+ IRQSTACK_ORDER); >+ if (!page) >+ goto fail_oom; >+ t->irqstack = page_address(page); >+ } >+ >+ if (!cpu) >+ estack = boot_exception_stacks; >+ >+ for (v = 0; v < N_EXCEPTION_STACKS; v++) { >+ if (t->estacks[v]) >+ continue; >+ >+ if (cpu) { >+ page = alloc_pages_node(node, GFP_KERNEL, order[v]); >+ if (!page) >+ goto fail_oom; >+ estack = page_address(page); >+ } >+ estack += PAGE_SIZE << order[v]; >+ /* >+ * XXX: can we set t->isr[v] here directly, or will that be >+ * modified later? - the existance of orig_ist seems to suggest >+ * it _can_ be modified, which would imply we'd need to reset >+ * it. >+ */ >+ t->estacks[v] = estack; >+ } >+ >+ return 0; >+ >+fail_oom: >+ return -ENOMEM; >+} >+ > /* > * Boot one CPU. > */ >@@ -605,6 +659,9 @@ static int __cpuinit do_boot_cpu(int cpu > return PTR_ERR(c_idle.idle); > } > >+ if (allocate_stacks(cpu)) >+ return -ENOMEM; >+ > set_idle_for_cpu(cpu, c_idle.idle); > > do_rest: >Index: linux-2.6.24.7.noarch/include/asm-x86/processor_64.h >=================================================================== >--- linux-2.6.24.7.noarch.orig/include/asm-x86/processor_64.h >+++ linux-2.6.24.7.noarch/include/asm-x86/processor_64.h >@@ -197,6 +197,10 @@ struct tss_struct { > * 8 bytes, for an extra "long" of ~0UL > */ > unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; >+ >+ void *irqstack; >+ void *estacks[N_EXCEPTION_STACKS]; >+ > } __attribute__((packed)) ____cacheline_aligned; > > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 455747
: 312310 |
312406
|
312494