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-next>] [day] [month] [year] [list]
Date:   Thu, 15 Mar 2018 18:01:34 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     darrick.wong@...cle.com, linux-xfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        ktkhai@...tuozzo.com
Subject: [PATCH RFC] xfs,
 memcg: Call xfs_fs_nr_cached_objects() only in case of global
 reclaim

xfs_reclaim_inodes_count(XFS_M(sb)) does not care about memcg.
So, it's called for memcg reclaim too, e.g. this list is shrinked
disproportionality to another lists.

This looks confusing, so I'm reporting about this.
Consider this patch as RFC.

Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
---
 fs/xfs/xfs_super.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 951271f57d00..124568aefa94 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1788,6 +1788,8 @@ xfs_fs_nr_cached_objects(
 	struct super_block	*sb,
 	struct shrink_control	*sc)
 {
+	if (sc->memcg)
+		return 0;
 	return xfs_reclaim_inodes_count(XFS_M(sb));
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ