lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 3 Nov 2020 15:13:31 +0100
From:   Jan Kara <jack@...e.cz>
To:     Harshad Shirwadkar <harshadshirwadkar@...il.com>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu, jack@...e.cz
Subject: Re: [PATCH 02/10] ext4: mark fc ineligible if inode gets evictied
 due to mem pressure

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@...e.cz>
> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@...il.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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ