Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zijiang Huang <huangzjsmile@gmail.com>
Cc: baoquan.he@linux.dev, albinwyang@tencent.com, bhe@redhat.com,
	flyingpeng@tencent.com, kasong@tencent.com,
	kerayhuang@tencent.com, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm/swap: Add cond_resched() in swap_reclaim_full_clusters to prevent softlockup
Date: Fri, 8 May 2026 14:29:01 -0700	[thread overview]
Message-ID: <20260508142901.aaad5a82acf270a37f302330@linux-foundation.org> (raw)
In-Reply-To: <20260506130919.2298807-1-kerayhuang@tencent.com>

On Wed,  6 May 2026 21:09:19 +0800 Zijiang Huang <huangzjsmile@gmail.com> wrote:

> We hit a real softlockup in an internal stress test environment.
> The workload was LTP memory/swap stress on a large arm64 machine,
> with 320 CPUs, about 1TB memory and an 8.6GB swap device.
> The system was under heavy load and the swap device had a large
> number of full clusters. The softlockup was triggered during
> a stress test after about 3 days.
> 
> So, add periodic cond_resched() calls during large full_clusters
> reclaim operations to prevent softlockup issues.
> 
> Detailed call trace as follow:
> 
> PID: 3817773  TASK: ffff0883bb28b780  CPU: 48   COMMAND: "kworker/48:7"
>    #0 [ffff800080183d10] __crash_kexec at ffffa4c1361e5de4
>    #1 [ffff800080183d90] panic at ffffa4c1360d5e9c
>    #2 [ffff800080183e20] watchdog_timer_fn at ffffa4c136231fa8
>    ...
>   #16 [ffff8000c4ad3cb0] swap_cache_del_folio at ffffa4c1363e1614
>   #17 [ffff8000c4ad3ce0] __try_to_reclaim_swap at ffffa4c1363e4bfc
>   #18 [ffff8000c4ad3d40] swap_reclaim_full_clusters at ffffa4c1363e5474
>   #19 [ffff8000c4ad3da0] swap_reclaim_work at ffffa4c1363e550c
>   #20 [ffff8000c4ad3dc0] process_one_work at ffffa4c136102edc
>   #21 [ffff8000c4ad3e10] worker_thread at ffffa4c136103398
>   #22 [ffff8000c4ad3e70] kthread at ffffa4c13610d95c

Thanks.

> Fixes: 5168a68eb78f ("mm, swap: avoid over reclaim of full clusters")

I'll add a cc:stable to this to help ensure that earlier kernels don't
hit this.

> Signed-off-by: Zijiang Huang <kerayhuang@tencent.com>
> Reviewed-by: Kairui Song <kasong@tencent.com>
> Reviewed-by: Hao Peng <flyingpeng@tencent.com>
> Reviewed-by: albinwyang <albinwyang@tencent.com>


      parent reply	other threads:[~2026-05-08 21:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 12:37 [PATCH] mm/swap: Add cond_resched() in swap_reclaim_full_clusters to prevent softlockup kerayhuang
2026-04-24 15:39 ` Baoquan He
2026-04-29 12:49   ` kerayhuang
2026-05-01  2:43     ` Baoquan He
2026-05-06 13:09       ` [PATCH v2] " Zijiang Huang
2026-05-07  1:35         ` Baoquan He
2026-05-07  4:02         ` Chris Li
2026-05-08 11:33           ` Zijiang Huang
2026-05-08 13:49             ` Baoquan He
2026-05-08 21:29         ` Andrew Morton [this message]

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=20260508142901.aaad5a82acf270a37f302330@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=albinwyang@tencent.com \
    --cc=baoquan.he@linux.dev \
    --cc=bhe@redhat.com \
    --cc=flyingpeng@tencent.com \
    --cc=huangzjsmile@gmail.com \
    --cc=kasong@tencent.com \
    --cc=kerayhuang@tencent.com \
    --cc=linux-mm@kvack.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