Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-06 Thread Konstantin Khlebnikov
On Sun, Nov 2, 2014 at 6:15 AM, Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. > > There is

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-06 Thread Konstantin Khlebnikov
On Sun, Nov 2, 2014 at 6:15 AM, Johannes Weiner han...@cmpxchg.org wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 04:00:39PM +0100, Michal Hocko wrote: > On Tue 04-11-14 09:09:37, Johannes Weiner wrote: > > On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: > > > On Tue 04-11-14 08:27:01, Johannes Weiner wrote: > > > > From: Johannes Weiner > > > > Subject: [patch] mm: move

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread David Miller
From: Johannes Weiner Date: Tue, 4 Nov 2014 09:09:37 -0500 > You either need cgroup memory accounting and limiting or not. There > is no possible trade-off to be had. I couldn't have said it better myself, +1. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 09:09:37, Johannes Weiner wrote: > On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: > > On Tue 04-11-14 08:27:01, Johannes Weiner wrote: > > > From: Johannes Weiner > > > Subject: [patch] mm: move page->mem_cgroup bad page handling into generic > > > code fix > > >

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 08:48:41, Johannes Weiner wrote: > On Tue, Nov 04, 2014 at 02:06:52PM +0100, Michal Hocko wrote: > > The code size grows (~1.5k) most probably due to struct page pointer > > arithmetic (but I haven't checked that) but the data section shrinks > > for SLAB. So we have additional

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: > On Tue 04-11-14 08:27:01, Johannes Weiner wrote: > > From: Johannes Weiner > > Subject: [patch] mm: move page->mem_cgroup bad page handling into generic > > code fix > > > > Remove obsolete memory saving recommendations from the

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 02:06:52PM +0100, Michal Hocko wrote: > The code size grows (~1.5k) most probably due to struct page pointer > arithmetic (but I haven't checked that) but the data section shrinks > for SLAB. So we have additional 1.6k for SLUB. I guess this is > acceptable. > >text

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 08:27:01, Johannes Weiner wrote: > From: Johannes Weiner > Subject: [patch] mm: move page->mem_cgroup bad page handling into generic > code fix > > Remove obsolete memory saving recommendations from the MEMCG Kconfig > help text. The memory overhead is still there. So I do not

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 05:36:39PM +0900, Kamezawa Hiroyuki wrote: > (2014/11/02 12:15), Johannes Weiner wrote: > > Memory cgroups used to have 5 per-page pointers. To allow users to > > disable that amount of overhead during runtime, those pointers were > > allocated in a separate array, with a

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Mon 03-11-14 17:36:26, Johannes Weiner wrote: [...] > Also, nobody is using that space currently, and I can save memory by > moving the pointer in there. Should we later add another pointer to > struct page we are only back to the status quo - with the difference > that booting with

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Kamezawa Hiroyuki
(2014/11/02 12:15), Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. > > There is now only

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Kamezawa Hiroyuki
(2014/11/02 12:15), Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page. There is now only one page

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Mon 03-11-14 17:36:26, Johannes Weiner wrote: [...] Also, nobody is using that space currently, and I can save memory by moving the pointer in there. Should we later add another pointer to struct page we are only back to the status quo - with the difference that booting with

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 05:36:39PM +0900, Kamezawa Hiroyuki wrote: (2014/11/02 12:15), Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 08:27:01, Johannes Weiner wrote: From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: move page-mem_cgroup bad page handling into generic code fix Remove obsolete memory saving recommendations from the MEMCG Kconfig help text. The memory overhead is still there.

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 02:06:52PM +0100, Michal Hocko wrote: The code size grows (~1.5k) most probably due to struct page pointer arithmetic (but I haven't checked that) but the data section shrinks for SLAB. So we have additional 1.6k for SLUB. I guess this is acceptable. textdata

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: On Tue 04-11-14 08:27:01, Johannes Weiner wrote: From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: move page-mem_cgroup bad page handling into generic code fix Remove obsolete memory saving recommendations from

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 08:48:41, Johannes Weiner wrote: On Tue, Nov 04, 2014 at 02:06:52PM +0100, Michal Hocko wrote: The code size grows (~1.5k) most probably due to struct page pointer arithmetic (but I haven't checked that) but the data section shrinks for SLAB. So we have additional 1.6k for

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Michal Hocko
On Tue 04-11-14 09:09:37, Johannes Weiner wrote: On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: On Tue 04-11-14 08:27:01, Johannes Weiner wrote: From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: move page-mem_cgroup bad page handling into generic code fix

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread David Miller
From: Johannes Weiner han...@cmpxchg.org Date: Tue, 4 Nov 2014 09:09:37 -0500 You either need cgroup memory accounting and limiting or not. There is no possible trade-off to be had. I couldn't have said it better myself, +1. -- To unsubscribe from this list: send the line unsubscribe

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-04 Thread Johannes Weiner
On Tue, Nov 04, 2014 at 04:00:39PM +0100, Michal Hocko wrote: On Tue 04-11-14 09:09:37, Johannes Weiner wrote: On Tue, Nov 04, 2014 at 02:41:10PM +0100, Michal Hocko wrote: On Tue 04-11-14 08:27:01, Johannes Weiner wrote: From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm:

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Joonsoo Kim
On Mon, Nov 03, 2014 at 10:09:42AM -0500, Johannes Weiner wrote: > Hi Joonsoo, > > On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: > > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > > > Memory cgroups used to have 5 per-page pointers. To allow users to > > >

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
On Mon, Nov 03, 2014 at 04:58:07PM -0500, David Miller wrote: > From: "Kirill A. Shutemov" > Date: Mon, 3 Nov 2014 23:52:06 +0200 > > > On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: > >> On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: > >> > On Sat, Nov 01,

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread David Miller
From: "Kirill A. Shutemov" Date: Mon, 3 Nov 2014 23:52:06 +0200 > On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: >> On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: >> > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: >> > > Memory cgroups

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Kirill A. Shutemov
On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: > On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: > > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > > > Memory cgroups used to have 5 per-page pointers. To allow users to > > > disable that

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > > Memory cgroups used to have 5 per-page pointers. To allow users to > > disable that amount of overhead during runtime, those pointers were > > allocated in a

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Kirill A. Shutemov
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. >

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Vladimir Davydov
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. >

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
Documentation/cgroups/memory.txt is outdate even more hopelessly than before. It deserves a complete rewrite but I guess something like the following should be added in the meantime to prepare potential readers about the trap. --- diff --git a/Documentation/cgroups/memory.txt

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
On Mon 03-11-14 10:09:42, Johannes Weiner wrote: > Hi Joonsoo, > > On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: > > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > > > Memory cgroups used to have 5 per-page pointers. To allow users to > > > disable that amount

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
On Sat 01-11-14 23:15:54, Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. > > There is now

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread David Miller
From: Johannes Weiner Date: Mon, 3 Nov 2014 10:09:42 -0500 > Please re-introduce this code when your new usecase is ready to be > upstreamed. There is little reason to burden an unrelated feature > with a sizable chunk of dead code for a vague future user. +1 -- To unsubscribe from this list:

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
Hi Joonsoo, On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: > On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > > Memory cgroups used to have 5 per-page pointers. To allow users to > > disable that amount of overhead during runtime, those pointers were > > allocated

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Joonsoo Kim
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page.

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Joonsoo Kim
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page. Hello,

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
Hi Joonsoo, On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread David Miller
From: Johannes Weiner han...@cmpxchg.org Date: Mon, 3 Nov 2014 10:09:42 -0500 Please re-introduce this code when your new usecase is ready to be upstreamed. There is little reason to burden an unrelated feature with a sizable chunk of dead code for a vague future user. +1 -- To unsubscribe

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
On Sat 01-11-14 23:15:54, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page. There is now only

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
On Mon 03-11-14 10:09:42, Johannes Weiner wrote: Hi Joonsoo, On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Michal Hocko
Documentation/cgroups/memory.txt is outdate even more hopelessly than before. It deserves a complete rewrite but I guess something like the following should be added in the meantime to prepare potential readers about the trap. --- diff --git a/Documentation/cgroups/memory.txt

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Vladimir Davydov
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page.

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Kirill A. Shutemov
On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page.

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Kirill A. Shutemov
On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread David Miller
From: Kirill A. Shutemov kir...@shutemov.name Date: Mon, 3 Nov 2014 23:52:06 +0200 On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Johannes Weiner
On Mon, Nov 03, 2014 at 04:58:07PM -0500, David Miller wrote: From: Kirill A. Shutemov kir...@shutemov.name Date: Mon, 3 Nov 2014 23:52:06 +0200 On Mon, Nov 03, 2014 at 04:36:28PM -0500, Johannes Weiner wrote: On Mon, Nov 03, 2014 at 11:06:07PM +0200, Kirill A. Shutemov wrote: On Sat,

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-03 Thread Joonsoo Kim
On Mon, Nov 03, 2014 at 10:09:42AM -0500, Johannes Weiner wrote: Hi Joonsoo, On Mon, Nov 03, 2014 at 05:02:08PM +0900, Joonsoo Kim wrote: On Sat, Nov 01, 2014 at 11:15:54PM -0400, Johannes Weiner wrote: Memory cgroups used to have 5 per-page pointers. To allow users to disable that

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-02 Thread David Miller
From: Johannes Weiner Date: Sat, 1 Nov 2014 23:15:54 -0400 > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. > >

Re: [patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-02 Thread David Miller
From: Johannes Weiner han...@cmpxchg.org Date: Sat, 1 Nov 2014 23:15:54 -0400 Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and

[patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-01 Thread Johannes Weiner
Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page. There is now only one page pointer remaining: the memcg pointer, that

[patch 1/3] mm: embed the memcg pointer directly into struct page

2014-11-01 Thread Johannes Weiner
Memory cgroups used to have 5 per-page pointers. To allow users to disable that amount of overhead during runtime, those pointers were allocated in a separate array, with a translation layer between them and struct page. There is now only one page pointer remaining: the memcg pointer, that