From: Lin Ruifeng <linruifeng4@huawei.com> Offering: HULK hulk inclusion category: feature bugzilla: N/A -------------------------------- Overprinting may cause following softlockup, we use pr_warn_ratelimited and pr_err_ratelimited to limited the speed of print. watchdog: BUG: soft lockup - CPU#55 stuck for 23s! [test_u2k_add_an:50936] rcu: 55-....: (1447 ticks this GP) idle=cb2/1/0x4000000000000002 softirq=94729/94729 fqs=2509 Modules linked in: rcu: (detected by 12, t=5555 jiffies, g=123873, q=11191) sharepool_dev(O) Sending NMI from CPU 12 to CPUs 55: NMI backtrace for cpu 55 CPU: 55 PID: 50936 Comm: test_u2k_add_an Tainted: G W O 5.10.0+ #9 Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 Call trace: console_unlock+0x2d0/0x65c vprintk_emit+0x208/0x2fc vprintk_default+0x40/0x50 vprintk_func+0xf4/0x1a0 printk+0x64/0x8c sp_munmap+0xec/0x110 sp_free_inner+0x1b0/0x320 mg_sp_free+0x38/0x60 dev_ioctl+0x540/0x1b14 [sharepool_dev] __arm64_sys_ioctl+0xb0/0xfc el0_svc_common.constprop.0+0x88/0x250 do_el0_svc+0x2c/0x90 el0_svc+0x20/0x30 el0_sync_handler+0xb0/0xb4 el0_sync+0x180/0x1c0 Sample time: 1644475978700 ns(HZ: 250) Sample stat: curr: user: 69196000000, nice: 0, sys: 109948000000, idle: 1438412458000, iowait: 446000, irq: 0, softirq: 5740000000, st: 0 deta: user: 69196000000, nice: 0, sys: 109948000000, idle: 1438412458000, iowait: 446000, irq: 0, softirq: 5740000000, st: 0 Sample softirq: TIMER: 806 TASKLET: 7 SCHED: 9345 RCU: 94729 Kernel panic - not syncing: softlockup: hung tasks Signed-off-by: Lin Ruifeng <linruifeng4@huawei.com> Signed-off-by: Yin Tirui <yintirui@huawei.com> --- mm/share_pool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/share_pool.c b/mm/share_pool.c index cec673f18160..bef8d470246d 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -1212,7 +1212,7 @@ static int sp_group_link_task(struct mm_struct *mm, struct sp_group *spg, } if (is_process_in_group(spg, mm)) { - pr_err("task already in target group(%d)\n", spg->id); + pr_warn_ratelimited("task already in target group(%d)\n", spg->id); return -EEXIST; } @@ -1924,7 +1924,7 @@ static void sp_munmap(struct mm_struct *mm, unsigned long addr, mmap_write_lock(mm); if (unlikely(!mmget_not_zero(mm))) { mmap_write_unlock(mm); - pr_warn("munmap: target mm is exiting\n"); + pr_warn_ratelimited("munmap: target mm is exiting\n"); return; } @@ -2340,7 +2340,7 @@ static int sp_map_spa_to_mm(struct mm_struct *mm, struct sp_area *spa, mmap_write_lock(mm); if (unlikely(!mmget_not_zero(mm))) { mmap_write_unlock(mm); - pr_warn("sp_map: target mm is exiting\n"); + pr_warn_ratelimited("sp_map: target mm is exiting\n"); return SP_SKIP_ERR; } -- 2.43.0