From: Jan Kara <jack@suse.cz>
To: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, jack@suse.cz
Subject: Re: [PATCH 02/10] ext4: mark fc ineligible if inode gets evictied due to mem pressure
Date: Tue, 3 Nov 2020 15:13:31 +0100 [thread overview]
Message-ID: <20201103141331.GF3440@quack2.suse.cz> (raw)
In-Reply-To: <20201031200518.4178786-3-harshadshirwadkar@gmail.com>
On Sat 31-10-20 13:05:10, Harshad Shirwadkar wrote:
> If inode gets evicted due to memory pressure, we have to remove it
> from the fast commit list. However, that inode may have uncommitted
> changes that fast commits will lose. So, just fall back to full
> commits in this case. Also, rename the fast commit ineligiblity reason
> from "EXT4_FC_REASON_MEM" to "EXT4_FC_REASON_MEM_CRUNCH" for better
> expression.
>
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
...
> diff --git a/fs/ext4/fast_commit.h b/fs/ext4/fast_commit.h
> index 06907d485989..cde86747faf8 100644
> --- a/fs/ext4/fast_commit.h
> +++ b/fs/ext4/fast_commit.h
> @@ -100,7 +100,7 @@ enum {
> EXT4_FC_REASON_XATTR = 0,
> EXT4_FC_REASON_CROSS_RENAME,
> EXT4_FC_REASON_JOURNAL_FLAG_CHANGE,
> - EXT4_FC_REASON_MEM,
> + EXT4_FC_REASON_MEM_CRUNCH,
Well MEM_CRUNCH doesn't really sound more understandable to me :). I'd
rather call it MEM_RECLAIM or ENOMEM or something like that...
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index b96a18679a27..52ff71236290 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -327,6 +327,7 @@ void ext4_evict_inode(struct inode *inode)
> ext4_xattr_inode_array_free(ea_inode_array);
> return;
> no_delete:
> + ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_MEM_CRUNCH);
> ext4_clear_inode(inode); /* We must guarantee clearing of inode... */
> }
This will make fs ineligible on every inode reclaim. Even if the inode was
clean, not part of any FC. I guess this is too aggressive...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2020-11-03 14:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 20:05 [PATCH 00/10] Ext4 fast commit fixes Harshad Shirwadkar
2020-10-31 20:05 ` [PATCH 01/10] ext4: describe fast_commit feature flags Harshad Shirwadkar
2020-11-03 10:33 ` Jan Kara
2020-10-31 20:05 ` [PATCH 02/10] ext4: mark fc ineligible if inode gets evictied due to mem pressure Harshad Shirwadkar
2020-11-03 14:13 ` Jan Kara [this message]
2020-11-03 18:33 ` harshad shirwadkar
2020-11-04 9:52 ` Jan Kara
2020-10-31 20:05 ` [PATCH 03/10] ext4: pass handle to ext4_fc_track_* functions Harshad Shirwadkar
2020-11-03 14:46 ` Jan Kara
2020-11-05 1:53 ` harshad shirwadkar
2020-10-31 20:05 ` [PATCH 04/10] ext4: clean up the JBD2 API that initializes fast commits Harshad Shirwadkar
2020-11-03 16:29 ` Jan Kara
2020-11-04 19:52 ` harshad shirwadkar
2020-11-05 10:30 ` Jan Kara
2020-11-05 12:44 ` Jan Kara
[not found] ` <CAE1WUT6oxiKtrdF6vzLv5vYFxPjefRhzDE2xfQGF6CqQQdPv1Q@mail.gmail.com>
2020-11-06 3:02 ` harshad shirwadkar
2020-10-31 20:05 ` [PATCH 05/10] jbd2: fix fast commit journalling APIs Harshad Shirwadkar
2020-11-03 16:38 ` Jan Kara
2020-11-04 21:25 ` harshad shirwadkar
2020-10-31 20:05 ` [PATCH 06/10] ext4: dedpulicate the code to wait on inode that's being committed Harshad Shirwadkar
2020-11-03 16:42 ` Jan Kara
2020-11-04 21:35 ` harshad shirwadkar
2020-10-31 20:05 ` [PATCH 07/10] ext4: misc fast commit fixes Harshad Shirwadkar
2020-11-03 16:52 ` Jan Kara
2020-11-06 3:07 ` harshad shirwadkar
2020-10-31 20:05 ` [PATCH 08/10] ext4: fix inode dirty check in case of fast commits Harshad Shirwadkar
2020-11-01 7:09 ` Andrea Righi
2020-11-03 16:58 ` Jan Kara
2020-10-31 20:05 ` [PATCH 09/10] ext4: disable fast commit with data journalling Harshad Shirwadkar
2020-11-03 17:01 ` Jan Kara
2020-10-31 20:05 ` [PATCH 10/10] ext4: issue fsdev cache flush before starting fast commit Harshad Shirwadkar
2020-11-03 17:02 ` Jan Kara
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=20201103141331.GF3440@quack2.suse.cz \
--to=jack@suse.cz \
--cc=harshadshirwadkar@gmail.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;
as well as URLs for NNTP newsgroup(s).