linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yanhai <zhu.yanhai@gmail.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: lsf@lists.linux-foundation.org, linux-mm@kvack.org,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
	Ying Han <yinghan@google.com>, Michal Hocko <mhocko@suse.cz>,
	Greg Thelen <gthelen@google.com>,
	"minchan.kim@gmail.com" <minchan.kim@gmail.com>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	walken@google.com
Subject: Re: [LSF][MM] rough agenda for memcg.
Date: Thu, 31 Mar 2011 17:15:34 +0800	[thread overview]
Message-ID: <AANLkTi=D8pfyxf3Vr33YZvuQm9fQv+bthyiLLeRjaJt6@mail.gmail.com> (raw)
In-Reply-To: <20110331110113.a01f7b8b.kamezawa.hiroyu@jp.fujitsu.com>

Hi Kame,

2011/3/31 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>:
>  c) Should we provide a auto memory cgroup for file caches ?
>     (Then we can implement a file-cache-limit.)
>  c) AFAIK, some other OSs have this kind of feature, a box for file-cache.
>     Because file-cache is a shared object between all cgroups, it's difficult
>     to handle. It may be better to have a auto cgroup for file caches and add knobs
>     for memcg.

I have been thinking about this idea. It seems the root cause of
current difficult is
the whole cgroup infrastructure is based on process groups, so its counters
naturally center on process. However, this is not nature for counters
of file caches,
which center on inodes/devs actually. This brought many confusing
problems - e.g.
who should be charged for a (dirty)file page?  I think the answer is
no process but
the filesystem/block device it sits on.
How about we change the view, from centering on process to centering
on filesystem/device.
Let's call it 'pcgroup'. When it enables, we can set limits for each
filesystem/device,
and charge the filesystem/device for each page seat on it. This
'pcgroup' would be
orthogonal to cgroup.memcontroler. We could make cgroup.memcontroler only
account/control the anon pages they have, leave all file-backend pages
controlled
by the 'pcgroup'.
For the implementation, 'pcgroup' can reuse the struct page_cgroup -
and res_counter
maybe even the hierarchy reclaim code, and so on - it looks like a
cgroup very much -
which might make things easier.
One problem is this 'pcgroup' may not be able to be implemented inside
cgroup frame,
as the very core code of cgroup assumes that all its
controls/res_counters are per-process(group).

Is this doable?

Thanks,
Zhu Yanhai

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2011-03-31  9:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31  2:01 KAMEZAWA Hiroyuki
2011-03-31  5:52 ` Greg Thelen
2011-03-31 12:27   ` [Lsf] " Jan Kara
2011-03-31  6:01 ` Balbir Singh
2011-03-31  6:03 ` Ying Han
2011-03-31  9:15 ` Zhu Yanhai [this message]
2011-04-01  2:36   ` Michel Lespinasse
2011-03-31  9:23 ` [Lsf] " Pavel Emelyanov
2011-03-31 16:20   ` Andrea Arcangeli
2011-03-31 18:14     ` Ying Han
2011-03-31 19:00       ` Pavel Emelyanov
2011-03-31 19:16         ` Ying Han
2011-03-31 19:22           ` Ying Han
2011-03-31 15:59 ` Andrea Arcangeli
2011-03-31 20:06   ` Johannes Weiner
2011-04-01  3:18   ` Michel Lespinasse
2011-04-01  1:16 ` KAMEZAWA Hiroyuki

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='AANLkTi=D8pfyxf3Vr33YZvuQm9fQv+bthyiLLeRjaJt6@mail.gmail.com' \
    --to=zhu.yanhai@gmail.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf@lists.linux-foundation.org \
    --cc=mhocko@suse.cz \
    --cc=minchan.kim@gmail.com \
    --cc=walken@google.com \
    --cc=yinghan@google.com \
    /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