Skip to content
Unverified Commit 6654408a authored by Jingbo Xu's avatar Jingbo Xu Committed by Christian Brauner
Browse files

writeback, cgroup: switch inodes with dirty timestamps to release dying cgwbs



The cgwb cleanup routine will try to release the dying cgwb by switching
the attached inodes.  It fetches the attached inodes from wb->b_attached
list, omitting the fact that inodes only with dirty timestamps reside in
wb->b_dirty_time list, which is the case when lazytime is enabled.  This
causes enormous zombie memory cgroup when lazytime is enabled, as inodes
with dirty timestamps can not be switched to a live cgwb for a long time.

It is reasonable not to switch cgwb for inodes with dirty data, as
otherwise it may break the bandwidth restrictions.  However since the
writeback of inode metadata is not accounted for, let's also switch
inodes with dirty timestamps to avoid zombie memory and block cgroups
when laztytime is enabled.

Fixes: c22d70a1 ("writeback, cgroup: release dying cgwbs by switching attached inodes")
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231014125511.102978-1-jefflexu@linux.alibaba.com


Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent e311ba29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment