On Mon, 31 Aug 2015, Vladimir Davydov wrote: > I totally agree that we should strive to make a kmem user feel roughly > the same in memcg as if it were running on a host with equal amount of > RAM. There are two ways to achieve that: > > 1. Make the API functions, i.e. kmalloc and friends, behave inside > memcg roughly the same way as they do in the root cgroup. > 2. Make the internal memcg functions, i.e. try_charge and friends, > behave roughly the same way as alloc_pages. > > I find way 1 more flexible, because we don't have to blindly follow > heuristics used on global memory reclaim and therefore have more > opportunities to achieve the same goal. The heuristics need to integrate well if its in a cgroup or not. In general make use of cgroups as transparent as possible to the rest of the code. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>