linux-imx/mm
David Rientjes 74eb879f48 mm, thp: do not allow thp faults to avoid cpuset restrictions
commit b104a35d32 upstream.

The page allocator relies on __GFP_WAIT to determine if ALLOC_CPUSET
should be set in allocflags.  ALLOC_CPUSET controls if a page allocation
should be restricted only to the set of allowed cpuset mems.

Transparent hugepages clears __GFP_WAIT when defrag is disabled to prevent
the fault path from using memory compaction or direct reclaim.  Thus, it
is unfairly able to allocate outside of its cpuset mems restriction as a
side-effect.

This patch ensures that ALLOC_CPUSET is only cleared when the gfp mask is
truly GFP_ATOMIC by verifying it is also not a thp allocation.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Alex Thorlton <athorlton@sgi.com>
Tested-by: Alex Thorlton <athorlton@sgi.com>
Cc: Bob Liu <lliubbo@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Hedi Berriche <hedi@sgi.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2014-09-13 23:41:40 +01:00
..
backing-dev.c backing-dev: fix wakeup timer races with bdi_unregister() 2012-02-20 12:46:18 -08:00
bootmem.c bootmem/sparsemem: remove limit constraint in alloc_bootmem_section 2012-04-02 09:52:37 -07:00
bounce.c block: Add bio_for_each_segment_all() 2013-09-10 01:57:27 +01:00
cleancache.c mm: cleancache core ops functions and config 2011-05-26 10:01:36 -06:00
compaction.c mm: compaction: fix echo 1 > compact_memory return error issue 2013-02-06 04:33:31 +00:00
debug-pagealloc.c debug-pagealloc: add support for highmem pages 2011-10-31 17:30:48 -07:00
dmapool.c mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls 2013-01-03 03:33:36 +00:00
fadvise.c mm/fadvise.c: drain all pagevecs if POSIX_FADV_DONTNEED fails to discard all pages 2013-03-06 03:24:12 +00:00
failslab.c fault-injection: add ability to export fault_attr in arbitrary directory 2011-08-03 14:25:20 -10:00
filemap_xip.c mm/filemap_xip.c: fix race condition in xip_file_fault() 2012-02-13 11:16:54 -08:00
filemap.c cpuset: mm: reduce large amounts of memory barrier related damage v3 2012-08-02 14:37:36 +01:00
fremap.c mm: delete various needless include <linux/module.h> 2011-10-31 09:20:11 -04:00
highmem.c mm: highmem: don't treat PKMAP_ADDR(LAST_PKMAP) as a highmem address 2014-07-11 13:33:33 +01:00
huge_memory.c mm/huge_memory.c: fix potential NULL pointer dereference 2013-10-26 21:06:03 +01:00
hugetlb.c mm: hugetlb: fix copy_hugetlb_page_range() 2014-08-06 18:07:42 +01:00
hwpoison-inject.c Fix common misspellings 2011-03-31 11:26:23 -03:00
init-mm.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
internal.h mm: setup pageblock_order before it's used by sparsemem 2012-08-10 00:25:09 +01:00
Kconfig memblock: add NO_BOOTMEM config symbol 2011-10-31 17:30:47 -07:00
Kconfig.debug mm: debug-pagealloc: fix kconfig dependency warning 2011-03-22 17:44:02 -07:00
kmemcheck.c kmemcheck: Fix build errors due to missing slab.h 2010-03-30 22:02:32 +09:00
kmemleak-test.c kmemleak: remove memset by using kzalloc 2011-01-27 18:31:51 +00:00
kmemleak.c mm: kmemleak: avoid false negatives on vmalloc'ed objects 2014-08-06 18:07:42 +01:00
ksm.c oom: fix race while temporarily setting current's oom_score_adj 2011-10-31 17:30:45 -07:00
maccess.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
madvise.c mm: Hold a file reference in madvise_remove 2012-07-12 04:32:19 +01:00
Makefile Cross Memory Attach 2011-10-31 17:30:44 -07:00
memblock.c mm/memblock.c: quiet sparse noise 2011-10-31 17:30:50 -07:00
memcontrol.c memcg: fix multiple large threshold notifications 2013-10-26 21:06:03 +01:00
memory_hotplug.c mm/hotplug: correctly add new zone to all other nodes' zone lists 2013-03-20 15:03:39 +00:00
memory-failure.c mm/memory-failure.c: fix memory leak by race between poison and unpoison 2014-06-09 13:29:15 +01:00
memory.c mm: make fixup_user_fault() check the vma access rights too 2014-05-18 14:58:06 +01:00
mempolicy.c cpuset,mempolicy: fix sleeping function called from invalid context 2014-08-06 18:07:33 +01:00
mempool.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
migrate.c mm: migration: add migrate_entry_wait_huge() 2013-06-19 02:17:01 +01:00
mincore.c mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode 2012-04-02 09:52:37 -07:00
mlock.c mm: try_to_unmap_cluster() should lock_page() before mlocking 2014-04-30 16:23:26 +01:00
mm_init.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
mmap.c mm: ensure get_unmapped_area() returns higher address than mmap_min_addr 2014-02-15 19:20:11 +00:00
mmu_context.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
mmu_notifier.c mm: mmu_notifier: re-fix freed page still mapped in secondary MMU 2013-05-30 14:35:06 +01:00
mmzone.c mm: delete various needless include <linux/module.h> 2011-10-31 09:20:11 -04:00
mprotect.c thp: mprotect: transparent huge page support 2011-01-13 17:32:44 -08:00
mremap.c thp: mremap support and TLB optimization 2011-10-31 17:30:48 -07:00
msync.c sanitize vfs_fsync calling conventions 2010-05-21 18:31:21 -04:00
nobootmem.c mm: nobootmem: fix sign extend problem in __free_pages_memory() 2012-05-20 22:56:33 +01:00
nommu.c vm: add no-mmu vm_iomap_memory() stub 2013-09-10 01:57:10 +01:00
oom_kill.c mm, oom: base root bonus on current usage 2014-04-02 00:58:46 +01:00
page_alloc.c mm, thp: do not allow thp faults to avoid cpuset restrictions 2014-09-13 23:41:40 +01:00
page_cgroup.c mm/page_cgroup.c: quiet sparse noise 2011-11-02 16:07:00 -07:00
page_io.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
page_isolation.c mm: page_isolation: codeclean fix comment and rm unneeded val init 2010-10-26 16:52:11 -07:00
page-writeback.c mm/page-writeback.c: fix divide by zero in pos_ratio_polynom 2014-06-09 13:29:09 +01:00
pagewalk.c mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas 2013-05-30 14:35:08 +01:00
percpu-km.c percpu: clear memory allocated with the km allocator 2010-10-02 10:28:42 +03:00
percpu-vm.c percpu: fix chunk range calculation 2011-11-22 08:09:46 -08:00
percpu.c percpu: pcpu_embed_first_chunk() should free unused parts after all allocs are complete 2012-05-20 22:56:31 +01:00
pgtable-generic.c mm/pgtable-generic.c: fix CONFIG_SWAP=n build 2011-01-26 10:49:58 +10:00
prio_tree.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
process_vm_access.c Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys 2013-03-20 15:03:37 +00:00
quicklist.c mm: delete various needless include <linux/module.h> 2011-10-31 09:20:11 -04:00
readahead.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
rmap.c mm: rmap: fix use-after-free in __put_anon_vma 2014-07-11 13:33:50 +01:00
shmem.c shmem: fix splicing from a hole while it's punched 2014-08-06 18:07:40 +01:00
slab.c slab: fix the DEADLOCK issue on l3 alien lock 2012-10-17 03:48:22 +01:00
slob.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
slub.c slub: Fix calculation of cpu slabs 2014-04-02 00:58:40 +01:00
sparse-vmemmap.c mm: delete various needless include <linux/module.h> 2011-10-31 09:20:11 -04:00
sparse.c mm/vmemmap: fix wrong use of virt_to_page 2012-12-06 11:20:36 +00:00
swap_state.c swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion 2013-06-19 02:17:01 +01:00
swap.c mm: hugetlbfs: fix hugetlbfs optimization 2014-02-15 19:20:17 +00:00
swapfile.c mm/swap: fix race on swap_info reuse between swapoff and swapon 2014-04-02 00:58:49 +01:00
thrash.c mm/thrash.c: quiet sparse noise 2011-10-31 17:30:50 -07:00
truncate.c shmem: fix faulting into a hole while it's punched 2014-08-06 18:07:40 +01:00
util.c mm: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
vmalloc.c mm: kmemleak: avoid false negatives on vmalloc'ed objects 2014-08-06 18:07:42 +01:00
vmscan.c mm: vmscan: clear kswapd's special reclaim powers before exiting 2014-07-11 13:33:47 +01:00
vmstat.c mm/vmstat.c: cache align vm_stat 2011-10-31 17:30:51 -07:00