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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191007232447.GA11171@tower.DHCP.thefacebook.com>
Date:   Mon, 7 Oct 2019 23:24:51 +0000
From:   Roman Gushchin <guro@...com>
To:     Michal Koutný <mkoutny@...e.com>
CC:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        "tj@...nel.org" <tj@...nel.org>, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH] cgroup, blkcg: prevent dirty inodes to pin dying memory
 cgroups

On Mon, Oct 07, 2019 at 06:19:26PM +0200, Michal Koutný wrote:
> On Fri, Oct 04, 2019 at 03:11:04PM -0700, Roman Gushchin <guro@...com> wrote:
> > An inode which is getting dirty for the first time is associated
> > with the wb structure (look at __inode_attach_wb()). It can later
> > be switched to another wb under some conditions (e.g. some other
> > cgroup is writing a lot of data to the same inode), but generally
> > stays associated up to the end of life of the inode structure.
> What about dissociating the wb structure from the charged cgroup after
> the particular writeback finished? (I understand from your description
> that wb structure outlives the dirtier and is kept due to other inode
> (read) users, not sure if that's correct assumption.)

Well, that sounds nice, and I thought into this direction, but I've no idea
how to implement it :)

First, it's hard to find a good moment for dissociation. It seems that
the good moment is after the cgroup has been removed by the user and most
of the dirty memory has been written back, but it's hard to formalize,
given that other cgroups may write to the same inode concurrently.

Second, the current code assumes that wb->memcg association never breaks,
and it's not that trivial to get rid of this assumption without
introducing new locks, etc.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ