[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175518289078.1126827.11901276117881575230.b4-ty@mit.edu>
Date: Thu, 14 Aug 2025 10:48:43 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>,
libaokun@...weicloud.com
Cc: "Theodore Ts'o" <tytso@....edu>, jack@...e.cz,
linux-kernel@...r.kernel.org, yi.zhang@...wei.com,
yangerkun@...wei.com, libaokun1@...wei.com
Subject: Re: [PATCH] jbd2: prevent softlockup in jbd2_log_do_checkpoint()
On Tue, 12 Aug 2025 14:37:52 +0800, libaokun@...weicloud.com wrote:
> Both jbd2_log_do_checkpoint() and jbd2_journal_shrink_checkpoint_list()
> periodically release j_list_lock after processing a batch of buffers to
> avoid long hold times on the j_list_lock. However, since both functions
> contend for j_list_lock, the combined time spent waiting and processing
> can be significant.
>
> jbd2_journal_shrink_checkpoint_list() explicitly calls cond_resched() when
> need_resched() is true to avoid softlockups during prolonged operations.
> But jbd2_log_do_checkpoint() only exits its loop when need_resched() is
> true, relying on potentially sleeping functions like __flush_batch() or
> wait_on_buffer() to trigger rescheduling. If those functions do not sleep,
> the kernel may hit a softlockup.
>
> [...]
Applied, thanks!
[1/1] jbd2: prevent softlockup in jbd2_log_do_checkpoint()
commit: 9d98cf4632258720f18265a058e62fde120c0151
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists