linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.14 15/91] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
Date: Thu,  2 Jan 2020 23:06:57 +0100	[thread overview]
Message-ID: <20200102220413.847646347@linuxfoundation.org> (raw)
In-Reply-To: <20200102220356.856162165@linuxfoundation.org>

From: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

[ Upstream commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 ]

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 f64ac5e6e306 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/mm/hash_utils_64.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index cf1d76e03635..387600ecea60 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -303,6 +303,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
 		if (ret < 0)
 			break;
 
+		cond_resched();
 #ifdef CONFIG_DEBUG_PAGEALLOC
 		if (debug_pagealloc_enabled() &&
 			(paddr >> PAGE_SHIFT) < linear_map_hash_count)
-- 
2.20.1




  parent reply	other threads:[~2020-01-02 22:23 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 22:06 [PATCH 4.14 00/91] 4.14.162-stable review Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 01/91] scsi: lpfc: Fix discovery failures when target device connectivity bounces Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 02/91] scsi: mpt3sas: Fix clear pending bit in ioctl status Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 03/91] scsi: lpfc: Fix locking on mailbox command completion Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 04/91] Input: atmel_mxt_ts - disable IRQ across suspend Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 05/91] iommu/tegra-smmu: Fix page tables in > 4 GiB memory Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 06/91] scsi: target: compare full CHAP_A Algorithm strings Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 07/91] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 08/91] scsi: csiostor: Dont enable IRQs too early Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 09/91] powerpc/pseries: Mark accumulate_stolen_time() as notrace Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 10/91] powerpc/pseries: Dont fail hash page table insert for bolted mapping Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 11/91] powerpc/tools: Dont quote $objdump in scripts Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 12/91] dma-debug: add a schedule point in debug_dma_dump_mappings() Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 13/91] clocksource/drivers/asm9260: Add a check for of_clk_get Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 14/91] powerpc/security/book3s64: Report L1TF status in sysfs Greg Kroah-Hartman
2020-01-02 22:06 ` Greg Kroah-Hartman [this message]
2020-01-02 22:06 ` [PATCH 4.14 16/91] ext4: update direct I/O read lock pattern for IOCB_NOWAIT Greg Kroah-Hartman
2020-01-02 22:06 ` [PATCH 4.14 17/91] jbd2: Fix statistics for the number of logged blocks Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 18/91] scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6) Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 19/91] scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 20/91] f2fs: fix to update dirs i_pino during cross_rename Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 21/91] clk: qcom: Allow constant ratio freq tables for rcg Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 22/91] irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 23/91] irqchip: ingenic: Error out if IRQ domain creation failed Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 24/91] mfd: mfd-core: Honour Device Trees request to disable a child-device Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 25/91] fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 26/91] scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 27/91] scsi: ufs: fix potential bug which ends in system hang Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 28/91] powerpc/pseries/cmm: Implement release() function for sysfs device Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 29/91] powerpc/security: Fix wrong message when RFI Flush is disable Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 30/91] scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 31/91] clk: pxa: fix one of the pxa RTC clocks Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 32/91] bcache: at least try to shrink 1 node in bch_mca_scan() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 33/91] HID: logitech-hidpp: Silence intermittent get_battery_capacity errors Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 34/91] libnvdimm/btt: fix variable rc set but not used Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 35/91] HID: Improve Windows Precision Touchpad detection Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 36/91] scsi: pm80xx: Fix for SATA device discovery Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 37/91] scsi: ufs: Fix error handing during hibern8 enter Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 38/91] scsi: scsi_debug: num_tgts must be >= 0 Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 39/91] scsi: NCR5380: Add disconnect_mask module parameter Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 40/91] scsi: iscsi: Dont send data to unbound connection Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 41/91] scsi: target: iscsi: Wait for all commands to finish before freeing a session Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 42/91] gpio: mpc8xxx: Dont overwrite default irq_set_type callback Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 43/91] apparmor: fix unsigned len comparison with less than zero Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 44/91] scripts/kallsyms: fix definitely-lost memory leak Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 45/91] f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 46/91] cdrom: respect device capabilities during opening action Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 47/91] perf script: Fix brstackinsn for AUXTRACE Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 48/91] perf regs: Make perf_reg_name() return "unknown" instead of NULL Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 49/91] s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 50/91] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 51/91] s390/cpum_sf: Check for SDBT and SDB consistency Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 52/91] ocfs2: fix passing zero to PTR_ERR warning Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 53/91] kernel: sysctl: make drop_caches write-only Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 54/91] userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 55/91] x86/mce: Fix possibly incorrect severity calculation on AMD Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 56/91] net, sysctl: Fix compiler warning when only cBPF is present Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 57/91] netfilter: nf_queue: enqueue skbs with NULL dst Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 58/91] ALSA: hda - Downgrade error message for single-cmd fallback Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 59/91] bonding: fix active-backup transition after link failure Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 60/91] perf strbuf: Remove redundant va_end() in strbuf_addv() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 61/91] Make filldir[64]() verify the directory entry filename is valid Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 62/91] filldir[64]: remove WARN_ON_ONCE() for bad directory entries Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 63/91] PCI/switchtec: Read all 64 bits of part_event_bitmap Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 64/91] netfilter: ebtables: compat: reject all padding in matches/watchers Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 65/91] 6pack,mkiss: fix possible deadlock Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 66/91] netfilter: bridge: make sure to pull arp header in br_nf_forward_arp() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 67/91] inetpeer: fix data-race in inet_putpeer / inet_putpeer Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 68/91] net: add a READ_ONCE() in skb_peek_tail() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 69/91] net: icmp: fix data-race in cmp_global_allow() Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 70/91] hrtimer: Annotate lockless access to timer->state Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 71/91] spi: fsl: dont map irq during probe Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 72/91] tty/serial: atmel: fix out of range clock divider handling Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 73/91] pinctrl: baytrail: Really serialize all register accesses Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 74/91] net: ena: fix napi handler misbehavior when the napi budget is zero Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 75/91] net/mlxfw: Fix out-of-memory error in mfa2 flash burning Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 76/91] ptp: fix the race between the release of ptp_clock and cdev Greg Kroah-Hartman
2020-01-02 22:07 ` [PATCH 4.14 77/91] udp: fix integer overflow while computing available space in sk_rcvbuf Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 78/91] vhost/vsock: accept only packets with the right dst_cid Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 79/91] net: add bool confirm_neigh parameter for dst_ops.update_pmtu Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 80/91] ip6_gre: do not confirm neighbor when do pmtu update Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 81/91] gtp: " Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 82/91] net/dst: add new function skb_dst_update_pmtu_no_confirm Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 83/91] tunnel: do not confirm neighbor when do pmtu update Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 84/91] vti: " Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 85/91] sit: " Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 86/91] gtp: do not allow adding duplicate tid and ms_addr pdp context Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 87/91] tcp/dccp: fix possible race __inet_lookup_established() Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 88/91] tcp: do not send empty skb from tcp_write_xmit() Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 89/91] gtp: fix wrong condition in gtp_genl_dump_pdp() Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 90/91] gtp: fix an use-after-free in ipv4_pdp_find() Greg Kroah-Hartman
2020-01-02 22:08 ` [PATCH 4.14 91/91] gtp: avoid zero size hashtable Greg Kroah-Hartman
2020-01-02 23:05 ` [PATCH 4.14 00/91] 4.14.162-stable review Guenter Roeck
2020-01-03  0:16   ` Sasha Levin
2020-01-03  8:38     ` Greg Kroah-Hartman
2020-01-03 13:43       ` Naresh Kamboju
2020-01-03 14:29 ` Guenter Roeck
2020-01-03 17:50 ` Jon Hunter
2020-01-03 22:01 ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200102220413.847646347@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).