From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>,
Alexander Coffin <alex.coffin@maticrobots.com>,
Jan Kara <jack@suse.cz>
Subject: [PATCH v2 4/4] jbd2: Drop pointless shrinker batch initialization
Date: Mon, 24 Jun 2024 19:01:20 +0200 [thread overview]
Message-ID: <20240624170127.3253-4-jack@suse.cz> (raw)
In-Reply-To: <20240624165406.12784-1-jack@suse.cz>
In jbd2_journal_init_common() we set batch size of a shrinker shrinking
checkpointed buffers to journal->j_max_transaction_buffers. But that is
guaranteed to be 0 at that point so we effectively stay with the default
shrinker batch size of 128. It has been like this since introduction of
jbd2 shrinkers so just drop the pointless initialization.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/jbd2/journal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index ae5b544ed0cc..c356cc027ed7 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1641,7 +1641,6 @@ static journal_t *journal_init_common(struct block_device *bdev,
journal->j_shrinker->scan_objects = jbd2_journal_shrink_scan;
journal->j_shrinker->count_objects = jbd2_journal_shrink_count;
- journal->j_shrinker->batch = journal->j_max_transaction_buffers;
journal->j_shrinker->private_data = journal;
shrinker_register(journal->j_shrinker);
--
2.35.3
next prev parent reply other threads:[~2024-06-24 17:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 17:01 [PATCH 0/4] jbd2: Avoid infinite transaction commit loop Jan Kara
2024-06-24 17:01 ` [PATCH v2 1/4] jbd2: Make jbd2_journal_get_max_txn_bufs() internal Jan Kara
2024-06-27 6:47 ` Zhang Yi
2024-07-11 2:35 ` Theodore Ts'o
2024-06-24 17:01 ` [PATCH v2 2/4] jbd2: Precompute number of transaction descriptor blocks Jan Kara
2024-06-25 9:31 ` Kemeng Shi
2024-06-25 11:07 ` Jan Kara
2024-06-25 12:02 ` Kemeng Shi
2024-06-27 7:06 ` Zhang Yi
2024-06-24 17:01 ` [PATCH v2 3/4] jbd2: Avoid infinite transaction commit loop Jan Kara
2024-06-26 7:38 ` Zhang Yi
2024-06-26 11:22 ` Jan Kara
2024-06-26 13:24 ` Zhang Yi
2024-06-26 14:55 ` Jan Kara
2024-06-27 6:43 ` Zhang Yi
2024-06-24 17:01 ` Jan Kara [this message]
2024-06-27 7:07 ` [PATCH v2 4/4] jbd2: Drop pointless shrinker batch initialization Zhang Yi
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=20240624170127.3253-4-jack@suse.cz \
--to=jack@suse.cz \
--cc=alex.coffin@maticrobots.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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