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] [day] [month] [year] [list]
Message-ID: <a6c1a1d7-870a-32ce-0ae1-44c2f5f15dbb@linux.alibaba.com>
Date:   Fri, 13 Oct 2023 07:55:53 +0800
From:   Jingbo Xu <jefflexu@...ux.alibaba.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     guro@...com, lizefan.x@...edance.com, hannes@...xchg.org,
        cgroups@...r.kernel.org, jack@...e.cz,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        viro@...iv.linux.org.uk, brauner@...nel.org, willy@...radead.org,
        joseph.qi@...ux.alibaba.com
Subject: Re: [PATCH] writeback, cgroup: switch inodes with dirty timestamps to
 release dying cgwbs



On 10/13/23 1:31 AM, Tejun Heo wrote:
> On Wed, Oct 11, 2023 at 04:42:28PM +0800, Jingbo Xu wrote:
>> 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, let's also switch inodes
>> with dirty timestamps to avoid zombie memory and block cgroups when
>> laztytime is enabled.
>>
>> Fixs: c22d70a162d3 ("writeback, cgroup: release dying cgwbs by switching attached inodes")
>> Signed-off-by: Jingbo Xu <jefflexu@...ux.alibaba.com>
> 
> The patch looks fine to me.
> 
> ...
>> +	restart = isw_prepare_wbs_switch(isw, &wb->b_attached, &nr);
>> +	if (!restart)
>> +		restart = isw_prepare_wbs_switch(isw, &wb->b_dirty_time, &nr);
> 
> But can you add a comment explaining why we're also migrating b_dirty_time?

Will add the comment in the next version.  Thanks.


-- 
Thanks,
Jingbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ