From: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Greg Thelen <gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Konstantin Khlebnikov
<khlebnikov-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org"
<linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>,
Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma
Date: Wed, 11 Feb 2015 08:32:27 +0100 [thread overview]
Message-ID: <20150211073227.GB30939@quack.suse.cz> (raw)
In-Reply-To: <20150211021906.GA21356-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
Hello Tejun,
On Tue 10-02-15 21:19:06, Tejun Heo wrote:
> On Sat, Feb 07, 2015 at 09:38:39AM -0500, Tejun Heo wrote:
> > If we can argue that memcg and blkcg having different views is
> > meaningful and characterize and justify the behaviors stemming from
> > the deviation, sure, that'd be fine, but I don't think we have that as
> > of now.
...
> So, based on the assumption that write sharings are mostly incidental
> and temporary (ie. we're basically declaring that we don't support
> persistent write sharing), how about something like the following?
>
> 1. memcg contiues per-page tracking.
>
> 2. Each inode is associated with a single blkcg at a given time and
> written out by that blkcg.
>
> 3. While writing back, if the number of pages from foreign memcg's is
> higher than certain ratio of total written pages, the inode is
> marked as disowned and the writeback instance is optionally
> terminated early. e.g. if the ratio of foreign pages is over 50%
> after writing out the number of pages matching 5s worth of write
> bandwidth for the bdi, mark the inode as disowned.
>
> 4. On the following dirtying of the inode, the inode is associated
> with the matching blkcg of the dirtied page. Note that this could
> be the next cycle as the inode could already have been marked dirty
> by the time the above condition triggered. In that case, the
> following writeback would be terminated early too.
>
> This should provide sufficient corrective pressure so that incidental
> and temporary sharing of an inode doesn't become a persistent issue
> while keeping the complexity necessary for implementing such pressure
> fairly minimal and self-contained. Also, the changes necessary for
> individual filesystems would be minimal.
I like this proposal. It looks simple enough and when inodes aren't
pernamently write-shared it converges to the blkcg that is currently
writing to the inode. So ack from me.
Honza
--
Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
SUSE Labs, CR
next prev parent reply other threads:[~2015-02-11 7:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 4:43 [RFC] Making memcg track ownership per address_space or anon_vma Tejun Heo
2015-01-30 5:55 ` Greg Thelen
2015-01-30 6:27 ` Tejun Heo
[not found] ` <20150130062737.GB25699-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2015-01-30 16:07 ` Tejun Heo
2015-02-02 19:26 ` Konstantin Khlebnikov
2015-02-02 19:46 ` Tejun Heo
2015-02-03 23:30 ` Greg Thelen
2015-02-04 10:49 ` Konstantin Khlebnikov
2015-02-04 17:15 ` Tejun Heo
2015-02-04 17:58 ` Konstantin Khlebnikov
[not found] ` <54D25DBD.5080009-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>
2015-02-04 18:28 ` Tejun Heo
2015-02-04 17:06 ` Tejun Heo
[not found] ` <20150204170656.GA18858-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2015-02-04 23:51 ` Greg Thelen
2015-02-05 13:15 ` Tejun Heo
2015-02-05 22:05 ` Greg Thelen
[not found] ` <xr93siekt3p3.fsf-aSPv4SP+Du0KgorLzL7FmE7CuiCeIGUxQQ4Iyu8u01E@public.gmane.org>
2015-02-05 22:25 ` Tejun Heo
2015-02-06 0:03 ` Greg Thelen
2015-02-06 14:17 ` Tejun Heo
2015-02-06 23:43 ` Greg Thelen
[not found] ` <CAHH2K0bxvc34u1PugVQsSfxXhmN8qU6KRpiCWwOVBa6BPqMDOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-07 14:38 ` Tejun Heo
[not found] ` <20150207143839.GA9926-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2015-02-11 2:19 ` Tejun Heo
[not found] ` <20150211021906.GA21356-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-02-11 7:32 ` Jan Kara [this message]
2015-02-11 18:28 ` Greg Thelen
2015-02-11 20:33 ` Tejun Heo
[not found] ` <20150211203359.GF21356-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-02-11 21:22 ` Konstantin Khlebnikov
2015-02-11 21:46 ` Tejun Heo
[not found] ` <20150211214650.GA11920-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-02-11 21:57 ` Konstantin Khlebnikov
[not found] ` <CALYGNiPX89HsgUS8BrJvL_jW-EU95xezc7uPf=0Pm72qiUwp7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-11 22:05 ` Tejun Heo
[not found] ` <20150211220530.GA12728-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-02-11 22:15 ` Konstantin Khlebnikov
2015-02-11 22:30 ` Tejun Heo
2015-02-12 2:10 ` Greg Thelen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150211073227.GB30939@quack.suse.cz \
--to=jack-alswssmvlrq@public.gmane.org \
--cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org \
--cc=gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=khlebnikov-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox