2012-09-20-17-25 merged

Akinobu Mita (1):
      fork: fix error handling in dup_task()

Andrea Arcangeli (1):
      mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP

Andrew Morton (6):
      revert "sched: Fix fork() error path to not crash"
      mm-cma-discard-clean-pages-during-contiguous-allocation-instead-of-migration-fix-fix
      atomic-implement-generic-atomic_dec_if_positive-fix
      mm-fix-tracing-in-free_pcppages_bulk-fix
      cma-count-free-cma-pages-fix
      mm-numa-reclaim-from-all-nodes-within-reclaim-distance-fix

Bartlomiej Zolnierkiewicz (4):
      mm: fix tracing in free_pcppages_bulk()
      cma: fix counting of isolated pages
      cma: count free CMA pages
      cma: fix watermark checking

Catalin Marinas (2):
      mm: thp: fix the pmd_clear() arguments in pmdp_get_and_clear()
      mm: thp: fix the update_mmu_cache() last argument passing in mm/huge_memory.c

David Rientjes (1):
      mm, numa: reclaim from all nodes within reclaim distance

Gerald Schaefer (1):
      thp, s390: add missing earlyclobber to inline assembly

Haggai Eran (1):
      mm: call invalidate_range_end in do_wp_page even for zero pages

Hugh Dickins (4):
      mm: fix invalidate_complete_page2() lock ordering
      mm: remove vma arg from page_evictable
      mm: clear_page_mlock in page_remove_rmap
      mm: remove free_page_mlock

Jianguo Wu (1):
      mm: fix-up zone present pages

Jiri Kosina (1):
      memory.txt: remove stray information

Mel Gorman (1):
      mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix-2

Michael Kerrisk (1):
      memcg: trivial fixes for Documentation/cgroups/memory.txt

Michal Hocko (5):
      Reverted "mm: Fix compiler warning in copy_page_range"
      Reverted "mm-move-all-mmu-notifier-invocations-to-be-done-outside-the-pt-lock-fix"
      memcg: cleanup kmem tcp ifdefs
      memcg: move mem_cgroup_is_root upwards
      hugetlb: do not use vma_hugecache_offset() for vma_prio_tree_foreach

Michel Lespinasse (1):
      mm anon rmap: in mremap, set the new vma's position before anon_vma_clone()

Minchan Kim (4):
      mm-cma-discard-clean-pages-during-contiguous-allocation-instead-of-migration-fix
      mm: revert 0def08e3 ("mm/mempolicy.c: check return code of check_range")
      mm: enhance comment and bug check
      memory-hotplug: fix zone stat mismatch

Rik van Riel (1):
      mm: enable CONFIG_COMPACTION by default

Shaohua Li (1):
      atomic: implement generic atomic_dec_if_positive()

Tejun Heo (1):
      cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them

Wen Congyang (1):
      trace/events/kmem: don't call page_to_pfn() if page is NULL
memory-hotplug: fix zone stat mismatch

During memory-hotplug, I found NR_ISOLATED_[ANON|FILE] are increasing,
causing the kernel to hang.  When the system doesn't have enough free
pages, it enters reclaim but never reclaim any pages due to
too_many_isolated()==true and loops forever.

The cause is that when we do memory-hotadd after memory-remove,
__zone_pcp_update() clears a zone's ZONE_STAT_ITEMS in setup_pageset()
although the vm_stat_diff of all CPUs still have values.

In addtion, when we offline all pages of the zone, we reset them in
zone_pcp_reset without draining so we loss some zone stat item.

Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 files changed