On Thu, 2008-01-17 at 16:29 -0800, Andrew Morton wrote: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: 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(); -- Mathematics is the supreme nostalgia of our time. --
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| David Miller | Re: [RFC/PATCH] Documentation of kernel messages |
| Tony Lindgren | [PATCH 48/90] ARM: OMAP: I2C-1 init fix for 2430 |
git: | |
| Josip Rodin | bnx2_poll panicking kernel |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
