public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Cc: linux-ext4@vger.kernel.org, riteshh@linux.ibm.com, jack@suse.cz,
	tytso@mit.edu
Subject: Re: [PATCH v2 1/5] ext4: convert i_fc_lock to spinlock
Date: Wed, 9 Mar 2022 11:10:57 +0100	[thread overview]
Message-ID: <20220309101057.3uuix2gvjinobt3i@quack3.lan> (raw)
In-Reply-To: <20220308163319.1183625-2-harshads@google.com>

On Tue 08-03-22 08:33:15, Harshad Shirwadkar wrote:
> From: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
> 
> Convert ext4_inode_info->i_fc_lock to spinlock to avoid sleeping
> in invalid contexts.
> 
> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

One comment below...

> @@ -972,9 +970,13 @@ static int ext4_fc_wait_inode_data_all(journal_t *journal)
>  
>  	spin_lock(&sbi->s_fc_lock);
>  	list_for_each_entry_safe(pos, n, &sbi->s_fc_q[FC_Q_MAIN], i_fc_list) {
> +		spin_lock(&pos->i_fc_lock);
>  		if (!ext4_test_inode_state(&pos->vfs_inode,
> -					   EXT4_STATE_FC_COMMITTING))
> +					   EXT4_STATE_FC_COMMITTING)) {
> +			spin_unlock(&pos->i_fc_lock);
>  			continue;
> +		}
> +		spin_unlock(&pos->i_fc_lock);
>  		spin_unlock(&sbi->s_fc_lock);

Why do you add a lock here in a pure lock-conversion patch? Furthermore I
don't think the lock is needed...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2022-03-09 10:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 16:33 [PATCH v2 0/5] ext4: improve commit path performance for fast commit Harshad Shirwadkar
2022-03-08 16:33 ` [PATCH v2 1/5] ext4: convert i_fc_lock to spinlock Harshad Shirwadkar
2022-03-09 10:10   ` Jan Kara [this message]
2022-03-11  4:02     ` harshad shirwadkar
2022-03-08 16:33 ` [PATCH v2 2/5] ext4: for committing inode, make ext4_fc_track_inode wait Harshad Shirwadkar
2022-03-09 10:14   ` Jan Kara
2022-03-11  4:17     ` harshad shirwadkar
2022-03-11  8:25       ` harshad shirwadkar
2022-03-21 14:06         ` Jan Kara
2022-04-18 21:02           ` harshad shirwadkar
2022-03-08 16:33 ` [PATCH v2 3/5] ext4: rework fast commit commit path Harshad Shirwadkar
2022-03-09 10:17   ` Jan Kara
2022-03-08 16:33 ` [PATCH v2 4/5] ext4: drop i_fc_updates from inode fc info Harshad Shirwadkar
2022-03-09 10:17   ` Jan Kara
2022-03-08 16:33 ` [PATCH v2 5/5] ext4: update code documentation Harshad Shirwadkar
2022-03-09 10:19   ` Jan Kara
     [not found] <CGME20220315071028epcms2p2c9d25549f30cbccdcc208f311651977b@epcms2p2>
2022-03-15  7:10 ` [PATCH v2 1/5] ext4: convert i_fc_lock to spinlock Daejun Park

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=20220309101057.3uuix2gvjinobt3i@quack3.lan \
    --to=jack@suse.cz \
    --cc=harshadshirwadkar@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=riteshh@linux.ibm.com \
    --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