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 06:32:30
Also in: linux-mm

(2012/03/21 15:13), Konstantin Khlebnikov wrote:
KAMEZAWA Hiroyuki wrote:
quoted
(2012/03/20 4:59), Konstantin Khlebnikov wrote:
quoted
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 it would be better to solve problem completely and kill page_cgroup in one step.

I like step-by-step rather than a big step. I devided this page_cgroup diet patch set
into 3 steps (2012-Jan, 2012-Feb, and the next one is the last.)

This change may introduce new races as step1 and step2 did (Thanks to Hugh Dickins!).

Finally, IIUC, 'struct page' has 8bytes of padding now. I think we can use that space
if we can be agreed.

Hm. BTW, using lruvec in page->flags implies you add a dynamic table lookup in
free_page() and you need to reset page->flags to point a valid
lruvec at page allocation. Please take care of performance.

Thanks,
-Kame
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help