summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorDaeho Jeong <daeho.jeong@samsung.com>2017-06-22 23:54:33 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-06-22 23:54:33 -0400
commita015434480dcdbfdc188df9b3633348af745e1b1 (patch)
treedb953f73e1f659b9235730b92f1561723d2325bb /fs/ext4/super.c
parent3abb1a0fc2871f2db52199e1748a1d48a54a3427 (diff)
downloadblackbird-op-linux-a015434480dcdbfdc188df9b3633348af745e1b1.tar.gz
blackbird-op-linux-a015434480dcdbfdc188df9b3633348af745e1b1.zip
ext4: send parallel discards on commit completions
Now, when we mount ext4 filesystem with '-o discard' option, we have to issue all the discard commands for the blocks to be deallocated and wait for the completion of the commands on the commit complete phase. Because this procedure might involve a lot of sequential combinations of issuing discard commands and waiting for that, the delay of this procedure might be too much long, even to 17.0s in our test, and it results in long commit delay and fsync() performance degradation. To reduce this kind of delay, instead of adding callback for each extent and handling all of them in a sequential manner on commit phase, we instead add a separate list of extents to free to the superblock and then process this list at once after transaction commits so that we can issue all the discard commands in a parallel manner like XFS filesystem. Finally, we could enhance the discard command handling performance. The result was such that 17.0s delay of a single commit in the worst case has been enhanced to 4.8s. Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Tested-by: Hobin Woo <hobin.woo@samsung.com> Tested-by: Kitae Lee <kitae87.lee@samsung.com> Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 1fec35bd4084..cb9af5d5c29b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -373,6 +373,9 @@ static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
struct ext4_journal_cb_entry *jce;
BUG_ON(txn->t_state == T_FINISHED);
+
+ ext4_process_freed_data(sb, txn->t_tid);
+
spin_lock(&sbi->s_md_lock);
while (!list_empty(&txn->t_private_list)) {
jce = list_entry(txn->t_private_list.next,
OpenPOWER on IntegriCloud