LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Documentation/memcg: update memcg/kmem status
@ 2015-04-01 14:30 Vladimir Davydov
  2015-04-01 14:44 ` Jonathan Corbet
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vladimir Davydov @ 2015-04-01 14:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, cgroups, linux-kernel

Memcg/kmem reclaim support has been finally merged. Reflect this in the
documentation.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
 Documentation/cgroups/memory.txt |    8 +++-----
 init/Kconfig                     |    6 ------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index a22df3ad35ff..f456b4315e86 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -275,11 +275,6 @@ When oom event notifier is registered, event will be delivered.
 
 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
 
-WARNING: Current implementation lacks reclaim support. That means allocation
-	 attempts will fail when close to the limit even if there are plenty of
-	 kmem available for reclaim. That makes this option unusable in real
-	 life so DO NOT SELECT IT unless for development purposes.
-
 With the Kernel memory extension, the Memory Controller is able to limit
 the amount of kernel memory used by the system. Kernel memory is fundamentally
 different than user memory, since it can't be swapped out, which makes it
@@ -345,6 +340,9 @@ set:
     In this case, the admin could set up K so that the sum of all groups is
     never greater than the total memory, and freely set U at the cost of his
     QoS.
+    WARNING: In the current implementation, memory reclaim will NOT be
+    triggered for a cgroup when it hits K while staying below U, which makes
+    this setup impractical.
 
     U != 0, K >= U:
     Since kmem charges will also be fed to the user counter and reclaim will be
diff --git a/init/Kconfig b/init/Kconfig
index 7766b500f679..caffca37ccb7 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1059,12 +1059,6 @@ config MEMCG_KMEM
 	  the kmem extension can use it to guarantee that no group of processes
 	  will ever exhaust kernel resources alone.
 
-	  WARNING: Current implementation lacks reclaim support. That means
-	  allocation attempts will fail when close to the limit even if there
-	  are plenty of kmem available for reclaim. That makes this option
-	  unusable in real life so DO NOT SELECT IT unless for development
-	  purposes.
-
 config CGROUP_HUGETLB
 	bool "HugeTLB Resource Controller for Control Groups"
 	depends on HUGETLB_PAGE
-- 
1.7.10.4


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

* Re: [PATCH] Documentation/memcg: update memcg/kmem status
  2015-04-01 14:30 [PATCH] Documentation/memcg: update memcg/kmem status Vladimir Davydov
@ 2015-04-01 14:44 ` Jonathan Corbet
  2015-04-01 15:17   ` Vladimir Davydov
  2015-04-07 15:13 ` Michal Hocko
  2015-04-11 13:24 ` Jonathan Corbet
  2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2015-04-01 14:44 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Andrew Morton, linux-mm, cgroups, linux-kernel

On Wed, 1 Apr 2015 17:30:36 +0300
Vladimir Davydov <vdavydov@parallels.com> wrote:

> Memcg/kmem reclaim support has been finally merged. Reflect this in the
> documentation.

So the text you've removed says not to select kmem support "unless for
development purposes."  Do we now believe that this feature is ready for
use in a production setting?  If the answer is "yes," I'd be happy to
take this through the docs tree.

jon

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

* Re: [PATCH] Documentation/memcg: update memcg/kmem status
  2015-04-01 14:44 ` Jonathan Corbet
@ 2015-04-01 15:17   ` Vladimir Davydov
  2015-04-04 13:29     ` Jonathan Corbet
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Davydov @ 2015-04-01 15:17 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Andrew Morton, linux-mm, cgroups, linux-kernel

On Wed, Apr 01, 2015 at 04:44:31PM +0200, Jonathan Corbet wrote:
> On Wed, 1 Apr 2015 17:30:36 +0300
> Vladimir Davydov <vdavydov@parallels.com> wrote:
> 
> > Memcg/kmem reclaim support has been finally merged. Reflect this in the
> > documentation.
> 
> So the text you've removed says not to select kmem support "unless for
> development purposes."  Do we now believe that this feature is ready for
> use in a production setting?  If the answer is "yes," I'd be happy to
> take this through the docs tree.

I added this warning because of the following issues, which made
memcg/kmem useless:

 - no reclaim support
 - lack of memcg slab caches auto destruction
 - several obvious races/bugs

They are all fixed now, so I think the answer is yes, it can be used in
production. There might be bugs that I am not aware of, of course, but
It must be safe to compile it in anyway, because memcg/kmem accounting
is disabled by default and must be enabled explicitly at runtime by
writing to cgroup/memory.kmem.limit_in_bytes.

Thanks,
Vladimir

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

* Re: [PATCH] Documentation/memcg: update memcg/kmem status
  2015-04-01 15:17   ` Vladimir Davydov
@ 2015-04-04 13:29     ` Jonathan Corbet
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2015-04-04 13:29 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Andrew Morton, linux-mm, cgroups, linux-kernel

On Wed, 1 Apr 2015 18:17:17 +0300
Vladimir Davydov <vdavydov@parallels.com> wrote:

> > So the text you've removed says not to select kmem support "unless for
> > development purposes."  Do we now believe that this feature is ready for
> > use in a production setting?  If the answer is "yes," I'd be happy to
> > take this through the docs tree.  
> 
> I added this warning because of the following issues, which made
> memcg/kmem useless:
> 
>  - no reclaim support
>  - lack of memcg slab caches auto destruction
>  - several obvious races/bugs
> 
> They are all fixed now, so I think the answer is yes, it can be used in
> production. There might be bugs that I am not aware of, of course, but
> It must be safe to compile it in anyway, because memcg/kmem accounting
> is disabled by default and must be enabled explicitly at runtime by
> writing to cgroup/memory.kmem.limit_in_bytes.

So I believe you, but I'm still a bit nervous about taking this one
because I can't really judge whether we should be advising people to turn
on this feature at this point or not.  A well-placed ack or two would
help there; otherwise, Andrew, if you think it makes sense, you can just
grab it :)

Thanks,

jon

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

* Re: [PATCH] Documentation/memcg: update memcg/kmem status
  2015-04-01 14:30 [PATCH] Documentation/memcg: update memcg/kmem status Vladimir Davydov
  2015-04-01 14:44 ` Jonathan Corbet
@ 2015-04-07 15:13 ` Michal Hocko
  2015-04-11 13:24 ` Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Michal Hocko @ 2015-04-07 15:13 UTC (permalink / raw)
  To: Vladimir Davydov
  Cc: Andrew Morton, linux-mm, cgroups, linux-kernel, Jonathan Corbet

On Wed 01-04-15 17:30:36, Vladimir Davydov wrote:
> Memcg/kmem reclaim support has been finally merged. Reflect this in the
> documentation.
> 
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>

Acked-by: Michal Hocko <mhocko@suse.cz>

> ---
>  Documentation/cgroups/memory.txt |    8 +++-----
>  init/Kconfig                     |    6 ------
>  2 files changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> index a22df3ad35ff..f456b4315e86 100644
> --- a/Documentation/cgroups/memory.txt
> +++ b/Documentation/cgroups/memory.txt
> @@ -275,11 +275,6 @@ When oom event notifier is registered, event will be delivered.
>  
>  2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
>  
> -WARNING: Current implementation lacks reclaim support. That means allocation
> -	 attempts will fail when close to the limit even if there are plenty of
> -	 kmem available for reclaim. That makes this option unusable in real
> -	 life so DO NOT SELECT IT unless for development purposes.
> -
>  With the Kernel memory extension, the Memory Controller is able to limit
>  the amount of kernel memory used by the system. Kernel memory is fundamentally
>  different than user memory, since it can't be swapped out, which makes it
> @@ -345,6 +340,9 @@ set:
>      In this case, the admin could set up K so that the sum of all groups is
>      never greater than the total memory, and freely set U at the cost of his
>      QoS.
> +    WARNING: In the current implementation, memory reclaim will NOT be
> +    triggered for a cgroup when it hits K while staying below U, which makes
> +    this setup impractical.
>  
>      U != 0, K >= U:
>      Since kmem charges will also be fed to the user counter and reclaim will be
> diff --git a/init/Kconfig b/init/Kconfig
> index 7766b500f679..caffca37ccb7 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1059,12 +1059,6 @@ config MEMCG_KMEM
>  	  the kmem extension can use it to guarantee that no group of processes
>  	  will ever exhaust kernel resources alone.
>  
> -	  WARNING: Current implementation lacks reclaim support. That means
> -	  allocation attempts will fail when close to the limit even if there
> -	  are plenty of kmem available for reclaim. That makes this option
> -	  unusable in real life so DO NOT SELECT IT unless for development
> -	  purposes.
> -
>  config CGROUP_HUGETLB
>  	bool "HugeTLB Resource Controller for Control Groups"
>  	depends on HUGETLB_PAGE
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] Documentation/memcg: update memcg/kmem status
  2015-04-01 14:30 [PATCH] Documentation/memcg: update memcg/kmem status Vladimir Davydov
  2015-04-01 14:44 ` Jonathan Corbet
  2015-04-07 15:13 ` Michal Hocko
@ 2015-04-11 13:24 ` Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2015-04-11 13:24 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Andrew Morton, linux-mm, cgroups, linux-kernel

On Wed, 1 Apr 2015 17:30:36 +0300
Vladimir Davydov <vdavydov@parallels.com> wrote:

> Memcg/kmem reclaim support has been finally merged. Reflect this in the
> documentation.

Applied to the docs tree with Michal's ack.

Thanks,

jon

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

end of thread, other threads:[~2015-04-11 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 14:30 [PATCH] Documentation/memcg: update memcg/kmem status Vladimir Davydov
2015-04-01 14:44 ` Jonathan Corbet
2015-04-01 15:17   ` Vladimir Davydov
2015-04-04 13:29     ` Jonathan Corbet
2015-04-07 15:13 ` Michal Hocko
2015-04-11 13:24 ` Jonathan Corbet

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).