1. 21 2月, 2010 1 次提交
    • R
      MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself · 4b3073e1
      Russell King 提交于
      On VIVT ARM, when we have multiple shared mappings of the same file
      in the same MM, we need to ensure that we have coherency across all
      copies.  We do this via make_coherent() by making the pages
      uncacheable.
      
      This used to work fine, until we allowed highmem with highpte - we
      now have a page table which is mapped as required, and is not available
      for modification via update_mmu_cache().
      
      Ralf Beache suggested getting rid of the PTE value passed to
      update_mmu_cache():
      
        On MIPS update_mmu_cache() calls __update_tlb() which walks pagetables
        to construct a pointer to the pte again.  Passing a pte_t * is much
        more elegant.  Maybe we might even replace the pte argument with the
        pte_t?
      
      Ben Herrenschmidt would also like the pte pointer for PowerPC:
      
        Passing the ptep in there is exactly what I want.  I want that
        -instead- of the PTE value, because I have issue on some ppc cases,
        for I$/D$ coherency, where set_pte_at() may decide to mask out the
        _PAGE_EXEC.
      
      So, pass in the mapped page table pointer into update_mmu_cache(), and
      remove the PTE value, updating all implementations and call sites to
      suit.
      
      Includes a fix from Stephen Rothwell:
      
        sparc: fix fallout from update_mmu_cache API change
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4b3073e1
  2. 15 6月, 2009 2 次提交
    • P
      x86: Add NMI types for kmap_atomic, fix · 0990b1c6
      Peter Zijlstra 提交于
      I just realized this has a kmap_atomic bug in...
      
      The below would fix it - but it's complicating this code
      some more.
      
      Alternatively I would have to introduce something like
      pte_offset_map_irq() which would make the irq/nmi detection and leave
      the regular code paths alone, however that would mean either duplicating
      the gup_fast() pagewalk or passing down a pte function pointer, which
      would only duplicate the gup_pte_range() bit, neither is really
      attractive ...
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      CC: Nick Piggin <npiggin@suse.de>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0990b1c6
    • P
      x86: Add NMI types for kmap_atomic · 3ff0141a
      Peter Zijlstra 提交于
      Two new kmap_atomic slots for NMI context. And teach pte_offset_map()
      about NMI context.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      CC: Nick Piggin <npiggin@suse.de>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3ff0141a
  3. 15 3月, 2009 1 次提交
  4. 12 2月, 2009 2 次提交
  5. 07 2月, 2009 13 次提交
  6. 19 12月, 2008 1 次提交
  7. 23 10月, 2008 2 次提交
  8. 21 8月, 2008 1 次提交
    • D
      i386: vmalloc size fix · e621bd18
      Dave Young 提交于
      Booting kernel with vmalloc=[any size<=16m] will oops on my pc (i386/1G memory).
      
      BUG_ON in arch/x86/mm/init_32.c triggered:
      BUG_ON((unsigned long)high_memory > VMALLOC_START);
      
      It's due to the vm area hole.
      
      In include/asm-x86/pgtable_32.h:
      #define VMALLOC_OFFSET	(8 * 1024 * 1024)
      #define VMALLOC_START	(((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) \
      			 & ~(VMALLOC_OFFSET - 1))
      
      There's several related point:
      1. MAXMEM :
       (-__PAGE_OFFSET - __VMALLOC_RESERVE).
      The space after VMALLOC_END is included as well, I set it to
      (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)
      
      2. VMALLOC_OFFSET is not considered in __VMALLOC_RESERVE
      fixed by adding VMALLOC_OFFSET to it.
      
      3. VMALLOC_START :
       (((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) & ~(VMALLOC_OFFSET - 1))
      So it's not always 8M, bigger than 8M possible.
      I set it to ((unsigned long)high_memory + VMALLOC_OFFSET)
      
      4. the VMALLOC_RESERVE is an unused macro, so remove it here.
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Cc: akpm@linux-foundation.org
      Cc: hidave.darkstar@gmail.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      e621bd18
  9. 23 7月, 2008 2 次提交
  10. 22 7月, 2008 2 次提交
  11. 16 7月, 2008 1 次提交
  12. 08 7月, 2008 1 次提交
  13. 20 5月, 2008 1 次提交
  14. 07 5月, 2008 1 次提交
    • H
      x86: fix PAE pmd_bad bootup warning · aeed5fce
      Hugh Dickins 提交于
      Fix warning from pmd_bad() at bootup on a HIGHMEM64G HIGHPTE x86_32.
      
      That came from 9fc34113 x86: debug pmd_bad();
      but we understand now that the typecasting was wrong for PAE in the previous
      version: pagetable pages above 4GB looked bad and stopped Arjan from booting.
      
      And revert that cded932b x86: fix pmd_bad
      and pud_bad to support huge pages.  It was the wrong way round: we shouldn't
      weaken every pmd_bad and pud_bad check to let huge pages slip through - in
      part they check that we _don't_ have a huge page where it's not expected.
      
      Put the x86 pmd_bad() and pud_bad() definitions back to what they have long
      been: they can be improved (x86_32 should use PTE_MASK, to stop PAE thinking
      junk in the upper word is good; and x86_64 should follow x86_32's stricter
      comparison, to stop thinking any subset of required bits is good); but that
      should be a later patch.
      
      Fix Hans' good observation that follow_page() will never find pmd_huge()
      because that would have already failed the pmd_bad test: test pmd_huge in
      between the pmd_none and pmd_bad tests.  Tighten x86's pmd_huge() check?
      No, once it's a hugepage entry, it can get quite far from a good pmd: for
      example, PROT_NONE leaves it with only ACCESSED of the KERN_PGTABLE bits.
      
      However... though follow_page() contains this and another test for huge
      pages, so it's nice to keep it working on them, where does it actually get
      called on a huge page?  get_user_pages() checks is_vm_hugetlb_page(vma) to
      to call alternative hugetlb processing, as does unmap_vmas() and others.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Earlier-version-tested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jeff Chua <jeff.chua.linux@gmail.com>
      Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aeed5fce
  15. 26 4月, 2008 1 次提交
  16. 25 4月, 2008 2 次提交
  17. 17 4月, 2008 3 次提交
  18. 12 3月, 2008 1 次提交
    • T
      x86: remove quicklists · 985a34bd
      Thomas Gleixner 提交于
      quicklists cause a serious memory leak on 32-bit x86,
      as documented at:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=9991
      
      the reason is that the quicklist pool is a special-purpose
      cache that grows out of proportion. It is not accounted for
      anywhere and users have no way to even realize that it's
      the quicklists that are causing RAM usage spikes. It was
      supposed to be a relatively small pool, but as demonstrated
      by KOSAKI Motohiro, they can grow as large as:
      
        Quicklists:    1194304 kB
      
      given how much trouble this code has caused historically,
      and given that Andrew objected to its introduction on x86
      (years ago), the best option at this point is to remove them.
      
      [ any performance benefits of caching constructed pgds should
        be implemented in a more generic way (possibly within the page
        allocator), while still allowing constructed pages to be
        allocated by other workloads. ]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      985a34bd
  19. 04 3月, 2008 1 次提交
  20. 03 3月, 2008 1 次提交