Forum Search:
OpenVZ Forum
Members
Search
Help
Register
Login
Home
Home
»
Mailing lists
»
Devel
»
[PATCH 00/11] kmem controller for memcg: stripped down version
Show:
Today's Messages
::
Show Polls
::
Message Navigator
E-mail to friend
Re: [PATCH 06/11] memcg: kmem controller infrastructure
[
message #46980
is a reply to
message #46925
]
Tue, 26 June 2012 09:12
David Rientjes
Messages:
59
Registered:
November 2006
Member
On Mon, 25 Jun 2012, Glauber Costa wrote:
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 83e7ba9..22479eb 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -21,6 +21,7 @@
> #define _LINUX_MEMCONTROL_H
> #include <linux/cgroup.h>
> #include <linux/vm_event_item.h>
> +#include <linux/hardirq.h>
>
> struct mem_cgroup;
> struct page_cgroup;
> @@ -409,6 +410,12 @@ struct sock;
> #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> void sock_update_memcg(struct sock *sk);
> void sock_release_memcg(struct sock *sk);
> +
> +#define mem_cgroup_kmem_on 1
> +bool __mem_cgroup_new_kmem_page(gfp_t gfp, void *handle, int order);
> +void __mem_cgroup_commit_kmem_page(struct page *page, void *handle, int order);
> +void __mem_cgroup_free_kmem_page(struct page *page, int order);
> +#define is_kmem_tracked_alloc (gfp & __GFP_KMEMCG)
> #else
> static inline void sock_update_memcg(struct sock *sk)
> {
> @@ -416,6 +423,43 @@ static inline void sock_update_memcg(struct sock *sk)
> static inline void sock_release_memcg(struct sock *sk)
> {
> }
> +
> +#define mem_cgroup_kmem_on 0
> +#define __mem_cgroup_new_kmem_page(a, b, c) false
> +#define __mem_cgroup_free_kmem_page(a,b )
> +#define __mem_cgroup_commit_kmem_page(a, b, c)
> +#define is_kmem_tracked_alloc (false)
> #endif /* CONFIG_CGROUP_MEM_RES_CTLR_KMEM */
> +
> +static __always_inline
> +bool mem_cgroup_new_kmem_page(gfp_t gfp, void *handle, int order)
> +{
> + if (!mem_cgroup_kmem_on)
> + return true;
> + if (!is_kmem_tracked_alloc)
> + return true;
> + if (!current->mm)
> + return true;
> + if (in_interrupt())
> + return true;
You can't test for current->mm in irq context, so you need to check for
in_interrupt() first. Also, what prevents __mem_cgroup_new_kmem_page()
from being called for a kthread that has called use_mm() before
unuse_mm()?
> + if (gfp & __GFP_NOFAIL)
> + return true;
> + return __mem_cgroup_new_kmem_page(gfp, handle, order);
> +}
> +
> +static __always_inline
> +void mem_cgroup_free_kmem_page(struct page *page, int order)
> +{
> + if (mem_cgroup_kmem_on)
> + __mem_cgroup_free_kmem_page(page, order);
> +}
> +
> +static __always_inline
> +void mem_cgroup_commit_kmem_page(struct page *page, struct mem_cgroup *handle,
> + int order)
> +{
> + if (mem_cgroup_kmem_on)
> + __mem_cgroup_commit_kmem_page(page, handle, order);
> +}
> #endif /* _LINUX_MEMCONTROL_H */
>
Report message to a moderator
[
Message index
]
[PATCH 00/11] kmem controller for memcg: stripped down version
By:
Glauber Costa
on Mon, 25 June 2012 14:15
[PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Suleiman Souhlal
on Mon, 25 June 2012 23:33
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Tue, 26 June 2012 08:39
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Suleiman Souhlal
on Wed, 27 June 2012 16:16
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
David Rientjes
on Tue, 26 June 2012 04:09
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Tue, 26 June 2012 07:12
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
David Rientjes
on Tue, 26 June 2012 08:54
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Tue, 26 June 2012 09:08
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
David Rientjes
on Tue, 26 June 2012 09:17
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Tue, 26 June 2012 09:23
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Wed, 27 June 2012 10:03
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
David Rientjes
on Wed, 27 June 2012 19:48
Re: [PATCH 02/11] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Wed, 27 June 2012 20:47
[PATCH 03/11] memcg: change defines to an enum
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 03/11] memcg: change defines to an enum
By:
David Rientjes
on Tue, 26 June 2012 04:11
Re: [PATCH 03/11] memcg: change defines to an enum
By:
Glauber Costa
on Tue, 26 June 2012 08:28
Re: [PATCH 03/11] memcg: change defines to an enum
By:
David Rientjes
on Tue, 26 June 2012 09:01
[PATCH 01/11] memcg: Make it possible to use the stock for more than one page.
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 01/11] memcg: Make it possible to use the stock for more than one page.
By:
Tejun Heo
on Mon, 25 June 2012 17:44
Re: [PATCH 01/11] memcg: Make it possible to use the stock for more than one page.
By:
Glauber Costa
on Mon, 25 June 2012 22:29
Re: [PATCH 01/11] memcg: Make it possible to use the stock for more than one page.
By:
Tejun Heo
on Mon, 25 June 2012 22:33
Re: [PATCH 01/11] memcg: Make it possible to use the stock for more than one page.
By:
David Rientjes
on Tue, 26 June 2012 04:01
[PATCH 05/11] Add a __GFP_KMEMCG flag
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 05/11] Add a __GFP_KMEMCG flag
By:
David Rientjes
on Tue, 26 June 2012 04:25
Re: [PATCH 05/11] Add a __GFP_KMEMCG flag
By:
Glauber Costa
on Tue, 26 June 2012 07:08
Re: [PATCH 05/11] Add a __GFP_KMEMCG flag
By:
David Rientjes
on Tue, 26 June 2012 09:03
[PATCH 04/11] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 04/11] kmem slab accounting basic infrastructure
By:
David Rientjes
on Tue, 26 June 2012 04:22
Re: [PATCH 04/11] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 07:09
[PATCH 10/11] memcg: allow a memcg with kmem charges to be destructed.
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 10/11] memcg: allow a memcg with kmem charges to be destructed.
By:
Tejun Heo
on Mon, 25 June 2012 18:34
Re: [PATCH 10/11] memcg: allow a memcg with kmem charges to be destructed.
By:
Glauber Costa
on Mon, 25 June 2012 22:25
Re: [PATCH 10/11] memcg: allow a memcg with kmem charges to be destructed.
By:
KAMEZAWA Hiroyuki
on Tue, 26 June 2012 05:59
Re: [PATCH 10/11] memcg: allow a memcg with kmem charges to be destructed.
By:
Glauber Costa
on Tue, 26 June 2012 07:21
[PATCH 07/11] mm: Allocate kernel pages to the right memcg
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 07/11] mm: Allocate kernel pages to the right memcg
By:
Tejun Heo
on Mon, 25 June 2012 18:07
Re: [PATCH 07/11] mm: Allocate kernel pages to the right memcg
By:
Glauber Costa
on Mon, 25 June 2012 22:27
[PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Tejun Heo
on Mon, 25 June 2012 18:38
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Frederic Weisbecker
on Mon, 25 June 2012 20:57
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Glauber Costa
on Tue, 26 June 2012 12:48
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Frederic Weisbecker
on Tue, 26 June 2012 13:38
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Glauber Costa
on Tue, 26 June 2012 13:37
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Frederic Weisbecker
on Tue, 26 June 2012 13:44
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
David Rientjes
on Tue, 26 June 2012 04:57
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
KAMEZAWA Hiroyuki
on Tue, 26 June 2012 05:35
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Glauber Costa
on Tue, 26 June 2012 07:23
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
David Rientjes
on Tue, 26 June 2012 08:45
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Glauber Costa
on Tue, 26 June 2012 08:44
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
David Rientjes
on Tue, 26 June 2012 09:05
Re: [PATCH 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs
By:
Frederic Weisbecker
on Mon, 25 June 2012 16:55
[PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Tejun Heo
on Mon, 25 June 2012 18:06
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Mon, 25 June 2012 22:28
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
akpm
on Mon, 25 June 2012 23:17
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 14:40
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 15:01
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
akpm
on Tue, 26 June 2012 18:01
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Tejun Heo
on Tue, 26 June 2012 18:08
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 18:14
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
akpm
on Tue, 26 June 2012 19:20
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 15:29
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
David Rientjes
on Tue, 26 June 2012 09:12
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Tue, 26 June 2012 09:17
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
David Rientjes
on Wed, 27 June 2012 04:01
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
Glauber Costa
on Wed, 27 June 2012 09:33
Re: [PATCH 06/11] memcg: kmem controller infrastructure
By:
David Rientjes
on Wed, 27 June 2012 19:46
[PATCH 09/11] memcg: propagate kmem limiting information to children
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
Tejun Heo
on Mon, 25 June 2012 18:29
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
Glauber Costa
on Mon, 25 June 2012 22:36
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
Tejun Heo
on Mon, 25 June 2012 22:49
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
akpm
on Mon, 25 June 2012 23:21
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
David Rientjes
on Tue, 26 June 2012 05:23
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
akpm
on Mon, 25 June 2012 23:23
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
David Rientjes
on Tue, 26 June 2012 05:24
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
akpm
on Tue, 26 June 2012 05:31
Re: [PATCH 09/11] memcg: propagate kmem limiting information to children
By:
Glauber Costa
on Tue, 26 June 2012 07:23
[PATCH 08/11] memcg: disable kmem code when not in use.
By:
Glauber Costa
on Mon, 25 June 2012 14:15
Re: [PATCH 08/11] memcg: disable kmem code when not in use.
By:
KAMEZAWA Hiroyuki
on Tue, 26 June 2012 05:51
Re: [PATCH 00/11] kmem controller for memcg: stripped down version
By:
akpm
on Mon, 25 June 2012 23:27
Re: [PATCH 00/11] kmem controller for memcg: stripped down version
By:
Glauber Costa
on Tue, 26 June 2012 07:17
Re: [PATCH 00/11] kmem controller for memcg: stripped down version
By:
akpm
on Tue, 26 June 2012 21:55
Re: [PATCH 00/11] kmem controller for memcg: stripped down version
By:
David Rientjes
on Wed, 27 June 2012 01:08
Re: [PATCH 00/11] kmem controller for memcg: stripped down version
By:
Glauber Costa
on Wed, 27 June 2012 08:39
Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down versio
By:
Glauber Costa
on Wed, 27 June 2012 09:29
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Frederic Weisbecker
on Wed, 27 June 2012 12:29
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Glauber Costa
on Wed, 27 June 2012 12:28
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Frederic Weisbecker
on Wed, 27 June 2012 12:35
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
David Rientjes
on Wed, 27 June 2012 19:38
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Glauber Costa
on Thu, 28 June 2012 09:01
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
akpm
on Thu, 28 June 2012 22:25
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Glauber Costa
on Tue, 03 July 2012 11:38
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Frederic Weisbecker
on Thu, 12 July 2012 15:40
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Glauber Costa
on Tue, 07 August 2012 13:59
Re: Fork bomb limitation in memcg WAS: Re: [PATCH 00/11] kmem controller for memcg: stripped down ve
By:
Glauber Costa
on Wed, 08 August 2012 14:15
Previous Topic:
containers and cgroups mini-summit @ Linux Plumbers
Next Topic:
[PATCH 0/4] fuse: optimize scatter-gather direct IO
Goto Forum:
- General
Virtuozzo 7 Beta Program
Support
HowTo
Discussions
- Mailing lists
Users
Devel
- International
German
French
Russian
- Test
TestForum
ml-test
-=]
Back to Top
[=-
[
Syndicate this forum (XML)
] [
] [
]
Current Time:
Mon Jun 30 22:59:09 GMT 2025
Total time taken to generate the page: 0.04217 seconds