Thread (21 messages) 21 messages, 5 authors, 2012-03-23

Re: [RFC][PATCH 0/3] page cgroup diet

From: KAMEZAWA Hiroyuki <hidden>
Date: 2012-03-21 01:04:00
Also in: cgroups

(2012/03/20 4:59), Konstantin Khlebnikov wrote:
KAMEZAWA Hiroyuki wrote:
quoted
This is just an RFC...test is not enough yet.

I know it's merge window..this post is just for sharing idea.

This patch merges pc->flags and pc->mem_cgroup into a word. Then,
memcg's overhead will be 8bytes per page(4096bytes?).

Because this patch will affect all memory cgroup developers, I'd like to
show patches before MM Summit. I think we can agree the direction to
reduce size of page_cgroup..and finally integrate into 'struct page'
(and remove cgroup_disable= boot option...)

Patch 1/3 - introduce pc_to_mem_cgroup and hide pc->mem_cgroup
Patch 2/3 - remove pc->mem_cgroup
Patch 3/3 - remove memory barriers.

I'm now wondering when this change should be merged....
This is cool, but maybe we should skip this temporary step and merge all this stuff into page->flags.

Why we should skip and delay reduction of size of page_cgroup
which is considered as very big problem ? 
I think we can replace zone-id and node-id in page->flags with cumulative dynamically allocated lruvec-id,
so there will be enough space for hundred cgroups even on 32-bit systems.

Where section-id  is ?
IIUC, now, page->section->zone/node is calculated if CONFIG_SPARSEMEM.

BTW, I doubt that we can modify page->flags dynamically with multi-bit operations...using
cmpxchg per each page when it's charged/uncharged/other ?
After lru_lock splitting page to lruvec translation will be much frequently used than page to zone,
so page->zone and page->node translations can be implemented as page->lruvec->zone and page->lruvec->node.
And need to take rcu_read_lock() around page_zone() ?

Thanks,
-Kame



--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help