[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <172066485807.400039.1155297721228619828.b4-ty@mit.edu>
Date: Wed, 10 Jul 2024 22:35:38 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: linux-ext4@...r.kernel.org, Zhang Yi <yi.zhang@...weicloud.com>
Cc: "Theodore Ts'o" <tytso@....edu>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, adilger.kernel@...ger.ca, jack@...e.cz,
ritesh.list@...il.com, yi.zhang@...wei.com, chengzhihao1@...wei.com,
yukuai3@...wei.com
Subject: Re: [PATCH v2] jbd2: speed up jbd2_transaction_committed()
On Mon, 20 May 2024 21:18:31 +0800, Zhang Yi wrote:
> jbd2_transaction_committed() is used to check whether a transaction with
> the given tid has already committed, it holds j_state_lock in read mode
> and check the tid of current running transaction and committing
> transaction, but holding the j_state_lock is expensive.
>
> We have already stored the sequence number of the most recently
> committed transaction in journal t->j_commit_sequence, we could do this
> check by comparing it with the given tid instead. If the given tid isn't
> smaller than j_commit_sequence, we can ensure that the given transaction
> has been committed. That way we could drop the expensive lock and
> achieve about 10% ~ 20% performance gains in concurrent DIOs on may
> virtual machine with 100G ramdisk.
>
> [...]
Applied, thanks!
[1/1] jbd2: speed up jbd2_transaction_committed()
commit: 7c73ddb7589fb8ddb1136b6306dfb72089c81511
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists