OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH v2 02/13] memcg: Kernel memory accounting infrastructure.
Re: [PATCH v2 02/13] memcg: Kernel memory accounting infrastructure. [message #45510 is a reply to message #45500] Tue, 13 March 2012 17:00 Go to previous messageGo to previous message
Greg Thelen is currently offline  Greg Thelen
Messages: 18
Registered: February 2011
Junior Member
Glauber Costa <glommer@parallels.com> writes:
> 2) For the kernel itself, we are mostly concerned that a malicious container may
> pin into memory big amounts of kernel memory which is, ultimately,
> unreclaimable. In particular, with overcommit allowed scenarios, you can fill
> the whole physical memory (or at least a significant part) with those objects,
> well beyond your softlimit allowance, making the creation of further containers
> impossible.
> With user memory, you can reclaim the cgroup back to its place. With kernel
> memory, you can't.

In overcommit situations the page allocator starts failing even though
memcg page can charge pages. When page allocations fail the oom killer
plays a role. Page allocations can fail even without malicious usage of
kernel memory (e.g. lots of mlock or anon without swap can fill a
machine). I assume that the kernel memory pinned the malicious
containers will be freed or at least become reclaimable once the
processes in malicious containers are killed (oom or otherwise). We
have been making use of the oom killer to save a system from
irreconcilable overcommit situations.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH v2 06/13] slab: Add kmem_cache_gfp_flags() helper function.
Next Topic: Re: [PATCH v2 07/13] memcg: Slab accounting.
Goto Forum:
  


Current Time: Fri Jul 18 08:39:46 GMT 2025

Total time taken to generate the page: 0.04312 seconds