Message ID | 20091117052542.GB2576@yookeroo (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
David Gibson wrote: > Hrm. Ok. I am truly baffled. Well, below is a revised debug patch > which I hope will shed some sort of light on things. I do also notice > Thanks for the debug patch. I have attached the collected information. > from your full log that it looks like the bug is happening shortly > after we start userspace. So it may be differences in my userspace > set up that meant I haven't been able to reproduce it. I'll have > another look at that when I get a chance. > Let me know if you need access to the system on which i can recreate the bug. I can make that system available for you to debug this issue. Thanks -Sachin
On Tue, Nov 17, 2009 at 01:07:03PM +0530, Sachin Sant wrote: > David Gibson wrote: > >Hrm. Ok. I am truly baffled. Well, below is a revised debug patch > >which I hope will shed some sort of light on things. I do also notice > Thanks for the debug patch. I have attached the collected information. > > >from your full log that it looks like the bug is happening shortly > >after we start userspace. So it may be differences in my userspace > >set up that meant I haven't been able to reproduce it. I'll have > >another look at that when I get a chance. > Let me know if you need access to the system on which i can recreate the > bug. I can make that system available for you to debug this issue. That's probably a good idea. I'm still pretty baffled by this, so it will probably take several more rounds of debug patches to start getting a handle on it.
Index: working-2.6/mm/mmap.c =================================================================== --- working-2.6.orig/mm/mmap.c 2009-11-17 11:55:23.000000000 +1100 +++ working-2.6/mm/mmap.c 2009-11-17 16:04:48.182600029 +1100 @@ -2136,6 +2136,9 @@ void exit_mmap(struct mm_struct *mm) while (vma) vma = remove_vma(vma); + if (mm->nr_ptes != 0) + printk("exit_mmap(): mm %p nr_ptes %d current %p pid %d comm \"%s\"\n", + mm, mm->nr_ptes, current, current->pid, current->comm); BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT); } Index: working-2.6/mm/memory.c =================================================================== --- working-2.6.orig/mm/memory.c 2009-11-17 11:55:23.000000000 +1100 +++ working-2.6/mm/memory.c 2009-11-17 14:57:49.881603609 +1100 @@ -156,6 +156,8 @@ static void free_pte_range(struct mmu_ga pmd_clear(pmd); pte_free_tlb(tlb, token, addr); tlb->mm->nr_ptes--; + printk("free_pte_range() -> mm %p addr 0x%lx nr_ptes %d\n", tlb->mm, + addr, tlb->mm->nr_ptes); } static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud, @@ -348,6 +350,8 @@ int __pte_alloc(struct mm_struct *mm, pm spin_lock(&mm->page_table_lock); if (!pmd_present(*pmd)) { /* Has another populated it ? */ mm->nr_ptes++; + printk("__pte_alloc() -> mm %p addr 0x%lx nr_ptes %d\n", mm, + address, mm->nr_ptes); pmd_populate(mm, pmd, new); new = NULL; }