LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* memcg: save 20% of per-page memcg memory overhead
@ 2011-02-03 14:26 Johannes Weiner
  2011-02-03 14:26 ` [patch 1/5] memcg: no uncharged pages reach page_cgroup_zoneinfo Johannes Weiner
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Johannes Weiner @ 2011-02-03 14:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: KAMEZAWA Hiroyuki, Daisuke Nishimura, Balbir Singh, linux-mm,
	linux-kernel

This patch series removes the direct page pointer from struct
page_cgroup, which saves 20% of per-page memcg memory overhead (Fedora
and Ubuntu enable memcg per default, openSUSE apparently too).

The node id or section number is encoded in the remaining free bits of
pc->flags which allows calculating the corresponding page without the
extra pointer.

I ran, what I think is, a worst-case microbenchmark that just cats a
large sparse file to /dev/null, because it means that walking the LRU
list on behalf of per-cgroup reclaim and looking up pages from
page_cgroups is happening constantly and at a high rate.  But it made
no measurable difference.  A profile reported a 0.11% share of the new
lookup_cgroup_page() function in this benchmark.

	Hannes

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-02-04  9:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 14:26 memcg: save 20% of per-page memcg memory overhead Johannes Weiner
2011-02-03 14:26 ` [patch 1/5] memcg: no uncharged pages reach page_cgroup_zoneinfo Johannes Weiner
2011-02-04  0:01   ` KAMEZAWA Hiroyuki
2011-02-04  9:26     ` Johannes Weiner
2011-02-04  9:23       ` KAMEZAWA Hiroyuki
2011-02-04  4:16   ` Balbir Singh
2011-02-03 14:26 ` [patch 2/5] memcg: change page_cgroup_zoneinfo signature Johannes Weiner
2011-02-04  0:03   ` KAMEZAWA Hiroyuki
2011-02-03 14:26 ` [patch 3/5] memcg: fold __mem_cgroup_move_account into caller Johannes Weiner
2011-02-04  0:07   ` KAMEZAWA Hiroyuki
2011-02-04  0:53     ` Daisuke Nishimura
2011-02-03 14:26 ` [patch 4/5] memcg: condense page_cgroup-to-page lookup points Johannes Weiner
2011-02-04  0:10   ` KAMEZAWA Hiroyuki
2011-02-03 14:26 ` [patch 5/5] memcg: remove direct page_cgroup-to-page pointer Johannes Weiner
2011-02-04  0:19   ` KAMEZAWA Hiroyuki
2011-02-04  9:51     ` Johannes Weiner
2011-02-03 15:02 ` memcg: save 20% of per-page memcg memory overhead Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).