2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 23:53:55 +08:00
linux-next/arch/powerpc/mm/book3s64
Aneesh Kumar K.V 16f6b67cf0 powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
With large memory (8TB and more) hotplug, we can get soft lockup
warnings as below. These were caused by a long loop without any
explicit cond_resched which is a problem for !PREEMPT kernels.

Avoid this using cond_resched() while inserting hash page table
entries. We already do similar cond_resched() in __add_pages(), see
commit f64ac5e6e3 ("mm, memory_hotplug: add scheduling point to
__add_pages").

  rcu:     3-....: (24002 ticks this GP) idle=13e/1/0x4000000000000002 softirq=722/722 fqs=12001
   (t=24003 jiffies g=4285 q=2002)
  NMI backtrace for cpu 3
  CPU: 3 PID: 3870 Comm: ndctl Not tainted 5.3.0-197.18-default+ #2
  Call Trace:
    dump_stack+0xb0/0xf4 (unreliable)
    nmi_cpu_backtrace+0x124/0x130
    nmi_trigger_cpumask_backtrace+0x1ac/0x1f0
    arch_trigger_cpumask_backtrace+0x28/0x3c
    rcu_dump_cpu_stacks+0xf8/0x154
    rcu_sched_clock_irq+0x878/0xb40
    update_process_times+0x48/0x90
    tick_sched_handle.isra.16+0x4c/0x80
    tick_sched_timer+0x68/0xe0
    __hrtimer_run_queues+0x180/0x430
    hrtimer_interrupt+0x110/0x300
    timer_interrupt+0x108/0x2f0
    decrementer_common+0x114/0x120
  --- interrupt: 901 at arch_add_memory+0xc0/0x130
      LR = arch_add_memory+0x74/0x130
    memremap_pages+0x494/0x650
    devm_memremap_pages+0x3c/0xa0
    pmem_attach_disk+0x188/0x750
    nvdimm_bus_probe+0xac/0x2c0
    really_probe+0x148/0x570
    driver_probe_device+0x19c/0x1d0
    device_driver_attach+0xcc/0x100
    bind_store+0x134/0x1c0
    drv_attr_store+0x44/0x60
    sysfs_kf_write+0x64/0x90
    kernfs_fop_write+0x1a0/0x270
    __vfs_write+0x3c/0x70
    vfs_write+0xd0/0x260
    ksys_write+0xdc/0x130
    system_call+0x5c/0x68

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191001084656.31277-1-aneesh.kumar@linux.ibm.com
2019-11-05 22:24:57 +11:00
..
hash_4k.c
hash_64k.c
hash_hugepage.c
hash_hugetlbpage.c
hash_native.c powerpc/book3s64/hash: Use secondary hash for bolted mapping if the primary is full 2019-10-28 21:54:16 +11:00
hash_pgtable.c powerpc/book3s64: Export has_transparent_hugepage() related functions. 2019-09-24 10:22:29 -07:00
hash_tlb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hash_utils.c powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning 2019-11-05 22:24:57 +11:00
iommu_api.c mm: introduce page_shift() 2019-09-24 15:54:08 -07:00
Makefile powerpc/pseries: Move mm/book3s64/vphn.c under platforms/pseries/ 2019-07-04 22:23:38 +10:00
mmu_context.c powerpc/book3s64/radix: Remove WARN_ON in destroy_context() 2019-09-21 08:36:53 +10:00
pgtable.c powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00
pkeys.c powerpc/pkeys: remove unused pkey_allows_readwrite 2019-10-11 19:34:10 +11:00
radix_hugetlbpage.c
radix_pgtable.c libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
radix_tlb.c powerpc/mm/book3s64/radix: Flush the full mm even when need_flush_all is set 2019-11-05 22:24:18 +11:00
slb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subpage_prot.c pagewalk: separate function pointers from iterator data 2019-09-07 04:28:04 -03:00