Bugzilla – Attachment 351845 Details for
Bug 576681
Installation hangs at Loading basic drivers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
debugging patch
pcpu_debug (text/plain), 2.95 KB, created by
Jiri Bohac
on 2010-03-31 22:54:38 UTC
(
hide
)
Description:
debugging patch
Filename:
MIME Type:
Creator:
Jiri Bohac
Created:
2010-03-31 22:54:38 UTC
Size:
2.95 KB
patch
obsolete
>Index: work/mm/percpu.c >=================================================================== >--- work.orig/mm/percpu.c 2010-02-24 19:52:17.000000000 +0100 >+++ work/mm/percpu.c 2010-03-31 22:57:38.000000000 +0200 >@@ -1,3 +1,4 @@ >+#define DBG KERN_DEBUG "* pcpu debug:" > /* > * linux/mm/percpu.c - percpu memory allocator > * >@@ -719,6 +720,8 @@ static int pcpu_alloc_pages(struct pcpu_ > struct page **pagep = &pages[pcpu_page_idx(cpu, i)]; > > *pagep = alloc_pages_node(cpu_to_node(cpu), gfp, 0); >+ printk(DBG "pcpu_alloc_pages: pagep=%p, *pagep=%p, cpu=%d, i=%d, phys=%p\n", pagep, *pagep, cpu, i, page_to_phys(*pagep)); >+ > if (!*pagep) { > pcpu_free_pages(chunk, pages, populated, > page_start, page_end); >@@ -852,9 +855,12 @@ static int pcpu_map_pages(struct pcpu_ch > > /* mapping successful, link chunk and mark populated */ > for (i = page_start; i < page_end; i++) { >- for_each_possible_cpu(cpu) >- pcpu_set_page_chunk(pages[pcpu_page_idx(cpu, i)], >+ struct page *p; >+ for_each_possible_cpu(cpu) { >+ pcpu_set_page_chunk(p = pages[pcpu_page_idx(cpu, i)], > chunk); >+ printk(DBG "pcpu_map_pages: page=%p, cpu=%d, i=%d\n", p, cpu, i); >+ } > __set_bit(i, populated); > } > >@@ -1000,8 +1006,11 @@ static int pcpu_populate_chunk(struct pc > /* commit new bitmap */ > bitmap_copy(chunk->populated, populated, pcpu_unit_pages); > clear: >- for_each_possible_cpu(cpu) >+ for_each_possible_cpu(cpu) { >+ printk(DBG "going to memset: chunk=%p, cpu=%d, off=%d, size=%d, addr=%p\n", >+ chunk, cpu, off, size, (void*)pcpu_chunk_addr(chunk, cpu, 0)); > memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size); >+ } > return 0; > > err_unmap: >@@ -1080,6 +1089,7 @@ static void *pcpu_alloc(size_t size, siz > "percpu allocation\n", size, align); > return NULL; > } >+ printk(DBG "pcpu_alloc(size=%d, align=%d, reserved=%d\n", size, align, reserved); > > mutex_lock(&pcpu_alloc_mutex); > spin_lock_irqsave(&pcpu_lock, flags); >@@ -1114,10 +1124,13 @@ restart: > /* search through normal chunks */ > for (slot = pcpu_size_to_slot(size); slot < pcpu_nr_slots; slot++) { > list_for_each_entry(chunk, &pcpu_slot[slot], list) { >- if (size > chunk->contig_hint) >+ if (size > chunk->contig_hint) { >+ printk(DBG "chunk %p, contig_hint = %d < %d\n", chunk, chunk->contig_hint, size); > continue; >+ } > > new_alloc = pcpu_need_to_extend(chunk); >+ printk(DBG "chunk=%p, new_alloc=%d, chunk->base_addr=%p\n", chunk, new_alloc, chunk->base_addr); > if (new_alloc) { > spin_unlock_irqrestore(&pcpu_lock, flags); > if (pcpu_extend_area_map(chunk, >@@ -1134,6 +1147,8 @@ restart: > } > > off = pcpu_alloc_area(chunk, size, align); >+ printk(DBG "off=%d\n", off); >+ > if (off >= 0) > goto area_found; > } >@@ -1147,7 +1162,7 @@ restart: > err = "failed to allocate new chunk"; > goto fail_unlock_mutex; > } >- >+ printk(DBG "allocated chunk: %p, base=%p\n", chunk, chunk->base_addr); > spin_lock_irqsave(&pcpu_lock, flags); > pcpu_chunk_relocate(chunk, -1); > goto restart;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 576681
:
341021
|
348312
|
348313
|
349531
|
349534
|
350310
|
350311
|
350338
|
350990
| 351845 |
351867
|
351924
|
352105