From: Thavatchai Makphaibulchoke <thavatchai.makpahibulchoke@hp.com>
To: Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: Reduce contention on s_orphan_lock
Date: Tue, 20 May 2014 10:45:07 -0600 [thread overview]
Message-ID: <537B8693.4000904@hp.com> (raw)
In-Reply-To: <1400589949-25595-3-git-send-email-jack@suse.cz>
On 05/20/2014 06:45 AM, Jan Kara wrote:
> + if (dirty) {
> + err = ext4_handle_dirty_super(handle, sb);
> + rc = ext4_mark_iloc_dirty(handle, inode, &iloc);
> + if (!err)
> + err = rc;
> + if (err) {
> + /*
> + * We have to remove inode from in-memory list if
> + * addition to on disk orphan list failed. Stray orphan
> + * list entries can cause panics at unmount time.
> + */
> + mutex_lock(&sbi->s_orphan_lock);
> + list_del(&EXT4_I(inode)->i_orphan);
> + mutex_unlock(&sbi->s_orphan_lock);
> + }
> + }
Sorry Jan, I just noticed this.
I don't believe you could this optimization either. Since you drop the s_oprhan_lock in between, you essentially have an interval where there is a stray in-memory orphan and could cause a panic as the comment above mentioned.
As for comments regarding ext4_mark_iloc() optimization, in your case since you are holding the i_mutex, should not that prevent the inode from being reclaimed?
Thanks,
Mak.
next prev parent reply other threads:[~2014-05-20 16:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 12:45 [PATCH 0/2 v3] Improve orphan list scaling Jan Kara
2014-05-20 12:45 ` [PATCH 1/2] ext4: Use sbi in ext4_orphan_{add|del}() Jan Kara
2014-05-20 12:45 ` [PATCH 2/2] ext4: Reduce contention on s_orphan_lock Jan Kara
2014-05-20 16:45 ` Thavatchai Makphaibulchoke [this message]
2014-05-20 21:03 ` Jan Kara
2014-05-20 23:27 ` Thavatchai Makphaibulchoke
2014-05-26 15:14 ` [PATCH 0/2 v3] Improve orphan list scaling Theodore Ts'o
-- strict thread matches above, loose matches on Subject: below --
2014-05-15 20:17 [PATCH 0/2 v2] " Jan Kara
2014-05-15 20:17 ` [PATCH 2/2] ext4: Reduce contention on s_orphan_lock Jan Kara
2014-05-20 3:23 ` Theodore Ts'o
2014-05-20 8:33 ` Thavatchai Makphaibulchoke
2014-05-20 9:18 ` Jan Kara
2014-05-20 13:57 ` Theodore Ts'o
2014-05-20 17:16 ` Thavatchai Makphaibulchoke
2014-06-02 17:45 ` Thavatchai Makphaibulchoke
2014-06-03 8:52 ` Jan Kara
2014-06-16 19:20 ` Thavatchai Makphaibulchoke
2014-06-17 9:29 ` Jan Kara
2014-06-18 4:38 ` Thavatchai Makphaibulchoke
2014-06-18 10:37 ` Jan Kara
2014-07-22 4:35 ` Thavatchai Makphaibulchoke
2014-07-23 8:15 ` Jan Kara
2014-04-29 23:32 [PATCH 0/2] " Jan Kara
2014-04-29 23:32 ` [PATCH 2/2] " Jan Kara
2014-05-02 21:56 ` Thavatchai Makphaibulchoke
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=537B8693.4000904@hp.com \
--to=thavatchai.makpahibulchoke@hp.com \
--cc=jack@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).