diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-24 19:10:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-24 19:10:23 -0400 |
commit | 9c9fa97a8edbc3668dfc7a25de516e80c146e86f (patch) | |
tree | 2dc0e90203796a4b346ce190f9521c3294104058 /mm/memory.c | |
parent | 5184d449600f501a8688069f35c138c6b3bf8b94 (diff) | |
parent | 2b38d01b4de8b1bbda7f5f7e91252609557635fc (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton:
- a few hot fixes
- ocfs2 updates
- almost all of -mm (slab-generic, slab, slub, kmemleak, kasan,
cleanups, debug, pagecache, memcg, gup, pagemap, memory-hotplug,
sparsemem, vmalloc, initialization, z3fold, compaction, mempolicy,
oom-kill, hugetlb, migration, thp, mmap, madvise, shmem, zswap,
zsmalloc)
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (132 commits)
mm/zsmalloc.c: fix a -Wunused-function warning
zswap: do not map same object twice
zswap: use movable memory if zpool support allocate movable memory
zpool: add malloc_support_movable to zpool_driver
shmem: fix obsolete comment in shmem_getpage_gfp()
mm/madvise: reduce code duplication in error handling paths
mm: mmap: increase sockets maximum memory size pgoff for 32bits
mm/mmap.c: refine find_vma_prev() with rb_last()
riscv: make mmap allocation top-down by default
mips: use generic mmap top-down layout and brk randomization
mips: replace arch specific way to determine 32bit task with generic version
mips: adjust brk randomization offset to fit generic version
mips: use STACK_TOP when computing mmap base address
mips: properly account for stack randomization and stack guard gap
arm: use generic mmap top-down layout and brk randomization
arm: use STACK_TOP when computing mmap base address
arm: properly account for stack randomization and stack guard gap
arm64, mm: make randomization selected by generic topdown mmap layout
arm64, mm: move generic mmap layout functions to mm
arm64: consider stack randomization for mmap base only when necessary
...
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index b1dff75640b7..b1ca51a079f2 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -518,7 +518,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, | |||
518 | (long long)pte_val(pte), (long long)pmd_val(*pmd)); | 518 | (long long)pte_val(pte), (long long)pmd_val(*pmd)); |
519 | if (page) | 519 | if (page) |
520 | dump_page(page, "bad pte"); | 520 | dump_page(page, "bad pte"); |
521 | pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n", | 521 | pr_alert("addr:%px vm_flags:%08lx anon_vma:%px mapping:%px index:%lx\n", |
522 | (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); | 522 | (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); |
523 | pr_alert("file:%pD fault:%ps mmap:%ps readpage:%ps\n", | 523 | pr_alert("file:%pD fault:%ps mmap:%ps readpage:%ps\n", |
524 | vma->vm_file, | 524 | vma->vm_file, |
@@ -1026,6 +1026,9 @@ again: | |||
1026 | if (pte_none(ptent)) | 1026 | if (pte_none(ptent)) |
1027 | continue; | 1027 | continue; |
1028 | 1028 | ||
1029 | if (need_resched()) | ||
1030 | break; | ||
1031 | |||
1029 | if (pte_present(ptent)) { | 1032 | if (pte_present(ptent)) { |
1030 | struct page *page; | 1033 | struct page *page; |
1031 | 1034 | ||
@@ -1093,7 +1096,6 @@ again: | |||
1093 | if (unlikely(details)) | 1096 | if (unlikely(details)) |
1094 | continue; | 1097 | continue; |
1095 | 1098 | ||
1096 | entry = pte_to_swp_entry(ptent); | ||
1097 | if (!non_swap_entry(entry)) | 1099 | if (!non_swap_entry(entry)) |
1098 | rss[MM_SWAPENTS]--; | 1100 | rss[MM_SWAPENTS]--; |
1099 | else if (is_migration_entry(entry)) { | 1101 | else if (is_migration_entry(entry)) { |
@@ -1124,8 +1126,11 @@ again: | |||
1124 | if (force_flush) { | 1126 | if (force_flush) { |
1125 | force_flush = 0; | 1127 | force_flush = 0; |
1126 | tlb_flush_mmu(tlb); | 1128 | tlb_flush_mmu(tlb); |
1127 | if (addr != end) | 1129 | } |
1128 | goto again; | 1130 | |
1131 | if (addr != end) { | ||
1132 | cond_resched(); | ||
1133 | goto again; | ||
1129 | } | 1134 | } |
1130 | 1135 | ||
1131 | return addr; | 1136 | return addr; |