Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752228AbbHaUWZ (ORCPT ); Mon, 31 Aug 2015 16:22:25 -0400 Received: from resqmta-ch2-03v.sys.comcast.net ([69.252.207.35]:38904 "EHLO resqmta-ch2-03v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbbHaUWY (ORCPT ); Mon, 31 Aug 2015 16:22:24 -0400 Date: Mon, 31 Aug 2015 15:22:22 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Vladimir Davydov cc: Tejun Heo , Michal Hocko , Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Fix memcg/memory.high in case kmem accounting is enabled In-Reply-To: <20150831192612.GE15420@esperanza> Message-ID: References: <20150831132414.GG29723@dhcp22.suse.cz> <20150831134335.GB2271@mtj.duckdns.org> <20150831143007.GA13814@esperanza> <20150831143939.GC2271@mtj.duckdns.org> <20150831151814.GC13814@esperanza> <20150831154756.GE2271@mtj.duckdns.org> <20150831165131.GD15420@esperanza> <20150831170309.GF2271@mtj.duckdns.org> <20150831192612.GE15420@esperanza> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 24 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/