lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.6.24-rc8-mm1: powerpc oopses
Date
Hello,

> > Do we need `offset' at all?
>
> Looks like no.
>
> I wonder if there's a good argument for adding a pte_offset_val() which
> would let us do:
>
> pteval = pte_offset_val(pmd, addr);
>
> and shrink the map/unmap window and overhead here and possibly
> elsewhere?
>
> Anyway, updated but still untested patch now with revealing comment:

I patched the ppc32 kernel with this and run tests on /proc.
This patch helps. No more BUGs and oopses :)

Thanks,

Mariusz

> diff -r 5595adaea70f fs/proc/task_mmu.c
> --- a/fs/proc/task_mmu.c Thu Jan 17 13:26:54 2008 -0600
> +++ b/fs/proc/task_mmu.c Thu Jan 17 18:45:57 2008 -0600
> @@ -584,18 +585,19 @@
> pte_t *pte;
> int err = 0;
>
> - pte = pte_offset_map(pmd, addr);
> - for (; addr != end; pte++, addr += PAGE_SIZE) {
> + for (; addr != end; addr += PAGE_SIZE) {
> u64 pfn = PM_NOT_PRESENT;
> + pte = pte_offset_map(pmd, addr);
> if (is_swap_pte(*pte))
> pfn = swap_pte_to_pagemap_entry(*pte);
> else if (pte_present(*pte))
> pfn = pte_pfn(*pte);
> + /* unmap so we're not in atomic when we copy to userspace */
> + pte_unmap(pte);
> err = add_to_pagemap(addr, pfn, pm);
> if (err)
> return err;
> }
> - pte_unmap(pte - 1);
>
> cond_resched();



\
 
 \ /
  Last update: 2008-01-18 18:25    [W:1.266 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site