2012-09-06-16-46 merged

Adrian Hunter (1):
      perf tools: fix build for another rbtree.c change

Andrea Arcangeli (1):
      mm: mmu_notifier: make the mmu_notifier srcu static

Andrew Morton (7):
      mm-fix-nonuniform-page-status-when-writing-new-file-with-small-buffer-fix
      mm-fix-nonuniform-page-status-when-writing-new-file-with-small-buffer-fix-fix
      mm-vmscan-scale-number-of-pages-reclaimed-by-reclaim-compaction-based-on-failures-fix
      mm-mmu_notifier-fix-inconsistent-memory-between-secondary-mmu-and-host-fix
      rbtree-performance-and-correctness-test-fix
      mm-support-migrate_discard-fix
      mm-move-all-mmu-notifier-invocations-to-be-done-outside-the-pt-lock-fix

Christoph Lameter (13):
      mm/slub: Use kmem_cache for the kmem_cache structure
      mm/slab_common: Improve error handling in kmem_cache_create
      mm/sl[aou]b: Move list_add() to slab_common.c
      mm/sl[aou]b: Extract a common function for kmem_cache_destroy
      mm/sl[aou]b: Use "kmem_cache" name for slab cache with kmem_cache struct
      mm/sl[aou]b: Move freeing of kmem_cache structure to common code
      mm/sl[aou]b: Get rid of __kmem_cache_destroy
      mm/sl[aou]b: Move duping of slab name to slab_common.c
      mm/sl[aou]b: Do slab aliasing call from common code
      mm/sl[aou]b: Move sysfs_slab_add to common
      mm/sl[aou]b: Move kmem_cache allocations into common code
      mm/sl[aou]b: Shrink __kmem_cache_create() parameter lists
      mm/sl[aou]b: Move kmem_cache refcounting to common code

David Woodhouse (1):
      rbtree: fix jffs2 build issue due to renamed __rb_parent_color field

Davidlohr Bueso (1):
      oom: remove deprecated oom_adj

Gavin Shan (2):
      mm/mmu_notifier: init notifier if necessary
      mm/mmu_notifier: init notifier if necessary

Gerald Schaefer (8):
      thp, x86: introduce HAVE_ARCH_TRANSPARENT_HUGEPAGE
      thp: remove assumptions on pgtable_t type
      thp: introduce pmdp_invalidate()
      thp: make MADV_HUGEPAGE check for mm->def_flags
      thp, s390: thp splitting backend for s390
      thp, s390: thp pagetable pre-allocation for s390
      thp, s390: disable thp for kvm host on s390
      thp, s390: architecture backend for thp on s390

Haggai Eran (1):
      mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end

Hugh Dickins (1):
      mm/mmap.c: replace find_vma_prepare() with clearer find_vma_links()

KOSAKI Motohiro (3):
      Revert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages"
      mempolicy: remove mempolicy sharing
      mempolicy: fix refcount leak in mpol_set_shared_policy()

Mel Gorman (8):
      mm: compaction: update comment in try_to_compact_pages
      mm: vmscan: scale number of pages reclaimed by reclaim/compaction based on failures
      mm: have order > 0 compaction start near a pageblock with free pages
      mm: compaction: Abort async compaction if locks are contended or taking too long
      mm: compaction: capture a suitable high-order page immediately when it is made available
      mempolicy: fix a race in shared_policy_replace()
      mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()
      mempolicy-fix-a-memory-corruption-by-refcount-imbalance-in-alloc_pages_vma-v2

Michal Hocko (1):
      Merge branch 'memcg-slab-dependencies' into memcg-devel

Michel Lespinasse (30):
      mm: adjust final #endif position in mm/internal.h
      mm: fix potential anon_vma locking issue in mprotect()
      ipc/mqueue: remove unnecessary rb_init_node() calls
      rbtree: reference Documentation/rbtree.txt for usage instructions
      rbtree: empty nodes have no color
      rbtree: fix incorrect rbtree node insertion in fs/proc/proc_sysctl.c
      rbtree: move some implementation details from rbtree.h to rbtree.c
      rbtree: performance and correctness test
      rbtree: break out of rb_insert_color loop after tree rotation
      rbtree: adjust root color in rb_insert_color() only when necessary
      rbtree: low level optimizations in rb_insert_color()
      rbtree: adjust node color in __rb_erase_color() only when necessary
      rbtree: optimize case selection logic in __rb_erase_color()
      rbtree: low level optimizations in __rb_erase_color()
      rbtree: coding style adjustments
      rbtree: optimize fetching of sibling node
      rbtree test: fix sparse warning about 64-bit constant
      rbtree: add __rb_change_child() helper function
      rbtree: place easiest case first in rb_erase()
      rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()
      rbtree: low level optimizations in rb_erase()
      rbtree: augmented rbtree test
      rbtree: faster augmented rbtree manipulation
      rbtree: remove prior augmented rbtree implementation
      rbtree: add RB_DECLARE_CALLBACKS() macro
      rbtree: add prio tree and interval tree tests
      mm: replace vma prio_tree with an interval tree
      kmemleak: use rbtree instead of prio tree
      prio_tree: remove
      rbtree: move augmented rbtree functionality to rbtree_augmented.h

Minchan Kim (2):
      mm: change enum migrate_mode with bitwise type
      mm: support MIGRATE_DISCARD

Pekka Enberg (1):
      Revert "mm/sl[aou]b: Move sysfs_slab_add to common"

Robin Dong (1):
      mm: fix nonuniform page status when writing new file with small buffer

Sagi Grimberg (2):
      mm: mmu_notifier: have mmu_notifiers use a global SRCU so they may safely schedule
      mm: move all mmu notifier invocations to be done outside the PT lock

Shuah Khan (1):
      mm/slab: restructure kmem_cache_create() debug checks

Wanpeng Li (1):
      mm/vmscan: fix error number for failed kthread

Wen Congyang (1):
      memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails

Will Deacon (1):
      mm: hugetlb: add arch hook for clearing page flags before entering pool

Xiao Guangrong (13):
      mm: mmu_notifier: fix inconsistent memory between secondary MMU and host
      thp: fix the count of THP_COLLAPSE_ALLOC
      thp: remove unnecessary check in start_khugepaged
      thp: move khugepaged_mutex out of khugepaged
      thp: remove unnecessary khugepaged_thread check
      thp: remove wake_up_interruptible in the exit path
      thp: remove some code depend on CONFIG_NUMA
      thp: merge page pre-alloc in khugepaged_loop into khugepaged_do_scan
      thp: release page in page pre-alloc path
      thp: introduce khugepaged_prealloc_page and khugepaged_alloc_page
      thp: remove khugepaged_loop
      thp: use khugepaged_enabled to remove duplicate code
      thp: remove unnecessary set_recommended_min_free_kbytes

Xishi Qiu (1):
      memory-hotplug: build zonelists when offlining pages
mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end

In order to allow sleeping during invalidate_page mmu notifier calls, we
need to avoid calling when holding the PT lock.  In addition to its direct
calls, invalidate_page can also be called as a substitute for a change_pte
call, in case the notifier client hasn't implemented change_pte.

This patch drops the invalidate_page call from change_pte, and instead
wraps all calls to change_pte with invalidate_range_start and
invalidate_range_end calls.

Note that change_pte still cannot sleep after this patch, and that clients
implementing change_pte should not take action on it in case the number of
outstanding invalidate_range_start calls is larger than one, otherwise
they might miss a later invalidation.

Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Cc: Andrea Arcangeli <andrea@qumranet.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Haggai Eran <haggaie@mellanox.com>
Cc: Shachar Raindel <raindel@mellanox.com>
Cc: Liran Liss <liranl@mellanox.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 files changed